fsc.estimate: Run fastsimcoal to estimate parameters' values

View source: R/fastsimcoal.R

fsc.estimateR Documentation

Run fastsimcoal to estimate parameters' values

Description

Run fastsimcoal assuming that in dir.in there are the tpl, est and obs files properly named and formatted.It writes a fsc_run.txt file and execute fsc in dir.in

Usage

fsc.estimate(
  dir.in,
  n = 5e+05,
  L = 100,
  maf = TRUE,
  ncpu = 0,
  nBatches = NULL,
  fsc.cmd = "fsc2702",
  fsc.path = "path"
)

Arguments

dir.in

The path where to run fsc

n

The number of coalescent simulations to approximate the expected SFS (-n option). This should be larger than 100,000.

L

The number of optimization cycles (-L option). It should be >50

maf

Whether a MAF SFS (default) or a derived SFS is provided (if FALSE)

ncpu

The number of CPU (threads) to use in the analysis. Automatically handle if ncpu=0 (default)

nBatches

The number of batches (-B option)

fsc.cmd

The command to use to call fsc (that may be different depending on the version installed)

fsc.path

The path where fsc is installed or "path" if it is in the PATH (that means that it can be called regardless of the working directory)

Details

If ncpu=0 and nBatches=NULL, nBatches is set to 12 (fsc default value). If ncpu>0 and nBatches=NULL, nBatches is set to twice ]codenspu.

References

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)


carlopacioni/amplicR documentation built on Aug. 19, 2023, 7:59 p.m.