Learn R Programming

jaatha (version 2.7.0)

Jaatha.initialize: Initialization of a Jaatha estimation for population genetics

Description

This function sets the basic parameters for an analysis with Jaatha and is the first step for each application of it.

Usage

Jaatha.initialize(demographic.model, jsfs, seed, cores = 1,
  scaling.factor = 1, use.shm = FALSE, folded = FALSE,
  smoothing = FALSE)

Arguments

demographic.model
The demographic model to use
jsfs
Your observed Joint Site Frequency Spectrum (JSFS). Jaatha uses the JSFS as summary statistics.
seed
An integer used as seed for both Jaatha and the simulation software
cores
The number of cores to use in parallel. If 0, it tries to guess the number of available cores and use them all.
scaling.factor
You can use this option if you have a large dataset. If so, Jaatha only simulates only a fraction 1/scaling.factor of the dataset and interpolates the missing data.
use.shm
Logical. Many modern linux distributions have a shared memory file system available under /dev/shm. Set this to TRUE to use it for temporary files. Usually gives a huge performance boost. Warning: This option will be removed in a future version of jaatha.
folded
If 'TRUE', Jaatha will assume that the JSFS is folded.
smoothing
If set to true, Jaatha uses a different way to summaries the JSFS. Instead of binning certain areas, and fitting a glm per area, only one glm is fitted for the complete JSFS, and the position of the different entries is treated as a model parameter. This

Value

  • A S4-Object of type jaatha containing the settings

Examples

Run this code
dm <- dm.createThetaTauModel(c(20,25), 100)
jsfs <- matrix(rpois(21*26, 5), 21, 26)
jaatha <- Jaatha.initialize(dm, jsfs)

Run the code above in your browser using DataLab