tskit-dev / msprime

Simulate genealogical trees and genomic sequence data using population genetic models
GNU General Public License v3.0
170 stars 84 forks source link

multiallelic sites within the VCF #2266

Open LuisGFdez opened 4 months ago

LuisGFdez commented 4 months ago

Hello,

I am simulating STRs, and I've encountered instances where I'm obtaining sites with more than nine allelic states, which isn't supported by the VCF file format. Consequently, I'm considering how to manage these multiallelic sites within the VCF or if employing a sequence tree might be the simplest approach. In such a case, the ordering of the corresponding genotypes for each allelic state would align with the individuals assigned to the ancestry.

To provide context, my objective is to simulate STRs over millions of years across different species of great apes, exploring various evolutionary scenarios to understand the selection processes contributing to differences in STR composition among these species.

Additionally, I've observed that mutation sites occur at every position within the size of my chromosomes. I'm uncertain about the efficiency of simulating STRs in chromosomes with a size of 1e9 if I'll essentially obtain 1e9 mutation sites. Is there a method to restrict the number of sites where mutations can occur?

petrelharp commented 4 months ago

You can restrict the sites where mutations occur by passing in a RateMap to sim_mutations for the rate. That might be the best way to deal with this.

However, maybe a bigger issue is an issue with our STR mutation implementation: I think we really should have one mutation rate for initiation of new STRs and another (higher) one for subsequent mutation. Perhaps we should brainstorm the right way to do this.