coverage_adjust: Adjust ancient genotypes for coverage bias

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/coverage_adjust.R

Description

coverage_adjust adjusts the matrix of genotypes for low and uneven coverage of individual genomes.

Usage

1
2
coverage_adjust(Y = NULL, coverage = NULL, K, lambda = 1e-05,
  log = FALSE)

Arguments

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.

Value

an nxp numeric matrix containing the n corrected genotypes

Author(s)

Olivier Francois, olivier.francois@univ-grenoble-alpes.fr

References

François, O., Jay, F. (2020). Factor analysis of ancient population genomic samples. Under review.

See Also

England_BA, tfa, choose_lambda

Examples

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)

bcm-uga/tfa documentation built on Aug. 28, 2020, 2:46 p.m.