dense_meiosis#
- pybrops.core.util.mate.dense_meiosis(geno, sel, xoprob, rng)[source]#
Perform meiosis on matrix inputs. Assumes diploidy.
- Parameters:
geno (numpy.ndarray) –
A phased genome matrix of shape
(nphase,ntaxa,nvrnt)
.Where:
nphase
is the number of chromosome phases.ntaxa
is the number of taxa.nvrnt
is the number of variants (markers).
sel (numpy.ndarray) –
A selection configuration array of shape
(nsel,)
containing indices of individuals for which to perform meiosis.Where:
nsel
is the number of individuals for which to perform meiosis.
xoprob (numpy.ndarray) – A crossover probability array of shape
(nvrnt,)
containing sequential probabilities of recombination.rng (numpy.random.Generator, numpy.random.RandomState) – A random number generator instance.
- Returns:
gamete – A gamete matrix of shape
(nsel,nvrnt)
.- Return type:
numpy.ndarray