simulateInMSPrime: Simulates a given msprime function in msprime

Description Usage Arguments Value Examples

Description

given a function that defines the simulation of a population in msprime, this funtion executes the function and returns the resulting msprime.trees.TreeSequence

Usage

1
2
3
simulateInMSPrime(msprimeFunctionPath, mutationRate = 1.5e-08, phi = 2e-08,
  length = 10000, sampleHowManyHaploidGenomes = 2, debug = FALSE,
  seed = 30)

Arguments

msprimeFunctionPath

The path to the python (.py) function that defines an msprime model.

mutationRate

The mutation rate in mutations/bp/gen. This is the same mutation rate that one would use to scale results to real time and population sizes. See https://github.com/stschiff/msmc/blob/master/guide.md for more help.

phi

The recombination rate in recombinations/bp/gen.

length

The total amount of sequence to simulate.

debug

If True this parameter evokes msprime's demography debugger.

seed

formsprime simulation.

sampleHowManyHaploidGeneomes

The number of haploid genomes in the output. For PSMC' you need 1 diploid indidividual. Therefore, you'd need to sample 2 haploid genomes. I don't know what happens when this number is not 2.

Value

msprime.trees.TreeSequence

Examples

1
2
readMSMCInference(pathOfMSMCOutFinal = "../data/msprimeMultiHetSep/simulatedMsprime.oak.msmc.out.final.txt", mutationRate = 1e-8)
simulation<-simulateInMSPrime(msprimeFunctionPath = "../code/msmc2msprime_Feb1.py")

JesseGarcia562/psmc2msprime documentation built on May 29, 2019, 8:20 p.m.