Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Packages
chemical_checker
Commits
c7ad25b6
Commit
c7ad25b6
authored
Sep 01, 2021
by
Martino Bertoni
🌋
Browse files
handling kegg exception
parent
5534b05b
Pipeline
#2504
passed with stages
in 10 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
package/chemicalchecker/util/parser/parser.py
View file @
c7ad25b6
...
...
@@ -308,7 +308,7 @@ class Parser():
wget
.
download
(
url
,
mol_path
)
except
Exception
:
Parser
.
__log
.
error
(
'Cannot download: %s'
,
url
)
raise
Exception
(
'Cannot download: %s'
,
url
)
continue
mol
=
pybel
.
readfile
(
"mol"
,
mol_path
)
for
m
in
mol
:
smiles
=
m
.
write
(
"smi"
).
rstrip
(
"
\n
"
).
rstrip
(
"
\t
"
)
...
...
@@ -712,11 +712,6 @@ class Parser():
@
staticmethod
def
cmaup
(
map_paths
,
molrepo_name
,
chunks
=
1000
):
try
:
import
rdkit.Chem
as
Chem
except
ImportError
:
raise
ImportError
(
"requires rdkit "
+
"https://www.rdkit.org/"
)
converter
=
Converter
()
file_path
=
map_paths
[
molrepo_name
]
...
...
@@ -752,11 +747,6 @@ class Parser():
@
staticmethod
def
repohub
(
map_paths
,
molrepo_name
,
chunks
=
1000
):
try
:
import
rdkit.Chem
as
Chem
except
ImportError
:
raise
ImportError
(
"requires rdkit "
+
"https://www.rdkit.org/"
)
converter
=
Converter
()
file_path
=
map_paths
[
molrepo_name
]
...
...
@@ -892,11 +882,6 @@ class Parser():
@
staticmethod
def
touchstone
(
map_paths
,
molrepo_name
,
chunks
=
1000
):
try
:
import
rdkit.Chem
as
Chem
except
ImportError
:
raise
ImportError
(
"requires rdkit "
+
"https://www.rdkit.org/"
)
converter
=
Converter
()
file_path
=
map_paths
[
"GSE92742_Broad_LINCS_pert_info"
]
chunk
=
list
()
...
...
@@ -940,9 +925,7 @@ class Parser():
@
staticmethod
def
zinc
(
map_paths
,
molrepo_name
,
chunks
=
1000
):
converter
=
Converter
()
file_path
=
map_paths
[
molrepo_name
]
f
=
open
(
file_path
,
"r"
)
delimiter
=
'
\t
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment