cov_D1st#
- pybrops.model.vmat.util.cov_D1st(r, nself, t)[source]#
Calculate a D1 matrix.
This matrix represents the covariance between genomic loci caused by linkage disequilibrium.
- Parameters:
r (numpy.ndarray) – Recombination probability matrix.
nself (int, inf) –
Selfing generation number to derive gametes from.
Example
Description
nself = 0
Derive gametes from F1
nself = 1
Derive gametes from F2
nself = 2
Derive gametes from F3
...
etc.
nself = inf
Derive gametes from SSD
Remark:
’s’ takes priority over ‘t’. If s > 0, ‘t’ calculations are not performed.
t (int, inf) –
Random intermating generation number to derive gametes from.
Example
Description
t = 0
Derive gametes from F1
t = 1
Derive gametes from (F1 x F1)
t = 2
Derive gametes from (F1 x F1) x (F1 x F1)
...
etc.
t = inf
Derive gametes from unlimited random intermating
Remark:
’s’ takes priority over ‘t’. If s > 0, ‘t’ calculations are not performed.
- Returns:
D_1 – A D_1 matrix.
- Return type:
numpy.ndarray