statgenlmu / coala

A Framework for Coalescent Simulation in R
Other
22 stars 4 forks source link

Loci length limit? #207

Open ckastall opened 4 years ago

ckastall commented 4 years ago

Thank you for this very useful package.

Trying to simulate long sequences I have the following error message:

The sum of the partition lengths in the treefile does not equal the specified number of sites.

This seems to happen only if I define a model with loci_length > 99998.

Here is the exact commands I am running:

# No problem with this model:
model <- coal_model(c(20, 1), 2, loci_length = 99998) +
        feat_outgroup(2) +
        feat_pop_merge(0.5, 2, 1) +
        feat_mutation(5, model = "GTR", gtr_rates = 1:6)

res <- simulate(model)

# This one won't run:
model <- coal_model(c(20, 1), 2, loci_length = 99999) +
        feat_outgroup(2) +
        feat_pop_merge(0.5, 2, 1) +
        feat_mutation(5, model = "GTR", gtr_rates = 1:6)

res <- simulate(model)

I have tried with both simulators scrm and ms, the problem seems to be the same.