View source: R/gl.read.structure.r
| gl.read.structure | R Documentation |
Reads and processes STRUCTURE output files, extracting run summaries and Q-matrices. Optionally associates Q-matrices with population information from a genlight object.
gl.read.structure(
folder.path,
x = NULL,
pattern = NULL,
recursive = FALSE,
rename_files = FALSE,
prefix = NULL,
verbose = NULL
)
folder.path |
Path to folder containing STRUCTURE output files [required]. |
x |
Optional genlight object used to attach population labels to individuals [default NULL]. |
pattern |
Optional regex to filter files in folder.path (e.g. ".*_f$" or "out$") [default NULL]. |
recursive |
Logical; search folder recursively [default FALSE]. |
rename_files |
Logical; if TRUE, renames source files on disk based on K and replicate [default FALSE]. |
prefix |
Optional prefix used for renaming/labels. If NULL, uses longest common prefix of filenames [default NULL]. |
verbose |
Verbosity (as in dartR) [default 2 / gl.set.verbosity()]. |
A list of class "structure.result". Each element contains:
summary: named numeric vector (k, est.ln.prob, mean.lnL, var.lnL)
q.mat: data.frame (id, pct.miss, orig.pop, Group.1..Group.K)
prior.anc: optional list of ancestry matrices (if present)
files: file path
label: run label
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.