Skip to content

Commit 5422a27

Browse files
committed
Update todo issue links
1 parent cbacaef commit 5422a27

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/mavedb/scripts/populate_mapped_hgvs.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def populate_mapped_hgvs(db: Session, urns: Sequence[Optional[str]], all: bool):
105105
logger.info(
106106
f"Processing variant {v_idx+1}/{num_variants} ({variant_urn}) for score set {score_set.urn} ({idx+1}/{len(urns)})."
107107
)
108-
# NOTE: get_hgvs_from_post_mapped currently does not support multi-variants
108+
# TODO#469: support multi-target score sets
109109
# returns None if no post-mapped object or if multi-variant
110110
hgvs_assay_level = get_hgvs_from_post_mapped(mapped_variant.post_mapped)
111111

@@ -114,7 +114,7 @@ def populate_mapped_hgvs(db: Session, urns: Sequence[Optional[str]], all: bool):
114114
hgvs_p: Optional[str] = None
115115

116116
# NOTE: if no clingen allele id, could consider searching clingen using hgvs_assay_level. for now, skipping variant if no clingen allele id in db
117-
# TODO skipping multi-variants for now
117+
# TODO#469: implement support for multi-variants
118118
if mapped_variant.clingen_allele_id and len(mapped_variant.clingen_allele_id.split(",")) == 1:
119119
response = requests.get(f"{CLINGEN_API_URL}/{mapped_variant.clingen_allele_id}")
120120
if response.status_code != 200:
@@ -147,7 +147,7 @@ def populate_mapped_hgvs(db: Session, urns: Sequence[Optional[str]], all: bool):
147147
# no transcript specified, use mane if available
148148
for allele in data["transcriptAlleles"]:
149149
if allele.get("MANE"):
150-
# TODO consider prioritizing mane select over other mane statuses
150+
# TODO#571 consider prioritizing certain MANE transcripts (e.g. MANE Select)
151151
hgvs_c = allele["MANE"].get("nucleotide", {}).get("RefSeq", {}).get("hgvs")
152152
hgvs_p = allele["MANE"].get("protein", {}).get("RefSeq", {}).get("hgvs")
153153
break
@@ -160,8 +160,6 @@ def populate_mapped_hgvs(db: Session, urns: Sequence[Optional[str]], all: bool):
160160
hgvs_p = allele["hgvs"][0]
161161
break
162162

163-
# TODO should we check that assay level hgvs mtches either g. or p.?
164-
165163
mapped_variant.hgvs_assay_level = hgvs_assay_level
166164
mapped_variant.hgvs_g = hgvs_g
167165
mapped_variant.hgvs_c = hgvs_c
@@ -181,9 +179,6 @@ def populate_mapped_hgvs(db: Session, urns: Sequence[Optional[str]], all: bool):
181179
logger.info(f"Rolling back all changes for scoreset {score_set.urn}")
182180
db.rollback()
183181

184-
# TODO if accession based and no post mapped object, use original variant hgvs if available?
185-
# the problem with this is that it would be c. in a lot of cases, and we want g. if possible, since we map to the genome for c./n./g. variants
186-
187182
logger.info(f"Done with score set {score_set.urn}. ({idx+1}/{len(urns)}).")
188183

189184
logger.info("Done populating mapped hgvs.")

0 commit comments

Comments
 (0)