sfs | R Documentation |
Calculate the SFS from a data frame of SNP genotypes
sfs(
x,
strata.col = 2,
locus.col = 3,
fsc.dimnames = TRUE,
sort.strata = TRUE,
na.action = c("fail", "filter")
)
x |
a data frame of SNP genotypes where the first two columns are id and strata designations and SNPs start on the third column. SNP genotypes are coded as integers where 0 and 2 are the major and minor homozygotes and 1 is the heterozygote. |
strata.col |
column number that strata designations are in. |
locus.col |
column number that loci start in. All columns after this are assumed to be loci. |
fsc.dimnames |
format matrix dimnames for fastsimcoal2? If |
sort.strata |
if |
na.action |
action to take if genotypes are missing for some samples.
If |
A list of the marginal (1D) and joint (2D) site frequency spectra.
If only one stratum is present, then $marginal
will be NULL
.
Eric Archer eric.archer@noaa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.