biobb-io 5.0.0__tar.gz → 5.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {biobb_io-5.0.0 → biobb_io-5.0.1}/PKG-INFO +8 -8
- {biobb_io-5.0.0 → biobb_io-5.0.1}/README.md +7 -7
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/__init__.py +1 -1
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/__init__.py +0 -2
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/common.py +0 -19
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io.egg-info/PKG-INFO +8 -8
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io.egg-info/SOURCES.txt +0 -1
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io.egg-info/entry_points.txt +0 -1
- {biobb_io-5.0.0 → biobb_io-5.0.1}/setup.py +1 -2
- biobb_io-5.0.0/biobb_io/api/drugbank.py +0 -151
- {biobb_io-5.0.0 → biobb_io-5.0.1}/LICENSE +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/alphafold.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/api_binding_site.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/canonical_fasta.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/ideal_sdf.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/ligand.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/memprotmd_sim.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/memprotmd_sim_list.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/memprotmd_sim_search.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/mmcif.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/pdb.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/pdb_cluster_zip.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/pdb_variants.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/api/structure_info.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/py.typed +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io/test/__init__.py +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io.egg-info/dependency_links.txt +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io.egg-info/requires.txt +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/biobb_io.egg-info/top_level.txt +0 -0
- {biobb_io-5.0.0 → biobb_io-5.0.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: biobb_io
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.1
|
|
4
4
|
Summary: Biobb_io is the Biobb module collection to fetch data to be consumed by the rest of the Biobb building blocks.
|
|
5
5
|
Home-page: https://github.com/bioexcel/biobb_io
|
|
6
6
|
Author: Biobb developers
|
|
@@ -24,7 +24,7 @@ Requires-Dist: biobb_common==5.0.0
|
|
|
24
24
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
25
25
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
26
26
|
[](https://quay.io/repository/biocontainers/biobb_io?tab=tags)
|
|
27
|
-
[](https://depot.galaxyproject.org/singularity/biobb_io:5.0.
|
|
27
|
+
[](https://depot.galaxyproject.org/singularity/biobb_io:5.0.1--pyhdfd78af_0)
|
|
28
28
|
|
|
29
29
|
[](https://github.com/bioexcel/biobb_io)
|
|
30
30
|
[](https://pypi.org/project/biobb-io/)
|
|
@@ -62,7 +62,7 @@ The latest documentation of this package can be found in our readthedocs site:
|
|
|
62
62
|
[latest API documentation](http://biobb-io.readthedocs.io/en/latest/).
|
|
63
63
|
|
|
64
64
|
### Version
|
|
65
|
-
v5.0.
|
|
65
|
+
v5.0.1 2024.2
|
|
66
66
|
|
|
67
67
|
### Installation
|
|
68
68
|
Using PIP:
|
|
@@ -71,7 +71,7 @@ Using PIP:
|
|
|
71
71
|
|
|
72
72
|
* Installation:
|
|
73
73
|
|
|
74
|
-
pip install "biobb_io==5.0.
|
|
74
|
+
pip install "biobb_io==5.0.1"
|
|
75
75
|
|
|
76
76
|
* Usage: [Python API documentation](https://biobb-io.readthedocs.io/en/latest/modules.html)
|
|
77
77
|
|
|
@@ -79,7 +79,7 @@ Using ANACONDA:
|
|
|
79
79
|
* Installation:
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
conda install -c bioconda "biobb_io==5.0.
|
|
82
|
+
conda install -c bioconda "biobb_io==5.0.1"
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
* Usage: With conda installation BioBBs can be used with the [Python API documentation](https://biobb-io.readthedocs.io/en/latest/modules.html) and the [Command Line documentation](https://biobb-io.readthedocs.io/en/latest/command_line.html)
|
|
@@ -88,12 +88,12 @@ Using DOCKER:
|
|
|
88
88
|
* Installation:
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
docker pull quay.io/biocontainers/biobb_io:5.0.
|
|
91
|
+
docker pull quay.io/biocontainers/biobb_io:5.0.1--pyhdfd78af_0
|
|
92
92
|
|
|
93
93
|
* Usage:
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
docker run quay.io/biocontainers/biobb_io:5.0.
|
|
96
|
+
docker run quay.io/biocontainers/biobb_io:5.0.1--pyhdfd78af_0 <command>
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
The command list and specification can be found at the [Command Line documentation](https://biobb-io.readthedocs.io/en/latest/command_line.html).
|
|
@@ -105,7 +105,7 @@ Using SINGULARITY:
|
|
|
105
105
|
* Installation:
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.0.
|
|
108
|
+
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.0.1--pyhdfd78af_0
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
* Usage:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
4
4
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
5
5
|
[](https://quay.io/repository/biocontainers/biobb_io?tab=tags)
|
|
6
|
-
[](https://depot.galaxyproject.org/singularity/biobb_io:5.0.
|
|
6
|
+
[](https://depot.galaxyproject.org/singularity/biobb_io:5.0.1--pyhdfd78af_0)
|
|
7
7
|
|
|
8
8
|
[](https://github.com/bioexcel/biobb_io)
|
|
9
9
|
[](https://pypi.org/project/biobb-io/)
|
|
@@ -41,7 +41,7 @@ The latest documentation of this package can be found in our readthedocs site:
|
|
|
41
41
|
[latest API documentation](http://biobb-io.readthedocs.io/en/latest/).
|
|
42
42
|
|
|
43
43
|
### Version
|
|
44
|
-
v5.0.
|
|
44
|
+
v5.0.1 2024.2
|
|
45
45
|
|
|
46
46
|
### Installation
|
|
47
47
|
Using PIP:
|
|
@@ -50,7 +50,7 @@ Using PIP:
|
|
|
50
50
|
|
|
51
51
|
* Installation:
|
|
52
52
|
|
|
53
|
-
pip install "biobb_io==5.0.
|
|
53
|
+
pip install "biobb_io==5.0.1"
|
|
54
54
|
|
|
55
55
|
* Usage: [Python API documentation](https://biobb-io.readthedocs.io/en/latest/modules.html)
|
|
56
56
|
|
|
@@ -58,7 +58,7 @@ Using ANACONDA:
|
|
|
58
58
|
* Installation:
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
conda install -c bioconda "biobb_io==5.0.
|
|
61
|
+
conda install -c bioconda "biobb_io==5.0.1"
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
* Usage: With conda installation BioBBs can be used with the [Python API documentation](https://biobb-io.readthedocs.io/en/latest/modules.html) and the [Command Line documentation](https://biobb-io.readthedocs.io/en/latest/command_line.html)
|
|
@@ -67,12 +67,12 @@ Using DOCKER:
|
|
|
67
67
|
* Installation:
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
docker pull quay.io/biocontainers/biobb_io:5.0.
|
|
70
|
+
docker pull quay.io/biocontainers/biobb_io:5.0.1--pyhdfd78af_0
|
|
71
71
|
|
|
72
72
|
* Usage:
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
docker run quay.io/biocontainers/biobb_io:5.0.
|
|
75
|
+
docker run quay.io/biocontainers/biobb_io:5.0.1--pyhdfd78af_0 <command>
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
The command list and specification can be found at the [Command Line documentation](https://biobb-io.readthedocs.io/en/latest/command_line.html).
|
|
@@ -84,7 +84,7 @@ Using SINGULARITY:
|
|
|
84
84
|
* Installation:
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.0.
|
|
87
|
+
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.0.1--pyhdfd78af_0
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
* Usage:
|
|
@@ -143,25 +143,6 @@ def download_fasta(pdb_code, api_id, out_log=None, global_log=None):
|
|
|
143
143
|
return requests.get(url, verify=True).content.decode("utf-8")
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
def download_drugbank(
|
|
147
|
-
drugbank_id,
|
|
148
|
-
url="https://www.drugbank.ca/structures/small_molecule_drugs/%s.sdf?type=3d",
|
|
149
|
-
out_log=None,
|
|
150
|
-
global_log=None,
|
|
151
|
-
):
|
|
152
|
-
"""
|
|
153
|
-
Returns:
|
|
154
|
-
String: Content of the component file.
|
|
155
|
-
"""
|
|
156
|
-
url = url % drugbank_id
|
|
157
|
-
|
|
158
|
-
fu.log("Downloading %s from: %s" % (drugbank_id, url), out_log, global_log)
|
|
159
|
-
|
|
160
|
-
text = requests.get(url, verify=True).content.decode("utf-8")
|
|
161
|
-
|
|
162
|
-
return text
|
|
163
|
-
|
|
164
|
-
|
|
165
146
|
def download_binding_site(
|
|
166
147
|
pdb_code,
|
|
167
148
|
url="https://www.ebi.ac.uk/pdbe/api/pdb/entry/binding_sites/%s",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: biobb_io
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.1
|
|
4
4
|
Summary: Biobb_io is the Biobb module collection to fetch data to be consumed by the rest of the Biobb building blocks.
|
|
5
5
|
Home-page: https://github.com/bioexcel/biobb_io
|
|
6
6
|
Author: Biobb developers
|
|
@@ -24,7 +24,7 @@ Requires-Dist: biobb_common==5.0.0
|
|
|
24
24
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
25
25
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
26
26
|
[](https://quay.io/repository/biocontainers/biobb_io?tab=tags)
|
|
27
|
-
[](https://depot.galaxyproject.org/singularity/biobb_io:5.0.
|
|
27
|
+
[](https://depot.galaxyproject.org/singularity/biobb_io:5.0.1--pyhdfd78af_0)
|
|
28
28
|
|
|
29
29
|
[](https://github.com/bioexcel/biobb_io)
|
|
30
30
|
[](https://pypi.org/project/biobb-io/)
|
|
@@ -62,7 +62,7 @@ The latest documentation of this package can be found in our readthedocs site:
|
|
|
62
62
|
[latest API documentation](http://biobb-io.readthedocs.io/en/latest/).
|
|
63
63
|
|
|
64
64
|
### Version
|
|
65
|
-
v5.0.
|
|
65
|
+
v5.0.1 2024.2
|
|
66
66
|
|
|
67
67
|
### Installation
|
|
68
68
|
Using PIP:
|
|
@@ -71,7 +71,7 @@ Using PIP:
|
|
|
71
71
|
|
|
72
72
|
* Installation:
|
|
73
73
|
|
|
74
|
-
pip install "biobb_io==5.0.
|
|
74
|
+
pip install "biobb_io==5.0.1"
|
|
75
75
|
|
|
76
76
|
* Usage: [Python API documentation](https://biobb-io.readthedocs.io/en/latest/modules.html)
|
|
77
77
|
|
|
@@ -79,7 +79,7 @@ Using ANACONDA:
|
|
|
79
79
|
* Installation:
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
conda install -c bioconda "biobb_io==5.0.
|
|
82
|
+
conda install -c bioconda "biobb_io==5.0.1"
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
* Usage: With conda installation BioBBs can be used with the [Python API documentation](https://biobb-io.readthedocs.io/en/latest/modules.html) and the [Command Line documentation](https://biobb-io.readthedocs.io/en/latest/command_line.html)
|
|
@@ -88,12 +88,12 @@ Using DOCKER:
|
|
|
88
88
|
* Installation:
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
docker pull quay.io/biocontainers/biobb_io:5.0.
|
|
91
|
+
docker pull quay.io/biocontainers/biobb_io:5.0.1--pyhdfd78af_0
|
|
92
92
|
|
|
93
93
|
* Usage:
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
docker run quay.io/biocontainers/biobb_io:5.0.
|
|
96
|
+
docker run quay.io/biocontainers/biobb_io:5.0.1--pyhdfd78af_0 <command>
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
The command list and specification can be found at the [Command Line documentation](https://biobb-io.readthedocs.io/en/latest/command_line.html).
|
|
@@ -105,7 +105,7 @@ Using SINGULARITY:
|
|
|
105
105
|
* Installation:
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.0.
|
|
108
|
+
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.0.1--pyhdfd78af_0
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
* Usage:
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
alphafold = biobb_io.api.alphafold:main
|
|
3
3
|
api_binding_site = biobb_io.api.api_binding_site:main
|
|
4
4
|
canonical_fasta = biobb_io.api.canonical_fasta:main
|
|
5
|
-
drugbank = biobb_io.api.drugbank:main
|
|
6
5
|
ideal_sdf = biobb_io.api.ideal_sdf:main
|
|
7
6
|
ligand = biobb_io.api.ligand:main
|
|
8
7
|
memprotmd_sim = biobb_io.api.memprotmd_sim:main
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="biobb_io",
|
|
8
|
-
version="5.0.
|
|
8
|
+
version="5.0.1",
|
|
9
9
|
author="Biobb developers",
|
|
10
10
|
author_email="pau.andrio@bsc.es",
|
|
11
11
|
description="Biobb_io is the Biobb module collection to fetch data to be consumed by the rest of the Biobb building blocks.",
|
|
@@ -26,7 +26,6 @@ setuptools.setup(
|
|
|
26
26
|
"alphafold = biobb_io.api.alphafold:main",
|
|
27
27
|
"api_binding_site = biobb_io.api.api_binding_site:main",
|
|
28
28
|
"canonical_fasta = biobb_io.api.canonical_fasta:main",
|
|
29
|
-
"drugbank = biobb_io.api.drugbank:main",
|
|
30
29
|
"ideal_sdf = biobb_io.api.ideal_sdf:main",
|
|
31
30
|
"ligand = biobb_io.api.ligand:main",
|
|
32
31
|
"memprotmd_sim_list = biobb_io.api.memprotmd_sim_list:main",
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
|
|
3
|
-
"""Module containing the Drugbank class and the command line interface."""
|
|
4
|
-
|
|
5
|
-
import argparse
|
|
6
|
-
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
|
-
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
|
-
from biobb_common.tools.file_utils import launchlogger
|
|
11
|
-
|
|
12
|
-
from biobb_io.api.common import (
|
|
13
|
-
check_mandatory_property,
|
|
14
|
-
check_output_path,
|
|
15
|
-
download_drugbank,
|
|
16
|
-
write_sdf,
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class Drugbank(BiobbObject):
|
|
21
|
-
"""
|
|
22
|
-
| biobb_io Drugbank
|
|
23
|
-
| This class is a wrapper for the `Drugbank <https://www.drugbank.ca/>`_ REST API.
|
|
24
|
-
| Download a single component in SDF format from the `Drugbank <https://www.drugbank.ca/>`_ REST API.
|
|
25
|
-
|
|
26
|
-
Args:
|
|
27
|
-
output_sdf_path (str): Path to the output SDF component file. File type: output. `Sample file <https://github.com/bioexcel/biobb_io/raw/master/biobb_io/test/reference/api/output_drugbank.sdf>`_. Accepted formats: sdf (edam:format_3814).
|
|
28
|
-
properties (dic - Python dictionary object containing the tool parameters, not input/output files):
|
|
29
|
-
* **drugbank_id** (*str*) - (None) Drugbank component id.
|
|
30
|
-
* **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
|
|
31
|
-
* **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
|
|
32
|
-
* **sandbox_path** (*str*) - ("./") [WF property] Parent path to the sandbox directory.
|
|
33
|
-
|
|
34
|
-
Examples:
|
|
35
|
-
This is a use example of how to use the building block from Python::
|
|
36
|
-
|
|
37
|
-
from biobb_io.api.drugbank import drugbank
|
|
38
|
-
prop = {
|
|
39
|
-
'drugbank_id': 'DB00530'
|
|
40
|
-
}
|
|
41
|
-
drugbank(output_sdf_path='/path/to/newComponent.sdf',
|
|
42
|
-
properties=prop)
|
|
43
|
-
|
|
44
|
-
Info:
|
|
45
|
-
* wrapped_software:
|
|
46
|
-
* name: Drugbank
|
|
47
|
-
* license: Creative Commons
|
|
48
|
-
* ontology:
|
|
49
|
-
* name: EDAM
|
|
50
|
-
* schema: http://edamontology.org/EDAM.owl
|
|
51
|
-
|
|
52
|
-
"""
|
|
53
|
-
|
|
54
|
-
def __init__(self, output_sdf_path, properties=None, **kwargs) -> None:
|
|
55
|
-
properties = properties or {}
|
|
56
|
-
|
|
57
|
-
# Call parent class constructor
|
|
58
|
-
super().__init__(properties)
|
|
59
|
-
self.locals_var_dict = locals().copy()
|
|
60
|
-
|
|
61
|
-
# Input/Output files
|
|
62
|
-
self.io_dict = {"out": {"output_sdf_path": output_sdf_path}}
|
|
63
|
-
|
|
64
|
-
# Properties specific for BB
|
|
65
|
-
self.drugbank_id = properties.get("drugbank_id", None)
|
|
66
|
-
self.properties = properties
|
|
67
|
-
|
|
68
|
-
# Check the properties
|
|
69
|
-
self.check_properties(properties)
|
|
70
|
-
self.check_arguments()
|
|
71
|
-
|
|
72
|
-
def check_data_params(self, out_log, err_log):
|
|
73
|
-
"""Checks all the input/output paths and parameters"""
|
|
74
|
-
self.output_sdf_path = check_output_path(
|
|
75
|
-
self.io_dict["out"]["output_sdf_path"],
|
|
76
|
-
"output_sdf_path",
|
|
77
|
-
False,
|
|
78
|
-
out_log,
|
|
79
|
-
self.__class__.__name__,
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
@launchlogger
|
|
83
|
-
def launch(self) -> int:
|
|
84
|
-
"""Execute the :class:`Drugbank <api.drugbank.Drugbank>` api.drugbank.Drugbank object."""
|
|
85
|
-
|
|
86
|
-
# check input/output paths and parameters
|
|
87
|
-
self.check_data_params(self.out_log, self.err_log)
|
|
88
|
-
|
|
89
|
-
# Setup Biobb
|
|
90
|
-
if self.check_restart():
|
|
91
|
-
return 0
|
|
92
|
-
|
|
93
|
-
check_mandatory_property(
|
|
94
|
-
self.drugbank_id, "drugbank_id", self.out_log, self.__class__.__name__
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
self.drugbank_id = self.drugbank_id.strip().lower()
|
|
98
|
-
url = "https://www.drugbank.ca/structures/small_molecule_drugs/%s.sdf?type=3d"
|
|
99
|
-
|
|
100
|
-
# Downloading SDF file
|
|
101
|
-
sdf_string = download_drugbank(
|
|
102
|
-
self.drugbank_id, url, self.out_log, self.global_log
|
|
103
|
-
)
|
|
104
|
-
write_sdf(sdf_string, self.output_sdf_path, self.out_log, self.global_log)
|
|
105
|
-
|
|
106
|
-
self.check_arguments(output_files_created=True, raise_exception=False)
|
|
107
|
-
|
|
108
|
-
return 0
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
def drugbank(output_sdf_path: str, properties: Optional[dict] = None, **kwargs) -> int:
|
|
112
|
-
"""Execute the :class:`Drugbank <api.drugbank.Drugbank>` class and
|
|
113
|
-
execute the :meth:`launch() <api.drugbank.Drugbank.launch>` method."""
|
|
114
|
-
|
|
115
|
-
return Drugbank(
|
|
116
|
-
output_sdf_path=output_sdf_path, properties=properties, **kwargs
|
|
117
|
-
).launch()
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
def main():
|
|
121
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
122
|
-
parser = argparse.ArgumentParser(
|
|
123
|
-
description="Download a component in SDF format from the Drugbank (https://www.drugbank.ca/).",
|
|
124
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
125
|
-
)
|
|
126
|
-
parser.add_argument(
|
|
127
|
-
"-c",
|
|
128
|
-
"--config",
|
|
129
|
-
required=False,
|
|
130
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
# Specific args of each building block
|
|
134
|
-
required_args = parser.add_argument_group("required arguments")
|
|
135
|
-
required_args.add_argument(
|
|
136
|
-
"-o",
|
|
137
|
-
"--output_sdf_path",
|
|
138
|
-
required=True,
|
|
139
|
-
help="Path to the output SDF component file. Accepted formats: sdf.",
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
args = parser.parse_args()
|
|
143
|
-
config = args.config if args.config else None
|
|
144
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
145
|
-
|
|
146
|
-
# Specific call of each building block
|
|
147
|
-
drugbank(output_sdf_path=args.output_sdf_path, properties=properties)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if __name__ == "__main__":
|
|
151
|
-
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|