popsim-consortium / stdpopsim

A library of standard population genetic models
GNU General Public License v3.0
125 stars 87 forks source link

'recombination map not found' error for drosophila and arabidopsis models #57

Closed ckyriazis closed 5 years ago

ckyriazis commented 5 years ago

I've been trying to run the Arabidopsis model with the snakemake pipeline and have been getting the error:

UserWarning: Warning: recombination map not found for chromosome: 'chr5' on map: 'Salome2012', substituting a zero-recombination map.

even though I have no problem downloading the maps otherwise. I noticed this error also occurs with the Drosophila model but not the human or e. coli models.

Are others able to reproduce this error or is it something on my end? I'm wondering if it may be caused by some of the recent updates to recombination map behavior since I did not run into this error previously.

andrewkern commented 5 years ago

i have not seen this behavior personally, but there have been a bunch of merges recently and @jgallowa07 was complaining of similar behavior earlier today. @jgallowa07 can you describe what you did to stop this? IIRC it was just a version control issue

jeromekelleher commented 5 years ago

Sorry about this, there is definitely a bug in here somewhere, which I'm hoping to resolve as part of the refactor in #51. For the moment, can you try clearing out your cache fully (rm -r ~/.cache/stdpopsim) and rerunning?

jgallowa07 commented 5 years ago

Hmmm, I just pulled the bleeding edge from master, cleared my cache, re-ran the install, and seem to be getting the same thing again. It was definitely an older HEAD I used yesterday to get the recombination map.

jeromekelleher commented 5 years ago

Dammit, this is messy. If you run this code it should definitely sort it out:

import stdpopsim
import daiquiri

daiquiri.setup(level="INFO")
for key, genetic_map in stdpopsim.genetic_maps.registered_maps.items():
    print("downloading", key)
    genetic_map.download()

This will download all the maps into the cache, and should definitely resolve the problem. We'll get a proper and robust fix to this soon.

jeromekelleher commented 5 years ago

Should be cleared up now; faulty logic removed in #110.