@@ -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 :
0 commit comments