| gl2structure | R Documentation |
This function exports genlight objects to STRUCTURE formatted files (be aware there is a gl2faststructure version as well). It is based on the code provided by Lindsay Clark (see https://github.com/lvclark/R_genetics_conv) and this function is basically a wrapper around her numeric2structure function. See also: Lindsay Clark. (2017, August 22). lvclark/R_genetics_conv: R_genetics_conv 1.1 (Version v1.1). Zenodo: doi.org/10.5281/zenodo.846816.
gl2structure(
x,
ind.names = NULL,
add.columns = NULL,
ploidy = 2,
export.marker.names = TRUE,
outfile = "gl.str",
outpath = NULL,
verbose = NULL
)
x |
Name of the genlight object containing the SNP data and location data, lat longs [required]. |
ind.names |
Specify individuals names to be added [if NULL, defaults to ind.names(x)]. |
add.columns |
Additional columns to be added before genotypes [default NULL]. |
ploidy |
Set the ploidy [defaults 2]. |
export.marker.names |
If TRUE, locus names locNames(x) will be included [default TRUE]. |
outfile |
File name of the output file (including extension) [default "gl.str"]. |
outpath |
Path where to save the output file [default global working directory or if not specified, tempdir()]. |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]. |
returns no value (i.e. NULL)
Bernd Gruber (wrapper) and Lindsay V. Clark [lvclark@illinois.edu]; Custodian Bernd Gruber
Other linker:
gl2bayesAss(),
gl2bayescan(),
gl2bpp(),
gl2demerelate(),
gl2eigenstrat(),
gl2faststructure(),
gl2gds(),
gl2genalex(),
gl2genepop(),
gl2geno(),
gl2gi(),
gl2hiphop(),
gl2phylip(),
gl2plink(),
gl2related(),
gl2sa(),
gl2treemix(),
gl2vcf()
gl2structure(testset.gl[1:10,1:50], outpath=tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.