We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6e238e commit 957d25cCopy full SHA for 957d25c
1 file changed
pyhgvs/__init__.py
@@ -851,6 +851,11 @@ def parse_allele(self, allele):
851
852
if kind in ("c", 'n'):
853
self.parse_cdna(details)
854
+ if kind == 'n': # Ensure no 3'UTR or 5'UTR coords in non-coding
855
+ if self.cdna_start.coord < 0:
856
+ raise InvalidHGVSName(allele, 'allele', "Non-coding transcript cannot contain negative (5'UTR) coordinates")
857
+ if self.cdna_start.landmark == 'cdna_stop' or self.cdna_end and self.cdna_end.landmark == 'cdna_stop':
858
+ raise InvalidHGVSName(allele, 'allele', "Non-coding transcript cannot contain '*' (3'UTR) coordinates")
859
elif kind == "p":
860
self.parse_protein(details)
861
elif kind == "g":
0 commit comments