Skip to content

Commit

Permalink
#1912 Support unresolved IDT monomers (no structure, IDT only) (#1988)
Browse files Browse the repository at this point in the history
Merge from master to 1.21
  • Loading branch information
AliaksandrDziarkach committed Jun 6, 2024
1 parent 9194599 commit 408f996
Show file tree
Hide file tree
Showing 31 changed files with 4,104 additions and 339 deletions.
17 changes: 9 additions & 8 deletions api/tests/integration/ref/formats/idt_to_ket.py.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
*** IDT to KET ***
idt_52moera.ket:SUCCEED
idt_52moera_with_3phos.ket:SUCCEED
idt_bases.ket:SUCCEED
idt_i2moera.ket:SUCCEED
idt_i2moera_t.ket:SUCCEED
idt_many_molecules.ket:SUCCEED
idt_mixed.ket:SUCCEED
idt_mod_phosphates.ket:SUCCEED
Expand All @@ -9,25 +12,23 @@ idt_prefix_suffix.ket:SUCCEED
idt_singe_32moera_nucleoside.ket:SUCCEED
idt_single_nucleoside.ket:SUCCEED
idt_std_phosphates.ket:SUCCEED
idt_t_i2moera.ket:SUCCEED
idt_unresolved.ket:SUCCEED
Test '!+A-$#12w12r23e32e33': got expected error 'Invalid symbols in the sequence: !,-,$,#,1,2,w,1,2,2,3,e,3,2,e,3,3'
Test '+/5Phos/A': got expected error 'Sugar prefix could not be used with modified monomer.'
Test '/': got expected error 'Unexpected end of data'
Test '//': got expected error 'Invalid modification: empty string.'
Test '/32MOErA/T': got expected error 'IDT alias 32MOErA not found at five-prime end position.'
Test '/3Phos/T': expected error 'IDT alias 3Phos not found at three-prime end position.' but got 'SEQUENCE loader: IDT alias 3Phos not found at five-prime end position.'
Test '/52MOErA/': got expected error 'IDT alias 52MOErA not found at three-prime end position.'
Test '/32MOErA/T': got expected error 'IDT alias '32MOErA' cannot be used at five prime end.'
Test '/3Phos/T': got expected error 'IDT alias '3Phos' cannot be used at five prime end.'
Test '/5Phos/*A': got expected error '/5Phos/ cannot be modified to 'sP''
Test '/a/': got expected error 'Invalid modification: a.'
Test '/i2MOErA/': got expected error 'IDT alias i2MOErA not found at three-prime end position.'
Test '/i2MOErA/T': got expected error 'IDT alias i2MOErA not found at five-prime end position.'
Test 'A*': got expected error 'Invalid IDT sequence: '*' couldn't be the last symbol.'
Test 'A*/3Phos/': got expected error 'Phosphor /3Phos/ cannod be modified with '*'.'
Test 'A+/3Phos/': got expected error 'Sugar prefix could not be used with modified monomer.'
Test 'Am/3Phos/': got expected error 'Sugar prefix could not be used with modified monomer.'
Test 'Ar/3Phos/': got expected error 'Sugar prefix could not be used with modified monomer.'
Test 'T/52MOErA/': got expected error 'IDT alias 52MOErA not found at three-prime end position.'
Test 'T/5Phos/': got expected error 'IDT alias 5Phos not found at three-prime end position.'
Test 'T/i2MOErA/': got expected error 'IDT alias i2MOErA not found at three-prime end position.'
Test 'T/52MOErA/': got expected error 'IDT alias '52MOErA' cannot be used at three prime end.'
Test 'T/5Phos/': got expected error 'IDT alias '5Phos' cannot be used at three prime end.'
Test 'm/5Phos/A': got expected error 'Sugar prefix could not be used with modified monomer.'
Test 'r+A': got expected error 'Sugar prefix 'r' whithout base.'
Test 'r/5Phos/A': got expected error 'Sugar prefix could not be used with modified monomer.'
2 changes: 2 additions & 0 deletions api/tests/integration/ref/formats/ket_to_idt.py.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** KET to IDT ***
idt_52moera_with_3phos.ket:SUCCEED
idt_bases.ket:SUCCEED
idt_i2moera_t.ket:SUCCEED
idt_many_molecules.ket:SUCCEED
idt_mixed.ket:SUCCEED
idt_mod_phosphates.ket:SUCCEED
Expand All @@ -9,6 +10,7 @@ idt_prefix_suffix.ket:SUCCEED
idt_singe_32moera_nucleoside.ket:SUCCEED
idt_single_nucleoside.ket:SUCCEED
idt_std_phosphates.ket:SUCCEED
idt_unresolved.ket:SUCCEED
Test ket-to-idt-invalid-last-phosphate: got expected error 'Cannot save molecule in IDT format - phosphate sP cannot be last monomer in sequence.'
Test ket-to-idt-invalid-nucleotide: got expected error 'IDT alias for group sugar:m2e2r base:z8c3G phosphate:mepo2 not found.'
Test ket-to-idt-invalid-posphates: got expected error 'Cannot save molecule in IDT format - sugar R with too much phosphates connected P and P.'
Expand Down
17 changes: 9 additions & 8 deletions api/tests/integration/tests/formats/idt_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def find_diff(a, b):
"idt_mod_phosphates": "/5Phos//i2MOErC//3Phos/",
"idt_mixed": "/5Phos/+A*/i2MOErA/*rG/3Phos/",
"idt_many_molecules": "ACTG\n/52MOErA/*AU/3Phos/\rAC/i2MOErC//3Phos/\n\rTACG",
"idt_i2moera": "/i2MOErA/",
"idt_52moera": "/52MOErA/",
"idt_i2moera_t": "/i2MOErA/T",
"idt_t_i2moera": "T/i2MOErA/",
"idt_unresolved": "/unr1//unr2/",
}

lib = indigo.loadMoleculeFromFile(
Expand Down Expand Up @@ -66,14 +71,10 @@ def find_diff(a, b):
"/a/": "Invalid modification: a.",
"r+A": "Sugar prefix 'r' whithout base.",
"A*": "Invalid IDT sequence: '*' couldn't be the last symbol.",
"/i2MOErA/": "IDT alias i2MOErA not found at three-prime end position.",
"/i2MOErA/T": "IDT alias i2MOErA not found at five-prime end position.",
"T/i2MOErA/": "IDT alias i2MOErA not found at three-prime end position.",
"/32MOErA/T": "IDT alias 32MOErA not found at five-prime end position.",
"/52MOErA/": "IDT alias 52MOErA not found at three-prime end position.",
"T/52MOErA/": "IDT alias 52MOErA not found at three-prime end position.",
"/3Phos/T": "IDT alias 3Phos not found at three-prime end position.",
"T/5Phos/": "IDT alias 5Phos not found at three-prime end position.",
"/32MOErA/T": "IDT alias '32MOErA' cannot be used at five prime end.",
"T/52MOErA/": "IDT alias '52MOErA' cannot be used at three prime end.",
"/3Phos/T": "IDT alias '3Phos' cannot be used at five prime end.",
"T/5Phos/": "IDT alias '5Phos' cannot be used at three prime end.",
"/5Phos/*A": "/5Phos/ cannot be modified to 'sP'",
"r/5Phos/A": "Sugar prefix could not be used with modified monomer.",
"+/5Phos/A": "Sugar prefix could not be used with modified monomer.",
Expand Down
5 changes: 5 additions & 0 deletions api/tests/integration/tests/formats/ket_to_idt.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def find_diff(a, b):
"idt_mod_phosphates": "/5Phos//i2MOErC//3Phos/",
"idt_mixed": "/5Phos/+A*/i2MOErA/*rG/3Phos/",
"idt_many_molecules": "ACTG\n/52MOErA/*AU/3Phos/\nAC/i2MOErC//3Phos/\nTACG",
# "idt_i2moera": "/i2MOErA/",
# "idt_52moera": "/52MOErA/",
"idt_i2moera_t": "/52MOErA/T",
# "idt_t_i2moera": "T/i2MOErA/",
"idt_unresolved": "/unr1//unr2/",
}

for filename in sorted(idt_data.keys()):
Expand Down
3 changes: 3 additions & 0 deletions api/tests/integration/tests/formats/ref/chem.ket
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"name": "cch",
"attachmentPoints": [
{
"id": "Br",
"type": "right",
"label": "R2",
"attachmentAtom": 8,
Expand All @@ -27,6 +28,7 @@
}
},
{
"id": "Cx",
"type": "side",
"label": "R3",
"attachmentAtom": 6,
Expand All @@ -37,6 +39,7 @@
}
},
{
"id": "Ex",
"type": "side",
"label": "R5",
"attachmentAtom": 3,
Expand Down
3 changes: 2 additions & 1 deletion api/tests/integration/tests/formats/ref/conj_no_class.mol
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ M V30 41 Cys 20.1724 -16.6666 0.0 0 CLASS=AA SEQID=16 ATTCHORD=(4 34 Al 35 B-
M V30 r)
M V30 42 Cys 17.8843 -16.6666 0.0 0 CLASS=AA SEQID=10 ATTCHORD=(4 29 Al 30 B-
M V30 r)
M V30 43 SMCC 14.1885 -2.31085 0.0 0 CLASS=LINKER ATTCHORD=(4 40 Br 39 Al)
M V30 43 SMCC 14.1885 -2.31085 0.0 0 CLASS=LINKER SEQID=1 ATTCHORD=(4 40 Br -
M V30 39 Al)
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 2 1
Expand Down
1 change: 1 addition & 0 deletions api/tests/integration/tests/formats/ref/fmoc.ket
Original file line number Diff line number Diff line change
Expand Up @@ -4091,6 +4091,7 @@
"name": "Fmoc",
"attachmentPoints": [
{
"id": "Cx",
"type": "side",
"label": "R3",
"attachmentAtom": 16
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/tests/formats/ref/fmoc.mol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ M V30 )
M V30 30 Gly 23.2645 -6.2109 0.0 0 CLASS=AA SEQID=31 ATTCHORD=(2 29 Al)
M V30 31 E 16.1313 -5.15906 0.0 0 CLASS=MODAA SEQID=21 ATTCHORD=(6 32 Cx 20 -
M V30 Al 21 Br)
M V30 32 Fmoc 15.7704 -3.60196 0.0 0 CLASS=LINKER ATTCHORD=(2 31 Cx)
M V30 32 Fmoc 15.7704 -3.60196 0.0 0 CLASS=LINKER SEQID=1 ATTCHORD=(2 31 Cx)
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
Expand Down

0 comments on commit 408f996

Please sign in to comment.