Learn R Programming

pcadapt (version 3.0.4)

plot.pcadapt: pcadapt visualization tool

Description

plot.pcadapt is a method designed for objects of class pcadapt. It provides a plotting utile for quick visualization of pcadapt objects. Different options are currently available : "screeplot", "scores", "stat.distribution", "manhattan" and "qqplot". "screeplot" shows the decay of the genotype matrix singular values and provides a figure to help with the choice of K. "scores" plots the projection of the individuals onto the first two principal components. "stat.distribution" displays the histogram of the selected test statistics, as well as the estimated distribution for the neutral SNPs. "manhattan" draws the Manhattan plot of the p-values associated with the statistic of interest. "qqplot" draws a Q-Q plot of the p-values associated with the statistic of interest.

Usage

"plot"(x, ..., option = "manhattan", K = NULL, i = 1, j = 2, pop, threshold = NULL)

Arguments

x
an object of class "pcadapt" generated with pcadapt.
...
...
option
a character string specifying the figures to be displayed. If NULL (the default), all three plots are printed.
K
an integer specifying the principal component of interest. K has to be specified only when using the loadings option.
i
an integer indicating onto which principal component the individuals are projected when the "scores" option is chosen. Default value is set to 1.
j
an integer indicating onto which principal component the individuals are projected when the "scores" option is chosen. Default value is set to 2.
pop
a list of integers or strings specifying which subpopulation the individuals belong to.
threshold
for the "qqplot" option, it displays an additional bar which shows the threshold percent of SNPs with smallest p-values and separates them from SNPs with higher p-values.

Examples

Run this code
## see ?pcadapt for examples

Run the code above in your browser using DataLab