View source: R/run_structure.R
admixturePlots | R Documentation |
Generate a pdf with admixture plots for each K
Takes as input the output files from strucure runs and generates a pdf with plots of admixture.
admixturePlots(
x,
xdir = NULL,
labels = NULL,
save.as = file.path(getwd(), "admixturePlots.pdf"),
userun = 1,
save = T
)
x |
Character vector with paths to input files. Ignored if 'xdir' is non-NULL. These are either '.log_f' files generated by STRUCTURE, or a single '.Qlog' file generated by 'run_DAPC', 'run_fastStructure', or 'run_SNMF' functions. |
xdir |
Optional path to the directory containing all STRUCTURE output files plus the '.*_sampleIDs.txt' file generated by run_structure. Default NULL. If supplied, this overides save.as, labels, and x arguments. |
labels |
Character vector with names of individuals. Default NULL. Ignored if 'xdir' non-NULL. |
save.as |
Character string with path/name to use for the output PDF file. Default is to save the output in the current directory with the name "admixturePlots.pdf". |
userun |
Number or numerical vector indicating which runs should be used for admixture plots. Default is 1 (the first run). When multiple runs are used, the mean is used across runs after aligning clusters. |
NULL; generates pdf with a barplot of admixture for each K
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.