R/withScriptGeneratePi.R

withScriptGeneratePi<-function(scriptPath, outPath, totalGenomeLength=3000000, windowSize=500000, seed=30){
  source_python(scriptPath)
  simulation<-msmc_model(length= totalGenomeLength, seed=seed, mu=1.01e-08)
  
  writeVCFOfSimulation(simulation, outpath = outPath, ploidy=2)
  

  computePiPerCallableSites(msprimeVCF = outPath,windowSize = windowSize, totalGenomeLength=totalGenomeLength)
  
  
}
JesseGarcia562/psmc2msprime documentation built on May 29, 2019, 8:20 p.m.