Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1800 only one of the R groups is saved to CDX format #1956

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/version.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1.21.0
dev
3
6

06abd97c62e7e31f12c5c13d4772cbfc7f0e9154fbe2ffc657902f2ca084e561
e09af5d158c0b3735c76498fb07c11836ca7f74bf6e49a071c3f92486fbe4c40
4 changes: 2 additions & 2 deletions .github/workflows/indigo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ jobs:
build_indigo_ketcher:
runs-on: ubuntu-latest
needs: static_analysis
container: emscripten/emsdk:1.40.1
container: emscripten/emsdk:3.1.60
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -817,7 +817,7 @@ jobs:
build_indigo_ketcher_cjk:
runs-on: ubuntu-latest
needs: static_analysis
container: emscripten/emsdk:1.40.1
container: emscripten/emsdk:3.1.60
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions api/c/indigo-inchi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ if (NOT EMSCRIPTEN)
target_include_directories(${PROJECT_NAME}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/)

if(MSVC)
target_link_options(${PROJECT_NAME}
PRIVATE -force:multiple)
endif()

if(UNIX AND NOT APPLE)
target_link_options(${PROJECT_NAME} PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/libindigo-inchi.sym)
endif()
Expand Down
2 changes: 1 addition & 1 deletion api/dotnet/src/Indigo.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<Version>1.21.0-dev.3</Version>
<Version>1.21.0-dev.6</Version>
<Authors>EPAM Systems Life Science Department</Authors>
<Company>EPAM Systems</Company>
<Description>Universal cheminformatics toolkit</Description>
Expand Down
2 changes: 1 addition & 1 deletion api/http/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
anyio==3.7.0
asgiref==3.7.1
click==8.1.3
epam.indigo==1.21.0.dev3
epam.indigo==1.21.0.dev6
fastapi==0.95.2
h11==0.14.0
idna==3.4
Expand Down
2 changes: 1 addition & 1 deletion api/http/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

setup_kwargs = {
"name": "indigo-service",
"version": "1.21.0.dev3",
"version": "1.21.0.dev6",
"description": "",
"long_description": None,
"author": "Ruslan Khyurri",
Expand Down
2 changes: 1 addition & 1 deletion api/indigo-version.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(INDIGO_DEFAULT_VERSION "1.21.0-dev.3")
set(INDIGO_DEFAULT_VERSION "1.21.0-dev.6")
set(INDIGO_MAX_REVISION 1000)
find_package(Git)
if(GIT_EXECUTABLE)
Expand Down
2 changes: 1 addition & 1 deletion api/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<revision>1.21.0-dev.3</revision>
<revision>1.21.0-dev.6</revision>
</properties>

<licenses>
Expand Down
2 changes: 1 addition & 1 deletion api/python/indigo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .indigo.indigo_exception import IndigoException # noqa
from .indigo.indigo_object import IndigoObject # noqa

__version__ = "1.21.0.dev3"
__version__ = "1.21.0.dev6"
2 changes: 1 addition & 1 deletion api/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

setup(
name="epam.indigo",
version="1.21.0.dev3",
version="1.21.0.dev6",
description="Indigo universal cheminformatics toolkit",
author="EPAM Systems Life Science Department",
author_email="[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion api/r/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: rindigo
Version: 1.21.0-dev.3
Version: 1.21.0-dev.6
Date: 2020-12-10
Title: R Package for Indigo Toolkit
Authors@R: c(person(given = "Mikhail", family = "Kviatkovskii", role = c("cre"),
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/ref/formats/fasta_to_ket.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ test_rna.ket:SUCCEED
test_dna.ket:SUCCEED
multiseq.ket:SUCCEED
break_peptide.ket:SUCCEED
break_rna.fasta:SEQUENCE loader: SequenceLoader::loadFasta(), Invalid symbols in the sequence: *
break_rna.fasta:SEQUENCE loader: Invalid symbols in the sequence: *
comment.ket:SUCCEED
test_1881.ket:SUCCEED
16 changes: 9 additions & 7 deletions api/tests/integration/ref/formats/idt_to_ket.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ idt_prefix_suffix.ket:SUCCEED
idt_singe_32moera_nucleoside.ket:SUCCEED
idt_single_nucleoside.ket:SUCCEED
idt_std_phosphates.ket:SUCCEED
Test '!+-$#12w12r23e32e33': got expected error 'SequenceLoader::loadIdt(), 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 '/5Phos/''
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.'
Expand All @@ -21,11 +21,13 @@ 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 'Sugar prefix could not be used with '/3Phos/''
Test 'Am/3Phos/': got expected error 'Sugar prefix could not be used with '/3Phos/''
Test 'Ar/3Phos/': got expected error 'Sugar prefix could not be used with '/3Phos/''
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 'm/5Phos/A': got expected error 'Sugar prefix could not be used with '/5Phos/''
Test 'r/5Phos/A': got expected error 'Sugar prefix could not be used with '/5Phos/''
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.'
1 change: 1 addition & 0 deletions api/tests/integration/ref/formats/ket_cdxml.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ multi_overlap.cdxml:SUCCEED
multi_overlap.ket:SUCCEED
*** KET to CDXML ***
963-super.cdxml:SUCCEED
R3R4R5.cdxml:SUCCEED
10 changes: 5 additions & 5 deletions api/tests/integration/ref/formats/ket_to_idt.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ idt_prefix_suffix.ket:SUCCEED
idt_singe_32moera_nucleoside.ket:SUCCEED
idt_single_nucleoside.ket:SUCCEED
idt_std_phosphates.ket:SUCCEED
Test ket-to-idt-invalid-last-phosphate: got expected error 'Canot save molecule in IDT format - phosphate sP cannot be last monomer in sequence.'
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 'Canot save molecule in IDT format - sugar R with too much phosphates connected P and P.'
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.'
Test ket-to-idt-invalid-sugar: got expected error 'IDT alias for sugar:m2e2r not found.'
Test ket-to-idt-invalid-sugar-base: got expected error 'IDT alias for group sugar:m2e2r base:z8c3G not found.'
Test ket-to-idt-invalid-sugar-phosphate: got expected error 'IDT alias for group sugar:m2e2r phosphate:mepo2 not found.'
Test ket-to-idt-peptide: got expected error 'Canot save molecule in IDT format - AA monomer DPhe4C cannot be first.'
Test ket-to-idt-r1r1connection: got expected error 'Canot save molecule in IDT format - sugar MOE connected to monomer MOE with class SUGAR (only base or phosphate expected).'
Test ket-to-idt-two-bases: got expected error 'Canot save molecule in IDT format - sugar R with two base connected A and C.'
Test ket-to-idt-peptide: got expected error 'Cannot save molecule in IDT format - AA monomer DPhe4C cannot be first.'
Test ket-to-idt-r1r1connection: got expected error 'Cannot save molecule in IDT format - sugar MOE connected to monomer MOE with class SUGAR (only base or phosphate expected).'
Test ket-to-idt-two-bases: got expected error 'Cannot save molecule in IDT format - sugar R with two base connected A and C.'
2 changes: 2 additions & 0 deletions api/tests/integration/ref/formats/mol_to_ket.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
1032-quadra.ket:SUCCEED
1046-imp_hydrogen.ket:SUCCEED
1465-lr_sugar.ket:SUCCEED
1972-case1.ket:SUCCEED
1972-case2.ket:SUCCEED
SgroupDifferent.ket:SUCCEED
acgt_1412.ket:SUCCEED
anacyclamide.ket:SUCCEED
Expand Down
22 changes: 12 additions & 10 deletions api/tests/integration/tests/formats/idt_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ def find_diff(a, b):
ref_path = joinPathPy("ref/", __file__)

idt_data = {
"idt_single_nucleoside": "A",
"idt_bases": "ATCGUI",
"idt_prefix_suffix": "mA*rT*+C*G*+UrImA",
"idt_single_nucleoside": " A ",
"idt_bases": " ATCGUI ",
"idt_prefix_suffix": " mA*rT*+C*G*+UrImA ",
"idt_modifications": "/52MOErA/*/i2MOErA//32MOErA/",
"idt_52moera_with_3phos": "/52MOErA//3Phos/",
"idt_singe_32moera_nucleoside": "/32MOErA/",
Expand Down Expand Up @@ -60,10 +60,11 @@ def find_diff(a, b):
print(diff)

idt_errors = {
"!+-$#12w12r23e32e33": "SequenceLoader::loadIdt(), Invalid symbols in the sequence: !,-,$,#,1,2,w,1,2,2,3,e,3,2,e,3,3",
"!+A-$#12w12r23e32e33": "Invalid symbols in the sequence: !,-,$,#,1,2,w,1,2,2,3,e,3,2,e,3,3",
"/": "Unexpected end of data",
"//": "Invalid modification: empty string.",
"/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.",
Expand All @@ -74,12 +75,13 @@ def find_diff(a, b):
"/3Phos/T": "IDT alias 3Phos not found at three-prime end position.",
"T/5Phos/": "IDT alias 5Phos not found at three-prime end position.",
"/5Phos/*A": "/5Phos/ cannot be modified to 'sP'",
"r/5Phos/A": "Sugar prefix could not be used with '/5Phos/'",
"+/5Phos/A": "Sugar prefix could not be used with '/5Phos/'",
"m/5Phos/A": "Sugar prefix could not be used with '/5Phos/'",
"Ar/3Phos/": "Sugar prefix could not be used with '/3Phos/'",
"A+/3Phos/": "Sugar prefix could not be used with '/3Phos/'",
"Am/3Phos/": "Sugar prefix could not be used with '/3Phos/'",
"r/5Phos/A": "Sugar prefix could not be used with modified monomer.",
"+/5Phos/A": "Sugar prefix could not be used with modified monomer.",
"m/5Phos/A": "Sugar prefix could not be used with modified monomer.",
"Ar/3Phos/": "Sugar prefix could not be used with modified monomer.",
"A+/3Phos/": "Sugar prefix could not be used with modified monomer.",
"Am/3Phos/": "Sugar prefix could not be used with modified monomer.",
"A*/3Phos/": "Phosphor /3Phos/ cannod be modified with '*'.",
}
for idt_seq in sorted(idt_errors.keys()):
error = idt_errors[idt_seq]
Expand Down
1 change: 1 addition & 0 deletions api/tests/integration/tests/formats/ket_cdxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def find_diff(a, b):
root_m = joinPathPy("molecules/", __file__)
files = [
"963-super",
"R3R4R5",
]

files.sort()
Expand Down
10 changes: 5 additions & 5 deletions api/tests/integration/tests/formats/ket_to_idt.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def find_diff(a, b):
)

idt_errors = {
"ket-to-idt-r1r1connection": "Canot save molecule in IDT format - sugar MOE connected to monomer MOE with class SUGAR (only base or phosphate expected).",
"ket-to-idt-peptide": "Canot save molecule in IDT format - AA monomer DPhe4C cannot be first.",
"ket-to-idt-two-bases": "Canot save molecule in IDT format - sugar R with two base connected A and C.",
"ket-to-idt-invalid-posphates": "Canot save molecule in IDT format - sugar R with too much phosphates connected P and P.",
"ket-to-idt-invalid-last-phosphate": "Canot save molecule in IDT format - phosphate sP cannot be last monomer in sequence.",
"ket-to-idt-r1r1connection": "Cannot save molecule in IDT format - sugar MOE connected to monomer MOE with class SUGAR (only base or phosphate expected).",
"ket-to-idt-peptide": "Cannot save molecule in IDT format - AA monomer DPhe4C cannot be first.",
"ket-to-idt-two-bases": "Cannot save molecule in IDT format - sugar R with two base connected A and C.",
"ket-to-idt-invalid-posphates": "Cannot save molecule in IDT format - sugar R with too much phosphates connected P and P.",
"ket-to-idt-invalid-last-phosphate": "Cannot save molecule in IDT format - phosphate sP cannot be last monomer in sequence.",
"ket-to-idt-invalid-nucleotide": "IDT alias for group sugar:m2e2r base:z8c3G phosphate:mepo2 not found.",
"ket-to-idt-invalid-sugar-phosphate": "IDT alias for group sugar:m2e2r phosphate:mepo2 not found.",
"ket-to-idt-invalid-sugar": "IDT alias for sugar:m2e2r not found.",
Expand Down
2 changes: 2 additions & 0 deletions api/tests/integration/tests/formats/mol_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def find_diff(a, b):
"1465-lr_sugar",
"removed_phosphate",
"taspoglutide",
"1972-case1",
"1972-case2",
]

files.sort()
Expand Down
32 changes: 32 additions & 0 deletions api/tests/integration/tests/formats/molecules/1972-case1.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

-INDIGO-05282400262D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 7 7 1 0 0
M V30 BEGIN ATOM
M V30 1 C 3.48485 -6.77507 0.0 0
M V30 2 C 5.21515 -6.77459 0.0 0
M V30 3 C 4.35164 -6.27497 0.0 0
M V30 4 C 5.21515 -7.77553 0.0 0
M V30 5 C 3.48485 -7.78002 0.0 0
M V30 6 C 4.35382 -8.27503 0.0 0
M V30 7 H 4.35225 -5.27497 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 2 3 1
M V30 2 1 1 5
M V30 3 2 5 6
M V30 4 1 6 4
M V30 5 2 4 2
M V30 6 1 2 3
M V30 7 1 3 7
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(7 3 1 5 6 4 2 7) BRKXYZ=(9 0.000000 0.000000 0.000000 0-
M V30 .000000 0.000000 0.000000 0.000000 0.000000 0.000000) BRKXYZ=(9 0.0000-
M V30 00 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.00-
M V30 0000) ESTATE=E SAP=(3 3 7 )
M V30 END SGROUP
M V30 END CTAB
M END
70 changes: 70 additions & 0 deletions api/tests/integration/tests/formats/molecules/1972-case2.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

-INDIGO-05282400262D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 8 7 1 0 0
M V30 BEGIN ATOM
M V30 1 C 5.90985 -7.05007 0.0 0
M V30 2 C 7.64015 -7.04959 0.0 0
M V30 3 C 6.77664 -6.54997 0.0 0
M V30 4 C 7.64015 -8.05053 0.0 0
M V30 5 C 5.90985 -8.05502 0.0 0
M V30 6 C 6.77882 -8.55003 0.0 0
M V30 7 H 6.77725 -5.54997 0.0 0
M V30 8 A 11.425 -6.975 0.0 0 CLASS=AA SEQID=1
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 2 3 1
M V30 2 1 1 5
M V30 3 2 5 6
M V30 4 1 6 4
M V30 5 2 4 2
M V30 6 1 2 3
M V30 7 1 3 7
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(7 3 1 5 6 4 2 7) BRKXYZ=(9 0.000000 0.000000 0.000000 0-
M V30 .000000 0.000000 0.000000 0.000000 0.000000 0.000000) BRKXYZ=(9 0.0000-
M V30 00 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.00-
M V30 0000) ESTATE=E SAP=(3 3 7 )
M V30 END SGROUP
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 1 AA/Ala/A/ NATREPLACE=AA/A
M V30 BEGIN CTAB
M V30 COUNTS 7 6 3 0 0
M V30 BEGIN ATOM
M V30 1 N -1.2549 -0.392 0.0 0
M V30 2 C -0.272 0.2633 0.0 0 CFG=1
M V30 3 C -0.3103 1.7393 0.0 0
M V30 4 C 1.0523 -0.392 0.0 0
M V30 5 O 1.0829 -1.5722 0.0 0
M V30 6 O 2.0353 0.2633 0.0 0
M V30 7 H -2.3334 0.0905 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 2 1
M V30 2 1 2 3 CFG=1
M V30 3 1 2 4
M V30 4 2 4 5
M V30 5 1 4 6
M V30 6 1 1 7
M V30 END BOND
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(1 2)
M V30 END COLLECTION
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 7) XBONDS=(1 6) BRKXYZ=(9 0.539250 -0.241250 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 6) XBONDS=(1 5) BRKXYZ=(9 -0.491500 -0.327650 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=OH CLAS-
M V30 S=LGRP
M V30 3 SUP 3 ATOMS=(5 1 2 3 4 5) XBONDS=(2 6 5) BRKXYZ=(9 -0.539250 0.24125-
M V30 0 0.000000 0.491500 0.327650 0.000000 0.000000 0.000000 0.000000) LABE-
M V30 L=A CLASS=AA SAP=(3 1 7 Al) SAP=(3 4 6 Br) NATREPLACE=AA/A
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M END
Loading
Loading