gl2bayesAss {dartR.base} | R Documentation |
Converts a genlight object into bayesAss (BA3) input format
Description
This function exports a genlight object into bayesAss format and save it into a
file.
This function only caters for ploidy=2
.
Usage
gl2bayesAss(
x,
ploidy = 2,
outfile = "gl.BayesAss.txt",
outpath = NULL,
verbose = NULL
)
Arguments
x |
Name of the genlight object containing the SNP data [required]. |
ploidy |
Set the ploidy [defaults 2]. |
outfile |
File name of the output file [default 'gl.BayesAss.txt']. |
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]. |
Value
returns the input file as data.table
Author(s)
Custodian: Carlo Pacioni (Post to https://groups.google.com/d/forum/dartr)
References
Mussmann S. M., Douglas M. R., Chafin T. K. and Douglas M. E. (2019) BA3-SNPs: Contemporary migration reconfigured in BayesAss for next-generation sequence data. Methods in Ecology and Evolution 10, 1808-1813.
Wilson G. A. and Rannala B. (2003) Bayesian Inference of Recent Migration Rates Using Multilocus Genotypes. Genetics 163, 1177-1191.
See Also
Other linker:
gl2bayescan()
,
gl2bpp()
,
gl2demerelate()
,
gl2eigenstrat()
,
gl2faststructure()
,
gl2gds()
,
gl2genalex()
,
gl2genepop()
,
gl2geno()
,
gl2gi()
,
gl2hiphop()
,
gl2phylip()
,
gl2plink()
,
gl2related()
,
gl2sa()
,
gl2structure()
,
gl2treemix()
,
gl2vcf()
Examples
require("dartR.data")
#only the first 100 due to check time
gl2bayesAss(platypus.gl[,1:100], outpath=tempdir())