plot.pcadapt is a method designed for objects of class pcadapt. It provides plotting options 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.

# S3 method for pcadapt
plot(
  x,
  ...,
  option = "manhattan",
  i = 1,
  j = 2,
  pop,
  col,
  chr.info = NULL,
  snp.info = NULL,
  plt.pkg = "ggplot",
  K = 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.

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.

col

a list of colors to be used in the score plot.

chr.info

a list containing the chromosome information for each marker.

snp.info

a list containing the names of all genetic markers present in the input.

plt.pkg

a character string specifying the package to be used to display the graphical outputs. Use "plotly" for interactive plots, or "ggplot" for static plots.

K

an integer specifying the principal component of interest. K has to be specified only when using the "componentwise" method.

Examples

## see ?pcadapt for examples