Description Usage Arguments Value Examples
We have observed parent and observed kids. We want to know the likelihood of the parent's possible genotypes. This function is to impute the parent's most likely genotype from a progeny array of k kids by giving a log likelihood threshold.
1 2 3 4 5 6 | impute_parent(GBS.array, perr, kerr)
impute_one_site(locus, gen_error, p_locus, probs, parents, obs_parent,
other_parents, obs_kids, true_p)
parentgeno(geno, oddratio = 0.69, returnall = TRUE)
|
GBS.array |
A GBS.array object generated from create_array() or sim.array() functions. In the object, a vector (at slot freq) of allele frequencies for each locus will be provided. It was estimated from the selfed progeny. |
parents |
A list of the genotypes of all possible parents, including current parent. These are observed GBS data, coded with 0, 1 and 2, which is the copy of alternative alleles. Missing data should be coded with 3. |
obs_parent |
An integer referring to which parent is the current parent of interest. |
other_parents |
A vector of integers referring to which are the second parent of each kid. Should be same length as number of kids (length(obs_kids)) |
obs_kids |
A list of vectors of Kid's GBS data. Coded with 0, 1 and 2, which is the copy of alternative alleles. Missing data should be coded with 3. |
geno |
A table of genotype likelihoods from impute_parent |
oddratio |
The cutoff used for determining the log likelihood ratio of the highest and the 2nd highest genotypes. The oddratio = NULL means to report the most likely genotype. Default value sets to 0.6931472, which is equivalent to most likely genotype being twice as likely as next most likely. 2X as likely |
returnall |
For function 'parentgeno', returnall=TRUE will return with all the information; returnall=FALSE will return parent's genotype only (either maxlikelihood or, if oddratio is specified, genotypes with low oddratios will be set to missing). |
hom.error |
Homozygous error rate, default=0.02. |
het.error |
Heterozygous error rate, default=0.8. |
oddratio |
The cutoff used for determining the log likelihood ratio of the highest and the 2nd highest genotypes. The oddratio = NULL means to report the most likely genotype. Default value sets to 0.6931472, which is equivalent to most likely genotype being twice as likely as next most likely. 2X as likely |
returnall |
If TRUE this will return all the data. Otherwise it will return the genotypes that pass the specified oddratio; if no oddratio is specied (oddratio=NULL) then this returns the maximum likelihood genotypes |
return a data.frame with all the log likelihoods. Using function parentgeno
to extract parent's genotype.
See https://github.com/yangjl/imputeR/blob/master/vignettes/imputeR-vignette.pdf for more a simulated example and more details
1 2 3 | test <- sim.array(size.array=50, numloci=10)
res <- impute_parent(GBS.array=test)
out <- parentgeno(res, oddratio=0.69, returnall=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.