View source: R/DAPC_adegenet.R
run_DAPC | R Documentation |
Run DAPC and Plot
Run adagenet DAPC analyses and generate plots of BIC vs number of clusters, baplot of alpha optimum number of principle components at each K, admixture for each K, assignments at each K. If sample coordinates are supplied, this function interpolates cluster membership probabilities on a map, using functions from tess3r package.
run_DAPC(
x,
format = "VCF",
kmax = 10,
coords = NULL,
samplenames = NULL,
reps = 30,
save.in = NULL,
plot.components = FALSE,
include.out = c(".pdf", ".Qlog", ".BIClog"),
overwrite = FALSE
)
x |
'vcfR' object (see package::vcfR) or character string with path to file containing snp data, with data format specified by 'format' argument (currently only VCF files can be used). |
format |
Character string indicating the format (filetype) of the data. Currently only "VCF" is allowed, but other types may be added. |
kmax |
Number indicating the maximum number of clusters to evaluate. Default is 40, which is converted using kmax = min(kmax, number of individuals-1) |
coords |
Optional character string with path to a table with longitude and latitude of individuals in the vcf file, or a matrix or data frame with longitude and latitude columns. Default is NULL, in which case membership probabilities are not interpolated onto a map. |
reps |
Number indicating the number of replicates of 'find.clusters'. Default 100. |
save.in |
Character string with path to directory where output files should be saved. |
plot.components |
FALSE. This is still in development. |
include.out |
Character vector indicating which type of files should be included as output. Default is c(".pdf",".Qlog",".BIClog"). |
overwrite |
Logical indicating whether or not to allow new output files to overwrite existing ones. Default FALSE. |
A list of plots.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.