Skip to content

Commit

Permalink
#2266 Error message is wrong for missing ratio number (PEPTIDE1{(A:+…
Browse files Browse the repository at this point in the history
…C:0.1)}$$$$V2.0) (#2285)
  • Loading branch information
AliaksandrDziarkach authored Aug 30, 2024
1 parent b2f4a53 commit f16868d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/tests/integration/ref/formats/helm_to_ket.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Test 'CHEM1{[A6OH]}|PEPTIDE1{A}$CHEM1,PEPTIDE1,1:R4-1:R1$$$V2.0': got expected e
Test 'CHEM1{[A6OH]}|PEPTIDE1{A}$CHEM10,PEPTIDE1,1:R2-1:R1$$$V2.0': got expected error 'Polymer 'CHEM10' not found.'
Test 'CHEM1{[MCC]}|RNA1{R(A)P.R(C)P.R(G)P.R(T)P.R(U)P}$RNA1,PEPTIDE1,15:R2-1:R1$$$V2.0': got expected error 'Polymer 'PEPTIDE1' not found.'
Test 'CHEM1{[MCC]}|RNA1{R(U)P}$CHEM1,RNA1,1:R1-1:R2$$$V2.0': got expected error 'Monomer 'R' attachment point 'R2' already connected to monomer'monomer3' attachment point 'R1''
Test 'PEPTIDE1{(A:+C:0.1)}$$$$V2.0': got expected error 'Unexpected symbol. Expected digit but found '+''
Test 'PEPTIDE1{(A:1.5+C:aaaa)}$$$$V2.0': got expected error 'Unexpected symbol. Expected '+' or ',' but found '.''
Test 'PEPTIDE1{A'2'}$$$$V2.0': got expected error 'Repeating not supported now.'
Test 'PEPTIDE1{D-gGlu}$$$$V2.0': got expected error 'Unexpected symbol. Expected '.' or '}' but found '-'.'
Expand Down
1 change: 1 addition & 0 deletions api/tests/integration/tests/formats/helm_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def find_diff(a, b):
"PEPTIDE1{(A:1.5+C:aaaa)}$$$$V2.0": "Unexpected symbol. Expected '+' or ',' but found '.'",
"RNA1{R(bla-bla-bla)p}$$$$V2.0": "Unexpected symbol. Expected ')' but found 'l'.",
"PEPTIDE1{D-gGlu}$$$$V2.0": "Unexpected symbol. Expected '.' or '}' but found '-'.",
"PEPTIDE1{(A:+C:0.1)}$$$$V2.0": "Unexpected symbol. Expected digit but found '+'",
}
for helm_seq in sorted(helm_errors.keys()):
error = helm_errors[helm_seq]
Expand Down
2 changes: 1 addition & 1 deletion core/indigo-core/molecule/src/sequence_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ int SequenceLoader::readCount(std::string& count, Scanner& _scanner)
ch = _scanner.lookNext();
}
if (count.size() == 0)
throw Error("Invalid number.");
throw Error("Unexpected symbol. Expected digit but found '%c'", ch);
}
return ch;
}
Expand Down

0 comments on commit f16868d

Please sign in to comment.