I’m studying trans-species polymorphism and need to measure how long each allele remains segregating in my SLiM simulation. My setup uses an infinite alleles model with a single genomic position, where mutations have stackPolicy = "l" and convertToSubstitution = F (since each allele affects fitness calculations).
The challenge is that once an allele is lost from the population, I lose references to it, making it impossible to query all alleles at the end of the simulation. Even if I stored references, the Mutation class doesn’t track when an allele disappears (i.e., its "end" tick). To calculate segregation times within SLiM, I’d need to actively monitor all alleles each generation, checking which ones were lost and recording their duration -- but this seems inefficient.
As an alternative, I’m considering logging all mutation IDs to a file during the simulation and processing them afterward to determine segregation times. However, I’m unsure if this is the most optimal approach. Is there a better or built-in way in SLiM to track how long alleles persist before being lost? Any advice on streamlining this process would be greatly appreciated!
Cheers,
AM
It's a SLiM 5 model, but the technique will work fine in SLiM 4 too; you'd just need to remove the initializeChromosome() call and set up the range of the genomic element explicitly. :->
--
SLiM forward genetic simulation: http://messerlab.org/slim/
---
You received this message because you are subscribed to the Google Groups "slim-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/slim-discuss/903974a4-fbed-476d-a6bf-5fb87b823098n%40googlegroups.com.