Description Usage Arguments Value Note Author(s) References See Also Examples
Read arlequin formatted output or parameter estimation files generated by fastsimcoal
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | fscReadArp(
p,
sim = c(1, 1),
marker = c("all", "snp", "microsat", "dna", "standard"),
chrom = NULL,
sep.chrom = FALSE,
drop.mono = FALSE,
as.genotypes = TRUE,
one.col = FALSE,
sep = "/",
coded.snps = FALSE
)
fscReadParamEst(p)
fscReadSFS(p, sim = 1)
|
p |
list of fastsimcoal input parameters. |
sim |
one or two-element numberic vector giving the number of the
simulation replicate (and sub-replicate) to read. For example, |
marker |
type of marker to return. |
chrom |
numerical vector giving chromosomes to return. If |
sep.chrom |
return a list of separate chromosomes? |
drop.mono |
return only polymorphic loci? |
as.genotypes |
return data as genotypes? If |
one.col |
return genotypes with one column per locus? If |
sep |
character to use to separate alleles if |
coded.snps |
return diploid SNPs coded as 0 (major allele homozygote), 1
(heterozygote), or 2 (minor allele homozygote). If this is |
Reads and parses Arlequin-formatted .arp output files
created by fastsimcoal2
. Returns a data frame of genotypes, with
individuals created by combining haplotypes based on the stored value of
ploidy specified when the simulation was run.
Reads and parses files output from a
fastsimcoal2
run conducted for parameter estimation. Returns a list
of data frames and vectors containing the data from each file.
Reads site frequency spectra generated from
fastsimcoal2
. Returns a list of the marginal and joint SFS, the
polymorphic sites, and the estimated maximum likelihood of the SFS."
fastsimcoal2
is not included with 'strataG' and must be
downloaded separately. Additionally, it must be installed such that it can
be run from the command line in the current working directory.
The function fscTutorial()
will open a detailed tutorial on the
interface in your web browser.
Eric Archer eric.archer@noaa.gov
Excoffier, L. and Foll, M (2011) fastsimcoal: a continuous-time
coalescent simulator of genomic diversity under arbitrarily complex
evolutionary scenarios Bioinformatics 27: 1332-1334.
Excoffier, L., Dupanloup, I., Huerta-Sánchez, E., Sousa, V.C.,
and M. Foll (2013) Robust demographic inference from genomic and SNP data.
PLOS Genetics, 9(10):e1003905.
http://cmpg.unibe.ch/software/fastsimcoal2/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## Not run:
#' # three demes with optional names
demes <- fscSettingsDemes(
Large = fscDeme(10000, 10),
Small = fscDeme(2500, 10),
Medium = fscDeme(5000, 3, 1500)
)
# four historic events
events <- fscSettingsEvents(
fscEvent(event.time = 2000, source = 1, sink = 2, prop.migrants = 0.05),
fscEvent(2980, 1, 1, 0, 0.04),
fscEvent(3000, 1, 0),
fscEvent(15000, 0, 2, new.size = 3)
)
# four genetic blocks of different types on three chromosomes.
genetics <- fscSettingsGenetics(
fscBlock_snp(10, 1e-6, chromosome = 1),
fscBlock_dna(10, 1e-5, chromosome = 1),
fscBlock_microsat(3, 1e-4, chromosome = 2),
fscBlock_standard(5, 1e-3, chromosome = 3)
)
params <- fscWrite(demes = demes, events = events, genetics = genetics)
# runs 100 replicates, converting all DNA sequences to 0/1 SNPs
# will also output the MAF site frequency spectra (SFS) for all SNP loci.
params <- fscRun(params, num.sim = 100, dna.to.snp = TRUE, num.cores = 3)
# extracting only microsattelite loci from simulation replicate 1
msats <- fscReadArp(params, marker = "microsat")
# read SNPs from simulation replicate 5 with genotypes coded as 0/1
snp.5 <- fscReadArp(params, sim = 1, marker = "snp", coded.snps = TRUE
# read SFS for simulation 20
sfs.20 <- fscReadSFS(params, sim = 20)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.