Learn R Programming

pcadapt (version 1.0)

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 a pcadapt object. Different options are available : "screeplot", "scores", "neutral", kurtosis, "manhattan" and "qqplot". "screeplot" shows the decay of the singular values of the genotype matrix and provides a figure which may help in the choice of K. "scores" plots the projection of the individuals onto the first two principal components. "neutral" displays the loadings histogram of the principal component of interest, as well as the estimated distribution of the loadings of the neutral SNPs. "kurtosis" plots the kurtosis as a function of the proportion of observations removed from the distribution of interest. "manhattan" draws the Manhattan plot of the p-values associated with the principal component of interest. "qqplot" draws a Q-Q plot of the p-values associated with the principal component of interest.

Usage

## S3 method for class 'pcadapt':
plot(x, ..., option = NULL, K = NULL, i = 1, j = 2,
  subpop = NULL, subcol = NULL, threshold = NULL, num_pc = 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 uniquely when using the neutral 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.
subpop
a list of lists of indices specifying the subpopulations. This attributes specific colors to each subpopulations.
subcol
a list of colors for each subpopulation. If not specified, default colors will be used.
threshold
a parameter which depends on the chosen option. When used with "scores", it's the threshold which the user expects the false discovery rate to be under. For the "qqplot" option, it displays an addiotional bar which separates the
num_pc
an integer specifying the number of components to take into account in the scree plot. num_axis should be lower than K. By default, num_axis = K.

Examples

Run this code
## see ?pcadapt for examples

Run the code above in your browser using DataLab