Description Usage Arguments Value
Calculate the conditional expected genotype probability given the observed sequencing data D_{ij} from formula E(P(G_{ij}|D_{ij}))=ā_{g=0}^2 gP(G_{ij}=g|D_{ij}), where P(G_{ij}=g|D_{ij})=P(D_{ij}|G_{ij}=g)*P(G_{ij}=g)/P(D_{ij}).
P(D_{ij}|G_{ij}=g) (input M) is from the VCF file or function calc_pobs_ndepth
, p(G_{ij}=g) (input p) is output from function calc_EM
.
All values for P(G_{ij}=g|D_{ij}) are scaled by P(D_{ij}).
1 | calc_EG(M, p, rdv)
|
M |
genotype likelihoods with dimension of number of sample times 3 (double), each column is the genotype likelihood P(D_{ij}|G=AA, Aa\ or\ aa) for one locus. It uses output from |
p |
genotype frequencies P(G=AA, Aa\ or\ aa) or p(G=0,1,2\ minor\ allele) for each SNP, it is a vector of length 3 and uses the output from function |
rdv |
read depth for all samples. Dummy variable in |
a vector with the same length as rdv, containing conditional expectation probability E(P(G_{ij}|D_{ij})).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.