Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyrho genetic maps #572

Merged
merged 2 commits into from
Aug 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 38 additions & 7 deletions stdpopsim/catalog/HomSap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
author="The International HapMap Consortium",
)

_takahata1993 = stdpopsim.Citation(
doi="https://doi.org/10.1093/oxfordjournals.molbev.a039995",
year="1993",
author="Takahata",
reasons={stdpopsim.CiteReason.POP_SIZE}
)

_tian2019 = stdpopsim.Citation(
doi="https://doi.org/10.1016/j.ajhg.2019.09.012",
year="2019",
Expand All @@ -75,13 +82,6 @@
reasons={stdpopsim.CiteReason.GEN_TIME}
)

_takahata1993 = stdpopsim.Citation(
doi="https://doi.org/10.1093/oxfordjournals.molbev.a039995",
year="1993",
author="Takahata",
reasons={stdpopsim.CiteReason.POP_SIZE}
)

_chromosomes = []
for name, data in genome_data.data["chromosomes"].items():
_chromosomes.append(stdpopsim.Chromosome(
Expand Down Expand Up @@ -174,6 +174,37 @@
)
_species.add_genetic_map(_gm)

# 26 populations in 1000 Genomes
for pop in ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM", "ESN",
"FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK",
"MSL", "MXL", "PEL", "PJL", "PUR", "STU", "TSI", "YRI"]:
_gm = stdpopsim.GeneticMap(
species=_species,
id="Pyrho{}_GRCh37".format(pop),
description="Pyrho population-specific map for {}".format(pop),
long_description="""
This genetic map was inferred using individuals from the {}
population from Phase 3 of the 1000 Genomes Project. Rates
were estimated using pyrho (https://github.com/popgenmethods/pyrho)
while using population-specific population size history estimates
obtained from smc++ (https://github.com/popgenmethods/smcpp).
Genetic maps are only available for the 22 autosomes.
See https://doi.org/10.1126/sciadv.aaw9206 for more
details.""".format(pop),
url=(
"https://stdpopsim.s3-us-west-2.amazonaws.com/genetic_maps/"
"HomSap/Pyrho{}_GRCh37.tar.gz".format(pop)),
file_pattern=(
"Pyrho{}_GRCh37_chr{{id}}.txt".format(pop)),
citations=[
stdpopsim.Citation(
Copy link
Member

@andrewkern andrewkern Jul 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe pull this citation out of here and set it to _spence_song_2019 as with the other citations?

year=2019,
author="Spence and Song",
doi="https://doi.org/10.1126/sciadv.aaw9206",
reasons={stdpopsim.CiteReason.GEN_MAP})]
)
_species.add_genetic_map(_gm)


###########################################################
#
Expand Down