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

adding assembly_name attribute #1650

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions stdpopsim/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class Annotation:
:vartype citations: list of :class:`.Citation`
:ivar file_pattern: The pattern used to map individual chromosome id strings
to files
:ivar assembly_name: The name of the genome assembly.
:vartype assembly_name: str
:ivar str assembly_name: The name of the assembly the annotation is based on
"""

id = attr.ib()
Expand All @@ -40,6 +43,7 @@ class Annotation:
file_pattern = attr.ib()
annotation_source = attr.ib()
annotation_type = attr.ib()
assembly_name = attr.ib()

def __attrs_post_init__(self):
self._cache = stdpopsim.CachedData(
Expand Down
3 changes: 3 additions & 0 deletions stdpopsim/catalog/AraTha/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
file_pattern="araport_exons_{id}.txt",
annotation_source="araport11",
annotation_type="exon",
assembly_name = "TAIR10"
)
_species.add_annotations(_an)

Expand Down Expand Up @@ -56,5 +57,7 @@
file_pattern="araport_CDS_{id}.txt",
annotation_source="araport11",
annotation_type="CDS",
assembly_name = "TAIR10"

)
_species.add_annotations(_an2)
2 changes: 2 additions & 0 deletions stdpopsim/catalog/DroMel/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
file_pattern="flybase_exons_{id}.txt",
annotation_source="FlyBase",
annotation_type="exon",
assembly_name="BDGP6.32.51",
)
_species.add_annotations(_an)

Expand Down Expand Up @@ -57,5 +58,6 @@
file_pattern="flybase_CDS_{id}.txt",
annotation_source="FlyBase",
annotation_type="CDS",
assembly_name="BDGP6.32.51",
)
_species.add_annotations(_an2)
2 changes: 2 additions & 0 deletions stdpopsim/catalog/HomSap/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
file_pattern="ensembl_havana_exons_{id}.txt",
annotation_source="ensembl_havana",
annotation_type="exon",
assembly_name = "GRCh38.p13"
)
_species.add_annotations(_an)

Expand Down Expand Up @@ -56,5 +57,6 @@
file_pattern="ensembl_havana_CDS_{id}.txt",
annotation_source="ensembl_havana",
annotation_type="CDS",
assembly_name = "GRCh38.p13",
)
_species.add_annotations(_an2)
5 changes: 5 additions & 0 deletions stdpopsim/catalog/HomSap/genetic_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
sha256="80f22d9e6cb0e497074ed1bc277e765fa9d8e22f21b2f66c3b10286520f6b68f",
file_pattern="genetic_map_GRCh37_chr{id}.txt",
citations=[_hapmap2007.because(stdpopsim.CiteReason.GEN_MAP)],
assembly_name="GRCh37",
)
_species.add_genetic_map(_gm)

Expand Down Expand Up @@ -60,6 +61,7 @@
sha256="497512ed1c0f8a40e9aa13696049a9f8c3cb062e898921cfd7d85ce9d14c4baa",
file_pattern="genetic_map_Hg38_chr{id}.txt",
citations=[_hapmap2007.because(stdpopsim.CiteReason.GEN_MAP)],
assembly_name="GRCh38.p13",
)
_species.add_genetic_map(_gm)

Expand Down Expand Up @@ -90,6 +92,7 @@
reasons={stdpopsim.CiteReason.GEN_MAP},
)
],
assembly_name="GRCh36",
)
_species.add_genetic_map(_gm)

Expand Down Expand Up @@ -131,6 +134,7 @@
reasons={stdpopsim.CiteReason.GEN_MAP},
)
],
assembly_name="GRCh38.p13",
)
_species.add_genetic_map(_gm)

Expand Down Expand Up @@ -223,5 +227,6 @@
reasons={stdpopsim.CiteReason.GEN_MAP},
)
],
assembly_name="GRCh38.p13",
)
_species.add_genetic_map(_gm)
2 changes: 2 additions & 0 deletions stdpopsim/catalog/PhoSin/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
file_pattern="Phocoena_sinus.mPhoSin1.pri.110_exon_{id}.txt",
annotation_source="ensembl",
annotation_type="exon",
assembly_name="mPhoSin1.pri",
)
_species.add_annotations(_an)

Expand Down Expand Up @@ -56,5 +57,6 @@
file_pattern="Phocoena_sinus.mPhoSin1.pri.110_CDS_{id}.txt",
annotation_source="ensembl",
annotation_type="CDS",
assembly_name="mPhoSin1.pri",
)
_species.add_annotations(_an2)
2 changes: 2 additions & 0 deletions stdpopsim/genetic_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(
description=None,
long_description=None,
citations=None,
assembly_name=None,
):
self.id = id
self.species = species
Expand All @@ -45,6 +46,7 @@ def __init__(
self.file_pattern = file_pattern
self.description = description
self.citations = citations
self.assembly_name = assembly_name

self._cache = stdpopsim.CachedData(
namespace=f"genetic_maps/{self.species.id}/{id}",
Expand Down
Loading