1) Does the input file genMap have to match the legend length?
Not exactly. Treesim interpolates missing genetic map positions:
In read_data.cpp there’s a phys2gen (“physical position to genetic position”) helper that linearly interpolates the genetic map at each SNP position. The genetic map is dense, so this is reasonable. SNPs not present in the map are assigned positions by interpolation.
2) What does coal_fast do?
coal_fast is an algorithmic shortcut. The program chooses events more heuristically than the full method described in my thesis, my thesis.
When coal_fast is enabled, treesim picks event types using prior weights, then picks specific events randomly. For coalescence/mutation, it skips full likelihood checks and chooses uniformly; for recombination, it still uses the IS approach. If recombination is high relative to other events, it will fall back to the full IS scheme.
In LookD_Copy.cpp:
use_dynamic_programming = !(coal_fast && !(con.rec_rate/con.evnt_rate > con.threshold));
Meaning: use the full dynamic programming method unless coal_fast is on and the recombination rate share is below the threshold.
Tip: if you want fast genealogies, consider lowering recombination rates; the heuristic tends to place more recombinations than you might want.
Downloads
- Manual
- Limited instructions
- Code — if it doesn't work you can try emailing me (niallc@gmail.com) for the software, but it's been around 15 years since I've touched it...