Description Usage Arguments Value Author(s) References See Also Examples
View source: R/coverage_adjust.R
coverage_adjust
adjusts the matrix of genotypes for low and uneven coverage of
individual genomes.
1 2 | coverage_adjust(Y = NULL, coverage = NULL, K, lambda = 1e-05,
log = FALSE)
|
Y |
an nxp numeric data matrix containing genetic information for n individuals recorded in p columns. Genetic information could be encoded as any numeric value, usually as genotypes taking values in 0,1,2. Missing data are not allowed. |
coverage |
a numerical vector containing information on each DNA sample coverage. |
K |
a nonnegative integer for the number of components in the data matrix Y. It could be obtained from a PCA of the data matrix. |
lambda |
a ridge regularization parameter, to be kept at a small values (defaut 1e-5)). |
log |
a logical value indicating that corrections are performed from log(coverage) instead of coverage. |
an nxp numeric matrix containing the n corrected genotypes
Olivier Francois, olivier.francois@univ-grenoble-alpes.fr
François, O., Jay, F. (2020). Factor analysis of ancient population genomic samples. Under review.
England_BA
, tfa
, choose_lambda
1 2 3 4 5 6 7 8 9 | library(tfa)
# Ancient DNA from Bronze Age Great Britain samples
# including Steppe (Yamnaya), hunter gatherers, and early farmers from Anatolia
data(england_ba)
attach(England_BA)
coverage <- meta$Coverage
geno <- coverage_adjust(genotype, coverage, K = 4, log = TRUE)
detach(England_BA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.