trying to get to the bottom of some generic model issues and ran in to the following case.
Why am I getting the same number of trees out here when the maps are so different? @jeromekelleher @petrelharp
"""
test of genetic maps
"""
import stdpopsim as stp
import msprime as msp
seed = 12345
sample_size = 10
population = 0
mod = stp.homo_sapiens.GenericConstantSize()
chrStr = "chr20"
chrom = stp.homo_sapiens.genome.chromosomes[chrStr]
samples = [msp.Sample(population=population, time=0)] * sample_size
map1 = chrom.recombination_map()
ts1 = msp.simulate(
samples=samples,
recombination_map=map1,
mutation_rate=chrom.default_mutation_rate,
random_seed=seed,
**mod.asdict())
map2 = msp.RecombinationMap.uniform_map(chrom.length,
chrom.default_recombination_rate)
ts2 = msp.simulate(
samples=samples,
recombination_map=map2,
mutation_rate=chrom.default_mutation_rate,
random_seed=seed,
**mod.asdict())
print(map1.get_rates()[0:10])
print(map2.get_rates()[0:10])
print(ts1.num_trees)
print(ts2.num_trees)
# returns
# [0.0, 7.357160000000001e-09, 7.34243e-09, 7.34147e-09, 7.34513e-09, 7.42335e-09, # 7.42618e-09, 7.46463e-09, 7.19975e-08, 7.220007e-08]
# [1.7178269031631664e-08, 0.0]
#
# 96538
# 96538