gl2sfs | R Documentation |
The output of this function is suitable for analysis in fastsimcoal2 or dada.
gl2sfs(gl, outfile_root = "gl2sfs", outpath = tempdir())
gl |
the genlight object |
outfile_root |
The root of the name of the output file |
outpath |
The output path where to save the file |
It saves a derived sfs, assuming that the reference allele is the ancestral, and a MAF sfs.
At this stage this function caters only for diploid organisms, for samples from one population only, and for genotypes without missing data.
It expects a dartR formatted genlight object, but will work with other gl as
long as the have a data.frame
in other
called loc.metrics with
a column named TrimmedSequence
that contains a character string whose
length corrensponds to the number of sites of the allele. This information is
used to obtained the number of non-polymorphic sites.
TO-DO: deal with missing data. See http://evomics.org/learning/population-and-speciation-genomics/2018-population-and-speciation-genomics/fastsimcoal2-activity/
Excoffier L., Dupanloup I., Huerta-Sánchez E., Sousa V. C. and Foll M. (2013) Robust demographic inference from genomic and SNP data. PLoS genetics 9(10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.