Skip to content

Instantly share code, notes, and snippets.

View paulstaab's full-sized avatar

Paul Staab paulstaab

View GitHub Profile
library(jaatha)
dm <- dm.createDemographicModel(sample.sizes=c(17,17), loci.num=1000, seq.length=1000)
dm <- dm.addSizeChange(dm, 0.05, 10, population = 2,at.time = "0", new.par.name = "q")
dm <- dm.addGrowth(dm, par.new=FALSE, parameter="log(4*q/(1+q))/tau", population=2)
dm <- dm.addSpeciationEvent(dm, 0.1, 5, new.time.point.name = "tau")
dm <- dm.addSizeChange(dm, parameter = "(1 + q) / 2", population=1, at.time="tau", par.new = FALSE)
dm <- dm.addSymmetricMigration(dm, 0.01, 5, new.par.name = "M")
dm <- dm.addMutation(dm, 1, 20, new.par.name = "theta")
@paulstaab
paulstaab / keybase.md
Last active October 31, 2015 15:38
keybase.md

Keybase proof

I hereby claim:

  • I am paulstaab on github.
  • I am paulstaab (https://keybase.io/paulstaab) on keybase.
  • I have a public key whose fingerprint is CC33 4592 9CB2 A317 3D76 B8E0 400D 56AF E600 4AD1

To claim this, I am signing this object:

dm <- dm.createDemographicModel(c(25,25), 100, 1000)
dm <- dm.addMutation(dm, 5, 20, new.par.name="theta")
dm <- dm.addRecombination(dm, fixed=5)
# Add parameters for the times and migration
dm <- dm.addParameter(dm, 'tau_0', 0.01, 1)
dm <- dm.addParameter(dm, 'tau_m', 0.1, 5)
dm <- dm.addParameter(dm, 'm', 0.1, 5)
# Add split and decreasing migration
nLoci <- 100
rho <- 5
dm <- dm.createDemographicModel(c(25,25), nLoci, 1000)
dm <- dm.addMutation(dm, 5, 20, new.par.name="theta")
dm <- dm.addSpeciationEvent(dm, 0.017, 20, new.time.point.name="tau")
dm <- dm.addSymmetricMigration(dm, 0.005, 5, new.par.name="m")
# Everything but a fixed recombination rate does not make sense
dm <- dm.addRecombination(dm, fixed=rho)