admixturePlots: Generate a pdf with admixture plots for each K Takes as input...

View source: R/run_structure.R

admixturePlotsR 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.

Description

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.

Usage

admixturePlots(
  x,
  xdir = NULL,
  labels = NULL,
  save.as = file.path(getwd(), "admixturePlots.pdf"),
  userun = 1,
  save = T
)

Arguments

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.

Value

NULL; generates pdf with a barplot of admixture for each K


JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.