plot_diagnostic | R Documentation |
Create a suite of basic diagnostic plots (FIS density, 1D SFS, maf density, PCA, to describe the condition of the data in a snpRdata object.
plot_diagnostic(
x,
facet = NULL,
projection = floor(nsnps(x)/1.2),
fold_sfs = TRUE,
plots = c("fis", "maf", "pca", "missingness", "heho")
)
x |
snpRdata object |
facet |
character, default NULL. Categorical metadata variables by which
to break up plots. Note that only one facet is allowed here. Missingness
and the PCA will have individuals colored by the given sample facet. See
|
projection |
integer, default floor(nsnps(x)/1.2). A sample size to project the SFS to, in number of gene copies. Sizes too large will result in a SFS containing few or no SNPs. |
fold_sfs |
logical, default TRUE. Determines if the SFS should be folded or left polarized. If FALSE, snp metadata columns named "ref" and "anc" containing the identity of the derived and ancestral alleles, respectively, should be present for polarization to be meaningful. |
plots |
character vector, default all possible plots except for SFS. Plot options:
|
A named list of diagnostic ggplot2 plots.
William Hemstrom
## Not run:
# missingness and pca colored by pop
plot_diagnostic(stickSNPs, "pop")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.