| .phfnoGenotype | R Documentation |
Internal helper that constructs a half-sib paternal haplotype matrix using:
a block/strand-of-origin matrix (typically produced by bmh)
a 2-row phased sire haplotype matrix (typically produced by ssp)
.phfnoGenotype(blockMatrix, sirePhasedMatrix)
blockMatrix |
An integer/numeric matrix of block assignments with individuals in rows and markers in columns. Must contain only '0', '1', and '2', where '0' indicates unknown origin. |
sirePhasedMatrix |
An integer/numeric matrix with **two rows** (the sire
haplotypes) and the same number of columns as |
For each marker (column) and individual (row), if the block code is:
'1': assign sire haplotype row 1 allele at that marker
'2': assign sire haplotype row 2 allele at that marker
'0': leave as missing ('9')
This function calls a native C routine (phaseNogenotype) via
.C().
The underlying C implementation initializes the entire result matrix to '9'
and then fills entries according to blockMatrix:
if blockMatrix[j,i] == 1, then result[j,i] = sirePhasedMatrix[1,i]
if blockMatrix[j,i] == 2, then result[j,i] = sirePhasedMatrix[2,i]
An integer matrix with the same dimensions as blockMatrix,
containing the inferred paternal haplotype allele for each individual and
marker. Values are '0'/'1' for alleles and '9' for missing/unknown (e.g. where
blockMatrix is '0').
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.