Skip to content

Commit 20e604d

Browse files
committed
Remove TODO comments for which backlog entries have been created
1 parent e4b41b2 commit 20e604d

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

src/dcd_mapping/annotate.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,8 @@ def _get_computed_reference_sequence(
436436
# for accession-based target genes, the object returned by this function describes the provided reference accession
437437
# whereas the object returned by _get_mapped_reference_sequence describes the mapped reference accession, which could be a chromosome for ex.
438438
seq_type: TargetSequenceType
439-
# TODO full list of protein accession id prefixes
440439
if metadata.target_accession_id.startswith(("NP", "ENSP")):
441440
seq_type = TargetSequenceType.PROTEIN
442-
# TODO full list of transcript and contig accession id prefixes
443441
elif metadata.target_accession_id.startswith(("NM", "ENST", "NC")):
444442
seq_type = TargetSequenceType.DNA
445443
else:
@@ -452,8 +450,6 @@ def _get_computed_reference_sequence(
452450
)
453451
if layer == AnnotationLayer.PROTEIN:
454452
if tx_output is None or isinstance(tx_output, TxSelectError):
455-
# TODO catch this error - don't stop whole job for one failed target
456-
# raise ValueError
457453
return None
458454
seq_id = f"ga4gh:SQ.{sha512t24u(tx_output.sequence.encode('ascii'))}"
459455
return ComputedReferenceSequence(
@@ -488,15 +484,9 @@ def _get_mapped_reference_sequence(
488484
and isinstance(tx_output, TxSelectResult)
489485
):
490486
if tx_output.np is None:
491-
# TODO catch this error, don't fail whole job for one target
492-
# msg = "No NP accession associated with reference transcript"
493-
# raise ValueError(msg)
494487
return None
495488
vrs_id = get_vrs_id_from_identifier(tx_output.np)
496489
if vrs_id is None:
497-
# TODO catch this error, don't fail whole job for one target
498-
# msg = "ID could not be acquired from Seqrepo for transcript identifier"
499-
# raise ValueError(msg)
500490
return None
501491
return MappedReferenceSequence(
502492
sequence_type=TargetSequenceType.PROTEIN,
@@ -514,10 +504,7 @@ def _get_mapped_reference_sequence(
514504
seq_id = get_chromosome_identifier(align_result.chrom)
515505
vrs_id = get_vrs_id_from_identifier(seq_id)
516506
if vrs_id is None:
517-
# TODO catch this error, don't fail whole job for one target
518-
msg = "ID could not be acquired from Seqrepo for chromosome identifier"
519-
raise ValueError(msg)
520-
# return None
507+
return None
521508
return MappedReferenceSequence(
522509
sequence_type=TargetSequenceType.DNA,
523510
sequence_id=vrs_id,
@@ -584,9 +571,6 @@ def save_mapped_output_json(
584571
:return: output location
585572
"""
586573
# set preferred layers for each target, to allow a mix of coding and noncoding targets
587-
# TODO maybe this should be reevaluated and we should only allow one preferred layer per score set,
588-
# since I can't imagine an experimental assay where some variants are assayed as nucleotide variants
589-
# and others are assayed as amino acid variants.
590574
reference_sequences: dict[str, dict] = {}
591575
mapped_scores: list[ScoreAnnotation] = []
592576
for target_gene in mappings:

src/dcd_mapping/mavedb_data.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ def get_scoreset_metadata(
190190

191191
for gene in metadata["targetGenes"]:
192192
if not _metadata_response_is_human(metadata):
193-
# TODO allow score sets with mix of human and non-human targets? This may not come up, but is doable with a little restructuring.
194193
msg = f"Experiment for {scoreset_urn} contains non-human targets"
195194
raise ScoresetNotSupportedError(msg)
196195
try:
@@ -251,15 +250,12 @@ def _load_scoreset_records(
251250
else:
252251
row["score"] = row["score"]
253252
if row["hgvs_nt"] != "NA":
254-
# TODO check assumption of no colon in hgvs unless reference sequence identifier present
255253
prefix = row["hgvs_nt"].split(":")[0] if ":" in row["hgvs_nt"] else None
256254
elif row["hgvs_pro"] != "NA":
257-
# TODO check assumption of no colon in hgvs unless reference sequence identifier present
258255
prefix = (
259256
row["hgvs_pro"].split(":")[0] if ":" in row["hgvs_pro"] else None
260257
)
261258
else:
262-
# Should we quit the whole mapping job if this comes up, or just skip this row and only quit if none contain hgvs_nt or hgvs_pro?
263259
msg = f"Each score row in {metadata.urn} must contain hgvs_nt or hgvs_pro variant description "
264260
raise ScoresetNotSupportedError(msg)
265261
# If no reference sequence prefix is provided, the score set should only have one

0 commit comments

Comments
 (0)