Skip to content

Commit

Permalink
Add error messages for VRS id lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
sallybg committed Aug 26, 2024
1 parent 7b4dd8e commit 4535bcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dcd_mapping/annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ def _get_mapped_reference_sequence(
raise ValueError(msg)
vrs_id = get_vrs_id_from_identifier(tx_output.np)
if vrs_id is None:
raise ValueError
msg = "ID could not be acquired from Seqrepo for transcript identifier"
raise ValueError(msg)
return MappedReferenceSequence(
sequence_type=TargetSequenceType.PROTEIN,
sequence_id=vrs_id,
Expand All @@ -465,7 +466,8 @@ def _get_mapped_reference_sequence(
seq_id = get_chromosome_identifier(align_result.chrom)
vrs_id = get_vrs_id_from_identifier(seq_id)
if vrs_id is None:
raise ValueError
msg = "ID could not be acquired from Seqrepo for chromosome identifier"
raise ValueError(msg)
return MappedReferenceSequence(
sequence_type=TargetSequenceType.DNA,
sequence_id=vrs_id,
Expand Down

0 comments on commit 4535bcd

Please sign in to comment.