Skip to content

Commit 4535bcd

Browse files
committed
Add error messages for VRS id lookups
1 parent 7b4dd8e commit 4535bcd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dcd_mapping/annotate.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,8 @@ def _get_mapped_reference_sequence(
456456
raise ValueError(msg)
457457
vrs_id = get_vrs_id_from_identifier(tx_output.np)
458458
if vrs_id is None:
459-
raise ValueError
459+
msg = "ID could not be acquired from Seqrepo for transcript identifier"
460+
raise ValueError(msg)
460461
return MappedReferenceSequence(
461462
sequence_type=TargetSequenceType.PROTEIN,
462463
sequence_id=vrs_id,
@@ -465,7 +466,8 @@ def _get_mapped_reference_sequence(
465466
seq_id = get_chromosome_identifier(align_result.chrom)
466467
vrs_id = get_vrs_id_from_identifier(seq_id)
467468
if vrs_id is None:
468-
raise ValueError
469+
msg = "ID could not be acquired from Seqrepo for chromosome identifier"
470+
raise ValueError(msg)
469471
return MappedReferenceSequence(
470472
sequence_type=TargetSequenceType.DNA,
471473
sequence_id=vrs_id,

0 commit comments

Comments
 (0)