Skip to content

Commit

Permalink
#2120 Export the structure for nucleotides 2-Amino-dA does not work …
Browse files Browse the repository at this point in the history
…correctly

Add code to check connection. Fix error messages. Add UTs.
  • Loading branch information
AliaksandrDziarkach committed Aug 30, 2024
1 parent 9ecac75 commit 3adf623
Show file tree
Hide file tree
Showing 14 changed files with 578 additions and 472 deletions.
5 changes: 5 additions & 0 deletions api/tests/integration/ref/formats/helm_to_ket.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ helm_rna_without_base.ket:SUCCEED
helm_simple_rna.ket:SUCCEED
helm_smiles.ket:SUCCEED
Test 'CHEM1{[A6OH]}|PEPTIDE1{A}$CHEM1,PEPTIDE1,1:R2-3:R1$$$V2.0': got expected error 'Polymer 'PEPTIDE1' does not contains monomer with number 3.'
Test 'CHEM1{[A6OH]}|PEPTIDE1{A}$CHEM1,PEPTIDE1,1:R4-1:R1$$$V2.0': got expected error 'Unknown attachment point 'R4' in monomer A6OH'
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: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 '-'.'
Test 'RNA1{R(bla-bla-bla)p}$$$$V2.0': got expected error 'Unexpected symbol. Expected ')' but found 'l'.'
1 change: 1 addition & 0 deletions api/tests/integration/ref/formats/ket_to_fasta.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
1822-peptide.fasta:SUCCEED
1843-rna.fasta:SUCCEED
1950-mixed-seq.fasta:SUCCEED
nucleotides.fasta:SUCCEED
5 changes: 5 additions & 0 deletions api/tests/integration/tests/formats/helm_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def find_diff(a, b):
"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": "Polymer 'PEPTIDE1' not found.",
"CHEM1{[A6OH]}|PEPTIDE1{A}$CHEM10,PEPTIDE1,1:R2-1:R1$$$V2.0": "Polymer 'CHEM10' not found.",
"CHEM1{[A6OH]}|PEPTIDE1{A}$CHEM1,PEPTIDE1,1:R2-3:R1$$$V2.0": "Polymer 'PEPTIDE1' does not contains monomer with number 3.",
"CHEM1{[A6OH]}|PEPTIDE1{A}$CHEM1,PEPTIDE1,1:R4-1:R1$$$V2.0": "Unknown attachment point 'R4' in monomer A6OH",
"CHEM1{[MCC]}|RNA1{R(U)P}$CHEM1,RNA1,1:R1-1:R2$$$V2.0": "Monomer 'R' attachment point 'R2' already connected to monomer'monomer3' attachment point 'R1'",
"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 '-'.",
}
for helm_seq in sorted(helm_errors.keys()):
error = helm_errors[helm_seq]
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/tests/formats/idt_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def find_diff(a, b):
"idt_52moera_sp_i2moera_sp": "/52MOErA/*/i2MOErA/*",
"idt_unresolved": "/unr1//unr2/",
"idt_unresolved_many": "/unr0/A/unr1/C/unr2/ACTG/unr3/G/unr4/",
"idt_unsplit": "/5UNSPLIT/A",
"idt_unsplit": "/5UNSPLIT//iUNSPLIT//3UNSPLIT/",
"idt_mixed_std": "ARAS",
"idt_mixed_custom": "(N1:10203050)(N1)N",
}
Expand Down
1 change: 1 addition & 0 deletions api/tests/integration/tests/formats/ket_to_fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def find_diff(a, b):
"1822-peptide",
"1843-rna",
"1950-mixed-seq",
"nucleotides",
]

lib = indigo.loadMonomerLibraryFromFile(
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/tests/formats/ket_to_idt.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def find_diff(a, b):
"idt_52moera_sp_32moera": "/52MOErA/*/32MOErA/",
"idt_i2moera_sp_32moera": "/52MOErA/*/32MOErA/",
"idt_52moera_sp_i2moera_sp": "/52MOErA/*/i2MOErA/*",
"idt_unsplit": "/5UNSPLIT/A",
"idt_unsplit": "/5UNSPLIT//iUNSPLIT//3UNSPLIT/",
"idt_more_than_80_chars": "/52MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//i2MOErA//3Phos/",
"idt_mixed_std": "ARAS",
"idt_mixed_custom": "(N1:10203050)(N1)N",
Expand Down
Loading

0 comments on commit 3adf623

Please sign in to comment.