delt0r / msms

A coalsecent simulator with selection
www.mabs.at/ewing/msms
17 stars 7 forks source link

Rounding issue with msms segregating site positions #52

Open pandolfa opened 4 years ago

pandolfa commented 4 years ago

This is not a “bug” per se, but I have an issue with the way that msms rounds the segregating site positions to the nearest 1e-5. i.e.

// segsites: 2 positions: 0.50061 0.70488 10 00 00 00 01

This implies that if I am simulating a 1Mb region in a species with theta=0.01 per site (e.g. Drosophila), the segregating sites produced will be more evenly spaced than in real data, i.e. with spaces between segregating sites being in units of 10 bp.

Is there some way to adjust this rounding to allow the simulation of >1e5 bp regions?

Thanks, Peter

jckitch commented 4 years ago

@pandolfa I'm also having the same issue. Have you been able to resolve this? I'm thinking of moving to a different simulator with ms output functionality like Cosi2 but am wondering if you found anything better.

James

pandolfa commented 4 years ago

Yes, I have. My former grad student, Dr. Patrick Reilly, pointed out that one can add -oFormat 0.00000000 to the msms calls (assuming version 3.2 release candidate b163). It looks like the dev actually added the option in a while back, but never responded to the two Github issues about it (one in 2016 and mine). I don't think this is in the manual (?), but it's in the help if you do msms -h. The default is -oFormat 0.00000.