Hi,
I have come back to revisit msprime after a long break and have discovered what I was used to is now Legacy (version 0.x) APIs.
In version 0.x I would use this (described by Jerome as a bit of a hack) to simulate multiple chromosomes (in this case 2 chromosomes)
rho=2e-8
positions=[0, 1.0e7-1, 1.0e7, 2.0e7-1]
rates=[rho, 0.5, rho, 0]
num_bp=int(positions[-1])
recombination_map = msprime.RecombinationMap(
positions=positions, rates=rates, num_loci=num_bp)
I am not sure if version 1.0 has made it any less of a hack, but I am worried I am not doing it correctly. I gather one would now use
rate_map=msprime.RateMap(position=positions, rate=rates)
and the positions and rates vectors are constructed a little differently. I now have
positions = [0.0, 9999999.0, 10000000.0, 19999999.0]
rates = [2e-08, 0.5, 2e-08]
this yields
┌────────────────────────────────────────────────────┐
│left │right │ mid│ span│ rate│
├────────────────────────────────────────────────────┤
│0 │9999999 │ 4999999.5│ 9999999│ 2e-08│
│9999999 │10000000 │ 9999999.5│ 1│ 0.5│
│10000000 │19999999 │ 14999999.5│ 9999999│ 2e-08│
└────────────────────────────────────────────────────┘
I am not sure if the rates specified for any one span is the rate per base per generation within the span, or should I be specifying the rate over the span? Should rates for the first and last spans be 0.2 perhaps?
Hopefully someone can clarify this for me
RIchard