popsim-consortium / analysis2

Analysis for the second consortium paper.
8 stars 14 forks source link

No mutation rate for OutOfAfricaArchaicAdmixture_5R19 #117

Closed silastittes closed 1 month ago

silastittes commented 3 months ago

Production pipeline is failing simulations. I think because the demographic model we're currently using doesn't have a mutation rate associated with it. Is this an issue for the catalogue itself? Happy to add an issue there too.

The tiny config uses OutOfAfrica_3G09. Perhaps we should just switch to that demography?

import stdpopsim
species = stdpopsim.get_species("HomSap")
species.get_demographic_model("OutOfAfricaArchaicAdmixture_5R19").mutation_rate #returns None
silastittes commented 3 months ago

Reading more, seems like the lack of mutation rate in this model is intentional, but still problematic for our purposes here.

lntran26 commented 3 months ago

I ran into this in #109 . The first paper used OutOfAfricaArchaicAdmixture_5R19 and the mean species mutation rate. I believe we decided to stick with OutOfAfricaArchaicAdmixture_5R19 instead of OutOfAfrica_3G09 to be consistent with the first paper. In my run I added a little if-else loop to handle this model like so:

        elif wildcards.demog == 'OutOfAfricaArchaicAdmixture_5R19':
            model = species.get_demographic_model(wildcards.demog)
            mutation_rate = species.genome.mean_mutation_rate

Not super elegant, but it should run.

andrewkern commented 3 months ago

hey Silas-- so in the case where a demographic model isn't associated with a mutation rate, we should just use the species default mutation rate. so in this case that would look something like

import stdpopsim as std

hs = std.get_species("HomSap")
mut_rate = hs.get_contig("1").mutation_rate # or whatever contig
silastittes commented 3 months ago

Sounds good. Thanks team!

silastittes commented 3 months ago

closed by #114