| gl2bayesAss | R Documentation |
This function exports a genlight object into bayesAss format and saves it
into a file.
This function only caters for ploidy = 2.
gl2bayesAss(
x,
ploidy = 2,
outfile = "gl.BayesAss.txt",
outpath = NULL,
verbose = NULL
)
x |
Name of the genlight object containing the SNP data [required]. |
ploidy |
Confirmation that the data are diploid; 2 is the only accepted value, other values stop the function [default 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 NULL, adopting the global verbosity set by gl.set.verbosity(), or 2 if no global is set]. |
The output file has one row per individual per locus, in the format expected by BayesAss (BA3) and BA3-SNPs: individual identifier, population, locus name, then the two alleles coded as 1 (reference) and 2 (alternate). Missing genotypes are written as 0 0.
returns the input file as data.table
Author(s): Carlo Pacioni. Custodian: Carlo Pacioni – Post to https://groups.google.com/d/forum/dartr
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.
Other linker:
gi2gl(),
gl2bayescan(),
gl2bpp(),
gl2demerelate(),
gl2eigenstrat(),
gl2faststructure(),
gl2gapit(),
gl2gds(),
gl2genalex(),
gl2genepop(),
gl2geno(),
gl2gi(),
gl2hapmap(),
gl2hiphop(),
gl2related(),
gl2snapper(),
gl2structure(),
gl2treemix(),
gl2vcf()
require("dartR.data")
#only the first 100 due to check time
if (isTRUE(getOption("dartR_fbm"))) platypus.gl <- gl.gen2fbm(platypus.gl)
gl2bayesAss(platypus.gl[,1:100], outpath=tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.