cov_D2s#

pybrops.model.vmat.util.cov_D2s(r, nself)[source]#

Calculate a D2 matrix.

This matrix represents the covariance (caused by linkage disequilibrium) between genomic loci two recombination events prior to selfing for random intermating.

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

Returns:

D2 – A D2 matrix.

Return type:

numpy.ndarray