pcadapt performs principal component analysis and computes p-values to
test for outliers. The test for outliers is based on the correlations between
genetic variation and the first
K principal components.
also handles Pool-seq data for which the statistical analysis is performed on
the genetic markers frequencies. Returns an object of class
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
pcadapt(input, K = 2, method = "mahalanobis", min.maf = 0.05, ploidy = 2, LD.clumping = NULL, pca.only = FALSE) ## S3 method for class 'pcadapt_matrix' pcadapt(input, K = 2, method = c("mahalanobis", "componentwise"), min.maf = 0.05, ploidy = 2, LD.clumping = NULL, pca.only = FALSE) ## S3 method for class 'pcadapt_bed' pcadapt(input, K = 2, method = c("mahalanobis", "componentwise"), min.maf = 0.05, ploidy = 2, LD.clumping = NULL, pca.only = FALSE) ## S3 method for class 'pcadapt_pool' pcadapt(input, K = (nrow(input) - 1), method = "mahalanobis", min.maf = 0.05, ploidy = NULL, LD.clumping = NULL, pca.only = FALSE)
a genotype matrix or a character string specifying the name of
the file to be processed with
an integer specifying the number of principal components to retain.
a character string specifying the method to be used to compute
the p-values. Two statistics are currently available,
a value between
Number of trials, parameter of the binomial distribution. Default is 2, which corresponds to diploidy, such as for the human genome.
a logical value indicating whether PCA results should be returned (before computing any statistic).
First, a principal component analysis is performed on the scaled and
centered genotype data. To account for missing data, the correlation matrix
between individuals is computed using only the markers available for each
pair of individuals. Depending on the specified
method, different test
statistics can be used.
mahalanobis (default): the robust Mahalanobis distance is computed for
each genetic marker using a robust estimate of both mean and covariance
matrix between the
K vectors of z-scores.
communality: the communality statistic measures the proportion of
variance explained by the first
K PCs. Deprecated in version 4.0.0.
componentwise: returns a matrix of z-scores.
To compute p-values, test statistics (
stat) are divided by a genomic
inflation factor (
method="mahalanobis". When using
method="mahalanobis", the scaled statistics
chi2_stat) should follow a chi-squared distribution with
degrees of freedom. When using
method="componentwise", the z-scores
should follow a chi-squared distribution with
1 degree of freedom. For
pcadapt provides p-values based on the Mahalanobis
distance for each SNP.
The returned value
x is an object of class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.