Skip to content

Commit

Permalink
Improve checking in parse with one term
Browse files Browse the repository at this point in the history
  • Loading branch information
Lev Levitsky committed Oct 7, 2024
1 parent c2613f1 commit c09bb47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyteomics/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def parse(sequence, show_unmodified_termini=False, split=False, allow_unknown_mo
if labels is None:
labels = std_labels
# we can try to resolve the ambiguity
if n != std_nterm and n not in labels and re.match(r'^[A-Z]+\-$', n) and all(aa in labels for aa in n[:-1]):
if n != std_nterm and n not in labels and valid(n[:-1], labels=labels):
# n is the body then
c = '-' + body
body = n[:-1]
Expand Down

0 comments on commit c09bb47

Please sign in to comment.