biobb-io 5.1.0__py3-none-any.whl → 5.1.1__py3-none-any.whl
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/__init__.py +1 -1
- biobb_io/api/alphafold.py +3 -38
- biobb_io/api/api_binding_site.py +3 -38
- biobb_io/api/canonical_fasta.py +3 -38
- biobb_io/api/common.py +18 -0
- biobb_io/api/ideal_sdf.py +3 -38
- biobb_io/api/ligand.py +3 -38
- biobb_io/api/mddb.py +26 -47
- biobb_io/api/memprotmd_sim.py +3 -38
- biobb_io/api/memprotmd_sim_list.py +3 -41
- biobb_io/api/memprotmd_sim_search.py +3 -40
- biobb_io/api/mmcif.py +3 -38
- biobb_io/api/pdb.py +3 -38
- biobb_io/api/pdb_cluster_zip.py +4 -42
- biobb_io/api/pdb_variants.py +4 -43
- biobb_io/api/structure_info.py +3 -38
- {biobb_io-5.1.0.dist-info → biobb_io-5.1.1.dist-info}/METADATA +23 -11
- biobb_io-5.1.1.dist-info/RECORD +25 -0
- {biobb_io-5.1.0.dist-info → biobb_io-5.1.1.dist-info}/WHEEL +1 -1
- biobb_io-5.1.0.dist-info/RECORD +0 -25
- {biobb_io-5.1.0.dist-info → biobb_io-5.1.1.dist-info}/entry_points.txt +0 -0
- {biobb_io-5.1.0.dist-info → biobb_io-5.1.1.dist-info/licenses}/LICENSE +0 -0
- {biobb_io-5.1.0.dist-info → biobb_io-5.1.1.dist-info}/top_level.txt +0 -0
biobb_io/__init__.py
CHANGED
biobb_io/api/alphafold.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the AlphaFold class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -113,43 +110,11 @@ class AlphaFold(BiobbObject):
|
|
|
113
110
|
def alphafold(output_pdb_path: str, properties: Optional[dict] = None, **kwargs) -> int:
|
|
114
111
|
"""Execute the :class:`AlphaFold <api.alphafold.AlphaFold>` class and
|
|
115
112
|
execute the :meth:`launch() <api.alphafold.AlphaFold.launch>` method."""
|
|
113
|
+
return AlphaFold(**dict(locals())).launch()
|
|
116
114
|
|
|
117
|
-
return AlphaFold(
|
|
118
|
-
output_pdb_path=output_pdb_path, properties=properties, **kwargs
|
|
119
|
-
).launch()
|
|
120
|
-
|
|
121
|
-
alphafold.__doc__ = AlphaFold.__doc__
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def main():
|
|
125
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
126
|
-
parser = argparse.ArgumentParser(
|
|
127
|
-
description="This class is a wrapper for downloading a PDB structure from the Protein Data Bank.",
|
|
128
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
129
|
-
)
|
|
130
|
-
parser.add_argument(
|
|
131
|
-
"-c",
|
|
132
|
-
"--config",
|
|
133
|
-
required=False,
|
|
134
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
# Specific args of each building block
|
|
138
|
-
required_args = parser.add_argument_group("required arguments")
|
|
139
|
-
required_args.add_argument(
|
|
140
|
-
"-o",
|
|
141
|
-
"--output_pdb_path",
|
|
142
|
-
required=True,
|
|
143
|
-
help="Path to the output PDB file. Accepted formats: pdb.",
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
args = parser.parse_args()
|
|
147
|
-
config = args.config if args.config else None
|
|
148
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
149
|
-
|
|
150
|
-
# Specific call of each building block
|
|
151
|
-
alphafold(output_pdb_path=args.output_pdb_path, properties=properties)
|
|
152
115
|
|
|
116
|
+
alphafold.__doc__ = AlphaFold.__doc__
|
|
117
|
+
main = AlphaFold.get_main(alphafold, "This class is a wrapper for downloading a PDB structure from the Protein Data Bank.")
|
|
153
118
|
|
|
154
119
|
if __name__ == "__main__":
|
|
155
120
|
main()
|
biobb_io/api/api_binding_site.py
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the ApiBindingSite class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
import json
|
|
7
6
|
from typing import Optional
|
|
8
|
-
|
|
9
|
-
from biobb_common.configuration import settings
|
|
10
7
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
11
8
|
from biobb_common.tools import file_utils as fu
|
|
12
9
|
from biobb_common.tools.file_utils import launchlogger
|
|
@@ -125,43 +122,11 @@ def api_binding_site(
|
|
|
125
122
|
) -> int:
|
|
126
123
|
"""Execute the :class:`ApiBindingSite <api.api_binding_site.ApiBindingSite>` class and
|
|
127
124
|
execute the :meth:`launch() <api.api_binding_site.ApiBindingSite.launch>` method."""
|
|
125
|
+
return ApiBindingSite(**dict(locals())).launch()
|
|
128
126
|
|
|
129
|
-
return ApiBindingSite(
|
|
130
|
-
output_json_path=output_json_path, properties=properties, **kwargs
|
|
131
|
-
).launch()
|
|
132
|
-
|
|
133
|
-
api_binding_site.__doc__ = ApiBindingSite.__doc__
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
def main():
|
|
137
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
138
|
-
parser = argparse.ArgumentParser(
|
|
139
|
-
description="This class is a wrapper for the PDBe REST API Binding Sites endpoint",
|
|
140
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
141
|
-
)
|
|
142
|
-
parser.add_argument(
|
|
143
|
-
"-c",
|
|
144
|
-
"--config",
|
|
145
|
-
required=False,
|
|
146
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
# Specific args of each building block
|
|
150
|
-
required_args = parser.add_argument_group("required arguments")
|
|
151
|
-
required_args.add_argument(
|
|
152
|
-
"-o",
|
|
153
|
-
"--output_json_path",
|
|
154
|
-
required=True,
|
|
155
|
-
help="Path to the JSON file with the binding sites for the requested structure. Accepted formats: json.",
|
|
156
|
-
)
|
|
157
|
-
|
|
158
|
-
args = parser.parse_args()
|
|
159
|
-
config = args.config if args.config else None
|
|
160
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
161
|
-
|
|
162
|
-
# Specific call of each building block
|
|
163
|
-
api_binding_site(output_json_path=args.output_json_path, properties=properties)
|
|
164
127
|
|
|
128
|
+
api_binding_site.__doc__ = ApiBindingSite.__doc__
|
|
129
|
+
main = ApiBindingSite.get_main(api_binding_site, "This class is a wrapper for the PDBe REST API Binding Sites endpoint")
|
|
165
130
|
|
|
166
131
|
if __name__ == "__main__":
|
|
167
132
|
main()
|
biobb_io/api/canonical_fasta.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the CanonicalFasta class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -115,43 +112,11 @@ def canonical_fasta(
|
|
|
115
112
|
) -> int:
|
|
116
113
|
"""Execute the :class:`CanonicalFasta <api.canonical_fasta.CanonicalFasta>` class and
|
|
117
114
|
execute the :meth:`launch() <api.canonical_fasta.CanonicalFasta.launch>` method."""
|
|
115
|
+
return CanonicalFasta(**dict(locals())).launch()
|
|
118
116
|
|
|
119
|
-
return CanonicalFasta(
|
|
120
|
-
output_fasta_path=output_fasta_path, properties=properties, **kwargs
|
|
121
|
-
).launch()
|
|
122
|
-
|
|
123
|
-
canonical_fasta.__doc__ = CanonicalFasta.__doc__
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
def main():
|
|
127
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
128
|
-
parser = argparse.ArgumentParser(
|
|
129
|
-
description="This class is a wrapper for downloading a FASTA structure from the Protein Data Bank.",
|
|
130
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
131
|
-
)
|
|
132
|
-
parser.add_argument(
|
|
133
|
-
"-c",
|
|
134
|
-
"--config",
|
|
135
|
-
required=False,
|
|
136
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
# Specific args of each building block
|
|
140
|
-
required_args = parser.add_argument_group("required arguments")
|
|
141
|
-
required_args.add_argument(
|
|
142
|
-
"-o",
|
|
143
|
-
"--output_fasta_path",
|
|
144
|
-
required=True,
|
|
145
|
-
help="Path to the canonical FASTA file. Accepted formats: fasta.",
|
|
146
|
-
)
|
|
147
|
-
|
|
148
|
-
args = parser.parse_args()
|
|
149
|
-
config = args.config if args.config else None
|
|
150
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
151
|
-
|
|
152
|
-
# Specific call of each building block
|
|
153
|
-
canonical_fasta(output_fasta_path=args.output_fasta_path, properties=properties)
|
|
154
117
|
|
|
118
|
+
canonical_fasta.__doc__ = CanonicalFasta.__doc__
|
|
119
|
+
main = CanonicalFasta.get_main(canonical_fasta, "This class is a wrapper for downloading a FASTA structure from the Protein Data Bank.")
|
|
155
120
|
|
|
156
121
|
if __name__ == "__main__":
|
|
157
122
|
main()
|
biobb_io/api/common.py
CHANGED
|
@@ -121,6 +121,24 @@ def download_mddb_trj(project_id, node_id, trj_format, frames, selection, out_lo
|
|
|
121
121
|
return r.content
|
|
122
122
|
|
|
123
123
|
|
|
124
|
+
def download_mddb_file(project_id, node_id, file_name, out_log=None, global_log=None, classname=None):
|
|
125
|
+
"""
|
|
126
|
+
Returns:
|
|
127
|
+
String: Content of the trajectory file.
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
url = "https://" + node_id + ".mddbr.eu/api/rest/v1/projects/" + project_id + "/files/" + file_name
|
|
131
|
+
|
|
132
|
+
fu.log("Downloading %s file from: %s" % (project_id, url), out_log, global_log)
|
|
133
|
+
|
|
134
|
+
r = requests.get(url)
|
|
135
|
+
if r.status_code == 404:
|
|
136
|
+
fu.log(classname + ": Incorrect url, check project_id, node_id, trj_format, frames and selection: %s" % (url), out_log)
|
|
137
|
+
raise SystemExit(classname + ": Incorrect url, check project_id, node_id, trj_format, frames and selection: %s" % (url))
|
|
138
|
+
|
|
139
|
+
return r.content
|
|
140
|
+
|
|
141
|
+
|
|
124
142
|
def download_mmcif(pdb_code, api_id, out_log=None, global_log=None):
|
|
125
143
|
"""
|
|
126
144
|
Returns:
|
biobb_io/api/ideal_sdf.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the IdealSdf class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -113,43 +110,11 @@ class IdealSdf(BiobbObject):
|
|
|
113
110
|
def ideal_sdf(output_sdf_path: str, properties: Optional[dict] = None, **kwargs) -> int:
|
|
114
111
|
"""Execute the :class:`IdealSdf <api.ideal_sdf.IdealSdf>` class and
|
|
115
112
|
execute the :meth:`launch() <api.ideal_sdf.IdealSdf.launch>` method."""
|
|
113
|
+
return IdealSdf(**dict(locals())).launch()
|
|
116
114
|
|
|
117
|
-
return IdealSdf(
|
|
118
|
-
output_sdf_path=output_sdf_path, properties=properties, **kwargs
|
|
119
|
-
).launch()
|
|
120
|
-
|
|
121
|
-
ideal_sdf.__doc__ = IdealSdf.__doc__
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def main():
|
|
125
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
126
|
-
parser = argparse.ArgumentParser(
|
|
127
|
-
description="This class is a wrapper for downloading an ideal SDF ligand from the Protein Data Bank.",
|
|
128
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
129
|
-
)
|
|
130
|
-
parser.add_argument(
|
|
131
|
-
"-c",
|
|
132
|
-
"--config",
|
|
133
|
-
required=False,
|
|
134
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
# Specific args of each building block
|
|
138
|
-
required_args = parser.add_argument_group("required arguments")
|
|
139
|
-
required_args.add_argument(
|
|
140
|
-
"-o",
|
|
141
|
-
"--output_sdf_path",
|
|
142
|
-
required=True,
|
|
143
|
-
help="Path to the output SDF file. Accepted formats: sdf.",
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
args = parser.parse_args()
|
|
147
|
-
config = args.config if args.config else None
|
|
148
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
149
|
-
|
|
150
|
-
# Specific call of each building block
|
|
151
|
-
ideal_sdf(output_sdf_path=args.output_sdf_path, properties=properties)
|
|
152
115
|
|
|
116
|
+
ideal_sdf.__doc__ = IdealSdf.__doc__
|
|
117
|
+
main = IdealSdf.get_main(ideal_sdf, "This class is a wrapper for downloading an ideal SDF ligand from the Protein Data Bank.")
|
|
153
118
|
|
|
154
119
|
if __name__ == "__main__":
|
|
155
120
|
main()
|
biobb_io/api/ligand.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the Ligand class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -113,43 +110,11 @@ class Ligand(BiobbObject):
|
|
|
113
110
|
def ligand(output_pdb_path: str, properties: Optional[dict] = None, **kwargs) -> int:
|
|
114
111
|
"""Execute the :class:`Ligand <api.ligand.Ligand>` class and
|
|
115
112
|
execute the :meth:`launch() <api.ligand.Ligand.launch>` method."""
|
|
113
|
+
return Ligand(**dict(locals())).launch()
|
|
116
114
|
|
|
117
|
-
return Ligand(
|
|
118
|
-
output_pdb_path=output_pdb_path, properties=properties, **kwargs
|
|
119
|
-
).launch()
|
|
120
|
-
|
|
121
|
-
ligand.__doc__ = Ligand.__doc__
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def main():
|
|
125
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
126
|
-
parser = argparse.ArgumentParser(
|
|
127
|
-
description="Wrapper for the Protein Data Bank in Europe (https://www.ebi.ac.uk/pdbe/) and the MMB PDB mirror (http://mmb.irbbarcelona.org/api/) for downloading a single PDB ligand.",
|
|
128
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
129
|
-
)
|
|
130
|
-
parser.add_argument(
|
|
131
|
-
"-c",
|
|
132
|
-
"--config",
|
|
133
|
-
required=False,
|
|
134
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
# Specific args of each building block
|
|
138
|
-
required_args = parser.add_argument_group("required arguments")
|
|
139
|
-
required_args.add_argument(
|
|
140
|
-
"-o",
|
|
141
|
-
"--output_pdb_path",
|
|
142
|
-
required=True,
|
|
143
|
-
help="Path to the output PDB ligand file. Accepted formats: pdb.",
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
args = parser.parse_args()
|
|
147
|
-
config = args.config if args.config else None
|
|
148
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
149
|
-
|
|
150
|
-
# Specific call of each building block
|
|
151
|
-
ligand(output_pdb_path=args.output_pdb_path, properties=properties)
|
|
152
115
|
|
|
116
|
+
ligand.__doc__ = Ligand.__doc__
|
|
117
|
+
main = Ligand.get_main(ligand, "Wrapper for the Protein Data Bank in Europe (https://www.ebi.ac.uk/pdbe/) and the MMB PDB mirror (http://mmb.irbbarcelona.org/api/) for downloading a single PDB ligand.")
|
|
153
118
|
|
|
154
119
|
if __name__ == "__main__":
|
|
155
120
|
main()
|
biobb_io/api/mddb.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the MDDB class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -15,7 +12,8 @@ from biobb_io.api.common import (
|
|
|
15
12
|
download_mddb_top,
|
|
16
13
|
write_pdb,
|
|
17
14
|
download_mddb_trj,
|
|
18
|
-
write_bin
|
|
15
|
+
write_bin,
|
|
16
|
+
download_mddb_file
|
|
19
17
|
)
|
|
20
18
|
|
|
21
19
|
|
|
@@ -34,6 +32,7 @@ class MDDB(BiobbObject):
|
|
|
34
32
|
* **trj_format** (*str*) - ("xtc") Trajectory format. Values: mdcrd (AMBER trajectory format), trr (Trajectory of a simulation experiment used by GROMACS), xtc (Portable binary format for trajectories produced by GROMACS package).
|
|
35
33
|
* **frames** (*str*) - (None) Specify a frame range for the returned trajectory. Ranges are defined by dashes, and multiple ranges can be defined separated by commas. It can also be defined as the start:end:step format (ie: '10:20:2').
|
|
36
34
|
* **selection** (*str*) - (None) Specify a NGL-formatted selection for the returned trajectory. See here for the kind of selection that can be used: http://nglviewer.org/ngl/api/manual/usage/selection-language.html.
|
|
35
|
+
* **extra_files** (*list*) - (None) List of extra files to download. It should be a tuple with the name of the file and the path to be saved.
|
|
37
36
|
* **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
|
|
38
37
|
* **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
|
|
39
38
|
* **sandbox_path** (*str*) - ("./") [WF property] Parent path to the sandbox directory.
|
|
@@ -47,8 +46,8 @@ class MDDB(BiobbObject):
|
|
|
47
46
|
'trj_format': 'xtc'
|
|
48
47
|
}
|
|
49
48
|
mddb(output_top_path='/path/to/newTopology.pdb',
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
output_trj_path='/path/to/newTrajectory.pdb',
|
|
50
|
+
properties=prop)
|
|
52
51
|
|
|
53
52
|
Info:
|
|
54
53
|
* wrapped_software:
|
|
@@ -76,6 +75,7 @@ class MDDB(BiobbObject):
|
|
|
76
75
|
self.trj_format = properties.get("trj_format", "xtc")
|
|
77
76
|
self.frames = properties.get("frames", "")
|
|
78
77
|
self.selection = properties.get("selection", "*")
|
|
78
|
+
self.extra_files = properties.get("extra_files", [])
|
|
79
79
|
self.properties = properties
|
|
80
80
|
|
|
81
81
|
# Check the properties
|
|
@@ -140,6 +140,20 @@ class MDDB(BiobbObject):
|
|
|
140
140
|
)
|
|
141
141
|
write_bin(trj_string, self.output_trj_path, self.out_log, self.global_log)
|
|
142
142
|
|
|
143
|
+
for (extra_file, extra_path) in self.extra_files:
|
|
144
|
+
try:
|
|
145
|
+
file_string = download_mddb_file(
|
|
146
|
+
self.project_id,
|
|
147
|
+
self.node_id,
|
|
148
|
+
extra_file,
|
|
149
|
+
self.out_log,
|
|
150
|
+
self.global_log,
|
|
151
|
+
self.__class__.__name__,
|
|
152
|
+
)
|
|
153
|
+
write_bin(file_string, extra_path, self.out_log, self.global_log)
|
|
154
|
+
except Exception:
|
|
155
|
+
pass
|
|
156
|
+
|
|
143
157
|
self.check_arguments(output_files_created=True, raise_exception=False)
|
|
144
158
|
|
|
145
159
|
return 0
|
|
@@ -148,49 +162,14 @@ class MDDB(BiobbObject):
|
|
|
148
162
|
def mddb(output_top_path: str, output_trj_path: str, properties: Optional[dict] = None, **kwargs) -> int:
|
|
149
163
|
"""Execute the :class:`MDDB <api.mddb.MDDB>` class and
|
|
150
164
|
execute the :meth:`launch() <api.mddb.MDDB.launch>` method."""
|
|
165
|
+
return MDDB(**dict(locals())).launch()
|
|
151
166
|
|
|
152
|
-
return MDDB(
|
|
153
|
-
output_top_path=output_top_path, output_trj_path=output_trj_path, properties=properties, **kwargs
|
|
154
|
-
).launch()
|
|
155
|
-
|
|
156
|
-
mddb.__doc__ = MDDB.__doc__
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
def main():
|
|
160
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
161
|
-
parser = argparse.ArgumentParser(
|
|
162
|
-
description="This class is a wrapper for downloading a trajectory / topology pair from the MDDB Database.",
|
|
163
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
164
|
-
)
|
|
165
|
-
parser.add_argument(
|
|
166
|
-
"-c",
|
|
167
|
-
"--config",
|
|
168
|
-
required=False,
|
|
169
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
# Specific args of each building block
|
|
173
|
-
required_args = parser.add_argument_group("required arguments")
|
|
174
|
-
required_args.add_argument(
|
|
175
|
-
"-o",
|
|
176
|
-
"--output_top_path",
|
|
177
|
-
required=True,
|
|
178
|
-
help="Path to the output toplogy file. Accepted formats: pdb.",
|
|
179
|
-
)
|
|
180
|
-
required_args.add_argument(
|
|
181
|
-
"-t",
|
|
182
|
-
"--output_trj_path",
|
|
183
|
-
required=True,
|
|
184
|
-
help="Path to the output trajectory file. Accepted formats: mdcrd, trr, xtc.",
|
|
185
|
-
)
|
|
186
|
-
|
|
187
|
-
args = parser.parse_args()
|
|
188
|
-
config = args.config if args.config else None
|
|
189
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
190
|
-
|
|
191
|
-
# Specific call of each building block
|
|
192
|
-
mddb(output_top_path=args.output_top_path, output_trj_path=args.output_trj_path, properties=properties)
|
|
193
167
|
|
|
168
|
+
mddb.__doc__ = MDDB.__doc__
|
|
169
|
+
main = MDDB.get_main(
|
|
170
|
+
mddb,
|
|
171
|
+
"This class is a wrapper for downloading a trajectory / topology pair from the MDDB Database.",
|
|
172
|
+
)
|
|
194
173
|
|
|
195
174
|
if __name__ == "__main__":
|
|
196
175
|
main()
|
biobb_io/api/memprotmd_sim.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the MemProtMDSim class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -108,43 +105,11 @@ def memprotmd_sim(
|
|
|
108
105
|
) -> int:
|
|
109
106
|
"""Execute the :class:`MemProtMDSim <api.memprotmd_sim.MemProtMDSim>` class and
|
|
110
107
|
execute the :meth:`launch() <api.memprotmd_sim.MemProtMDSim.launch>` method."""
|
|
108
|
+
return MemProtMDSim(**dict(locals())).launch()
|
|
111
109
|
|
|
112
|
-
return MemProtMDSim(
|
|
113
|
-
output_simulation=output_simulation, properties=properties, **kwargs
|
|
114
|
-
).launch()
|
|
115
|
-
|
|
116
|
-
memprotmd_sim.__doc__ = MemProtMDSim.__doc__
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
def main():
|
|
120
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
121
|
-
parser = argparse.ArgumentParser(
|
|
122
|
-
description="Wrapper for the MemProtMD DB REST API (http://memprotmd.bioch.ox.ac.uk/) to download a simulation.",
|
|
123
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
124
|
-
)
|
|
125
|
-
parser.add_argument(
|
|
126
|
-
"-c",
|
|
127
|
-
"--config",
|
|
128
|
-
required=False,
|
|
129
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
# Specific args of each building block
|
|
133
|
-
required_args = parser.add_argument_group("required arguments")
|
|
134
|
-
required_args.add_argument(
|
|
135
|
-
"-o",
|
|
136
|
-
"--output_simulation",
|
|
137
|
-
required=True,
|
|
138
|
-
help="Path to the output simulation in a ZIP file. Accepted formats: zip.",
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
args = parser.parse_args()
|
|
142
|
-
config = args.config if args.config else None
|
|
143
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
144
|
-
|
|
145
|
-
# Specific call of each building block
|
|
146
|
-
memprotmd_sim(output_simulation=args.output_simulation, properties=properties)
|
|
147
110
|
|
|
111
|
+
memprotmd_sim.__doc__ = MemProtMDSim.__doc__
|
|
112
|
+
main = MemProtMDSim.get_main(memprotmd_sim, "Wrapper for the MemProtMD DB REST API (http://memprotmd.bioch.ox.ac.uk/) to download a simulation.")
|
|
148
113
|
|
|
149
114
|
if __name__ == "__main__":
|
|
150
115
|
main()
|
|
@@ -2,13 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the MemProtMDSimList class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
|
-
|
|
12
8
|
from biobb_io.api.common import check_output_path, get_memprotmd_sim_list, write_json
|
|
13
9
|
|
|
14
10
|
|
|
@@ -97,45 +93,11 @@ def memprotmd_sim_list(
|
|
|
97
93
|
) -> int:
|
|
98
94
|
"""Execute the :class:`MemProtMDSimList <api.memprotmd_sim_list.MemProtMDSimList>` class and
|
|
99
95
|
execute the :meth:`launch() <api.memprotmd_sim_list.MemProtMDSimList.launch>` method."""
|
|
96
|
+
return MemProtMDSimList(**dict(locals())).launch()
|
|
100
97
|
|
|
101
|
-
return MemProtMDSimList(
|
|
102
|
-
output_simulations=output_simulations, properties=properties, **kwargs
|
|
103
|
-
).launch()
|
|
104
|
-
|
|
105
|
-
memprotmd_sim_list.__doc__ = MemProtMDSimList.__doc__
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
def main():
|
|
109
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
110
|
-
parser = argparse.ArgumentParser(
|
|
111
|
-
description="Wrapper for the MemProtMD DB REST API (http://memprotmd.bioch.ox.ac.uk/) to get all available membrane-protein systems (simulations).",
|
|
112
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
113
|
-
)
|
|
114
|
-
parser.add_argument(
|
|
115
|
-
"-c",
|
|
116
|
-
"--config",
|
|
117
|
-
required=False,
|
|
118
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
# Specific args of each building block
|
|
122
|
-
required_args = parser.add_argument_group("required arguments")
|
|
123
|
-
required_args.add_argument(
|
|
124
|
-
"-o",
|
|
125
|
-
"--output_simulations",
|
|
126
|
-
required=True,
|
|
127
|
-
help="Path to the output JSON file. Accepted formats: json.",
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
args = parser.parse_args()
|
|
131
|
-
config = args.config if args.config else None
|
|
132
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
133
|
-
|
|
134
|
-
# Specific call of each building block
|
|
135
|
-
memprotmd_sim_list(
|
|
136
|
-
output_simulations=args.output_simulations, properties=properties
|
|
137
|
-
)
|
|
138
98
|
|
|
99
|
+
memprotmd_sim_list.__doc__ = MemProtMDSimList.__doc__
|
|
100
|
+
main = MemProtMDSimList.get_main(memprotmd_sim_list, "Wrapper for the MemProtMD DB REST API (http://memprotmd.bioch.ox.ac.uk/) to get all available membrane-protein systems (simulations).")
|
|
139
101
|
|
|
140
102
|
if __name__ == "__main__":
|
|
141
103
|
main()
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the MemProtMDSimSearch class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -108,45 +105,11 @@ def memprotmd_sim_search(
|
|
|
108
105
|
) -> int:
|
|
109
106
|
"""Execute the :class:`MemProtMDSimSearch <api.memprotmd_sim_search.MemProtMDSimSearch>` class and
|
|
110
107
|
execute the :meth:`launch() <api.memprotmd_sim_search.MemProtMDSimSearch.launch>` method."""
|
|
108
|
+
return MemProtMDSimSearch(**dict(locals())).launch()
|
|
111
109
|
|
|
112
|
-
return MemProtMDSimSearch(
|
|
113
|
-
output_simulations=output_simulations, properties=properties, **kwargs
|
|
114
|
-
).launch()
|
|
115
|
-
|
|
116
|
-
memprotmd_sim_search.__doc__ = MemProtMDSimSearch.__doc__
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
def main():
|
|
120
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
121
|
-
parser = argparse.ArgumentParser(
|
|
122
|
-
description="Wrapper for the MemProtMD DB REST API (http://memprotmd.bioch.ox.ac.uk/) to perform advanced searches.",
|
|
123
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
124
|
-
)
|
|
125
|
-
parser.add_argument(
|
|
126
|
-
"-c",
|
|
127
|
-
"--config",
|
|
128
|
-
required=False,
|
|
129
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
# Specific args of each building block
|
|
133
|
-
required_args = parser.add_argument_group("required arguments")
|
|
134
|
-
required_args.add_argument(
|
|
135
|
-
"-o",
|
|
136
|
-
"--output_simulations",
|
|
137
|
-
required=True,
|
|
138
|
-
help="Path to the output JSON file. Accepted formats: json.",
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
args = parser.parse_args()
|
|
142
|
-
config = args.config if args.config else None
|
|
143
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
144
|
-
|
|
145
|
-
# Specific call of each building block
|
|
146
|
-
memprotmd_sim_search(
|
|
147
|
-
output_simulations=args.output_simulations, properties=properties
|
|
148
|
-
)
|
|
149
110
|
|
|
111
|
+
memprotmd_sim_search.__doc__ = MemProtMDSimSearch.__doc__
|
|
112
|
+
main = MemProtMDSimSearch.get_main(memprotmd_sim_search, "Wrapper for the MemProtMD DB REST API (http://memprotmd.bioch.ox.ac.uk/) to perform advanced searches.")
|
|
150
113
|
|
|
151
114
|
if __name__ == "__main__":
|
|
152
115
|
main()
|
biobb_io/api/mmcif.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the Mmcif class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -113,43 +110,11 @@ class Mmcif(BiobbObject):
|
|
|
113
110
|
def mmcif(output_mmcif_path: str, properties: Optional[dict] = None, **kwargs) -> int:
|
|
114
111
|
"""Execute the :class:`Mmcif <api.mmcif.Mmcif>` class and
|
|
115
112
|
execute the :meth:`launch() <api.mmcif.Mmcif.launch>` method."""
|
|
113
|
+
return Mmcif(**dict(locals())).launch()
|
|
116
114
|
|
|
117
|
-
return Mmcif(
|
|
118
|
-
output_mmcif_path=output_mmcif_path, properties=properties, **kwargs
|
|
119
|
-
).launch()
|
|
120
|
-
|
|
121
|
-
mmcif.__doc__ = Mmcif.__doc__
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def main():
|
|
125
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
126
|
-
parser = argparse.ArgumentParser(
|
|
127
|
-
description="This class is a wrapper for downloading a MMCIF structure from the Protein Data Bank.",
|
|
128
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
129
|
-
)
|
|
130
|
-
parser.add_argument(
|
|
131
|
-
"-c",
|
|
132
|
-
"--config",
|
|
133
|
-
required=False,
|
|
134
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
# Specific args of each building block
|
|
138
|
-
required_args = parser.add_argument_group("required arguments")
|
|
139
|
-
required_args.add_argument(
|
|
140
|
-
"-o",
|
|
141
|
-
"--output_mmcif_path",
|
|
142
|
-
required=True,
|
|
143
|
-
help="Path to the output MMCIF file. Accepted formats: cif, mmcif.",
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
args = parser.parse_args()
|
|
147
|
-
config = args.config if args.config else None
|
|
148
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
149
|
-
|
|
150
|
-
# Specific call of each building block
|
|
151
|
-
mmcif(output_mmcif_path=args.output_mmcif_path, properties=properties)
|
|
152
115
|
|
|
116
|
+
mmcif.__doc__ = Mmcif.__doc__
|
|
117
|
+
main = Mmcif.get_main(mmcif, "This class is a wrapper for downloading a MMCIF structure from the Protein Data Bank.")
|
|
153
118
|
|
|
154
119
|
if __name__ == "__main__":
|
|
155
120
|
main()
|
biobb_io/api/pdb.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the Pdb class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -118,43 +115,11 @@ class Pdb(BiobbObject):
|
|
|
118
115
|
def pdb(output_pdb_path: str, properties: Optional[dict] = None, **kwargs) -> int:
|
|
119
116
|
"""Execute the :class:`Pdb <api.pdb.Pdb>` class and
|
|
120
117
|
execute the :meth:`launch() <api.pdb.Pdb.launch>` method."""
|
|
118
|
+
return Pdb(**dict(locals())).launch()
|
|
121
119
|
|
|
122
|
-
return Pdb(
|
|
123
|
-
output_pdb_path=output_pdb_path, properties=properties, **kwargs
|
|
124
|
-
).launch()
|
|
125
|
-
|
|
126
|
-
pdb.__doc__ = Pdb.__doc__
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
def main():
|
|
130
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
131
|
-
parser = argparse.ArgumentParser(
|
|
132
|
-
description="This class is a wrapper for downloading a PDB structure from the Protein Data Bank.",
|
|
133
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
134
|
-
)
|
|
135
|
-
parser.add_argument(
|
|
136
|
-
"-c",
|
|
137
|
-
"--config",
|
|
138
|
-
required=False,
|
|
139
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
# Specific args of each building block
|
|
143
|
-
required_args = parser.add_argument_group("required arguments")
|
|
144
|
-
required_args.add_argument(
|
|
145
|
-
"-o",
|
|
146
|
-
"--output_pdb_path",
|
|
147
|
-
required=True,
|
|
148
|
-
help="Path to the output PDB file. Accepted formats: pdb.",
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
args = parser.parse_args()
|
|
152
|
-
config = args.config if args.config else None
|
|
153
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
154
|
-
|
|
155
|
-
# Specific call of each building block
|
|
156
|
-
pdb(output_pdb_path=args.output_pdb_path, properties=properties)
|
|
157
120
|
|
|
121
|
+
pdb.__doc__ = Pdb.__doc__
|
|
122
|
+
main = Pdb.get_main(pdb, "This class is a wrapper for downloading a PDB structure from the Protein Data Bank.")
|
|
158
123
|
|
|
159
124
|
if __name__ == "__main__":
|
|
160
125
|
main()
|
biobb_io/api/pdb_cluster_zip.py
CHANGED
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
"""PdbClusterZip Module"""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
import os
|
|
7
6
|
from typing import Optional
|
|
8
|
-
|
|
9
|
-
from biobb_common.configuration import settings
|
|
10
7
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
11
8
|
from biobb_common.tools import file_utils as fu
|
|
12
9
|
from biobb_common.tools.file_utils import launchlogger
|
|
@@ -132,10 +129,7 @@ class PdbClusterZip(BiobbObject):
|
|
|
132
129
|
fu.log("Zipping the pdb files to: %s" % self.output_pdb_zip_path)
|
|
133
130
|
fu.zip_list(self.output_pdb_zip_path, file_list, out_log=self.out_log)
|
|
134
131
|
|
|
135
|
-
self.tmp_files.extend([
|
|
136
|
-
# self.stage_io_dict.get("unique_dir", ""),
|
|
137
|
-
unique_dir
|
|
138
|
-
])
|
|
132
|
+
self.tmp_files.extend([unique_dir])
|
|
139
133
|
self.remove_tmp_files()
|
|
140
134
|
|
|
141
135
|
self.check_arguments(output_files_created=True, raise_exception=False)
|
|
@@ -148,43 +142,11 @@ def pdb_cluster_zip(
|
|
|
148
142
|
) -> int:
|
|
149
143
|
"""Execute the :class:`PdbClusterZip <api.pdb_cluster_zip.PdbClusterZip>` class and
|
|
150
144
|
execute the :meth:`launch() <api.pdb_cluster_zip.PdbClusterZip.launch>` method."""
|
|
145
|
+
return PdbClusterZip(**dict(locals())).launch()
|
|
151
146
|
|
|
152
|
-
return PdbClusterZip(
|
|
153
|
-
output_pdb_zip_path=output_pdb_zip_path, properties=properties, **kwargs
|
|
154
|
-
).launch()
|
|
155
|
-
|
|
156
|
-
pdb_cluster_zip.__doc__ = PdbClusterZip.__doc__
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
def main():
|
|
160
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
161
|
-
parser = argparse.ArgumentParser(
|
|
162
|
-
description="Wrapper for the Protein Data Bank in Europe (https://www.ebi.ac.uk/pdbe/), the Protein Data Bank (https://www.rcsb.org/) and the MMB PDB mirror (http://mmb.irbbarcelona.org/api/) for downloading a PDB cluster.",
|
|
163
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
164
|
-
)
|
|
165
|
-
parser.add_argument(
|
|
166
|
-
"-c",
|
|
167
|
-
"--config",
|
|
168
|
-
required=False,
|
|
169
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
# Specific args of each building block
|
|
173
|
-
required_args = parser.add_argument_group("required arguments")
|
|
174
|
-
required_args.add_argument(
|
|
175
|
-
"-o",
|
|
176
|
-
"--output_pdb_zip_path",
|
|
177
|
-
required=True,
|
|
178
|
-
help="Path to the ZIP or PDB file containing the output PDB files. Accepted formats: pdb, zip.",
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
args = parser.parse_args()
|
|
182
|
-
config = args.config if args.config else None
|
|
183
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
184
|
-
|
|
185
|
-
# Specific call of each building block
|
|
186
|
-
pdb_cluster_zip(output_pdb_zip_path=args.output_pdb_zip_path, properties=properties)
|
|
187
147
|
|
|
148
|
+
pdb_cluster_zip.__doc__ = PdbClusterZip.__doc__
|
|
149
|
+
main = PdbClusterZip.get_main(pdb_cluster_zip, "Wrapper for the Protein Data Bank in Europe (https://www.ebi.ac.uk/pdbe/), the Protein Data Bank (https://www.rcsb.org/) and the MMB PDB mirror (http://mmb.irbbarcelona.org/api/) for downloading a PDB cluster.")
|
|
188
150
|
|
|
189
151
|
if __name__ == "__main__":
|
|
190
152
|
main()
|
biobb_io/api/pdb_variants.py
CHANGED
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
"""PdbVariants Module"""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
import re
|
|
7
|
-
from typing import Optional
|
|
8
|
-
|
|
9
6
|
import requests
|
|
10
|
-
from
|
|
7
|
+
from typing import Optional
|
|
11
8
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
12
9
|
from biobb_common.tools import file_utils as fu
|
|
13
10
|
from biobb_common.tools.file_utils import launchlogger
|
|
@@ -168,47 +165,11 @@ def pdb_variants(
|
|
|
168
165
|
) -> int:
|
|
169
166
|
"""Execute the :class:`PdbVariants <api.pdb_variants.PdbVariants>` class and
|
|
170
167
|
execute the :meth:`launch() <api.pdb_variants.PdbVariants.launch>` method."""
|
|
168
|
+
return PdbVariants(**dict(locals())).launch()
|
|
171
169
|
|
|
172
|
-
return PdbVariants(
|
|
173
|
-
output_mutations_list_txt=output_mutations_list_txt,
|
|
174
|
-
properties=properties,
|
|
175
|
-
**kwargs,
|
|
176
|
-
).launch()
|
|
177
|
-
|
|
178
|
-
pdb_variants.__doc__ = PdbVariants.__doc__
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
def main():
|
|
182
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
183
|
-
parser = argparse.ArgumentParser(
|
|
184
|
-
description="Wrapper for the UNIPROT (http://www.uniprot.org/) mirror of the MMB group REST API (http://mmb.irbbarcelona.org/api/) for creating a list of all the variants mapped to a PDB code from the corresponding UNIPROT entries.",
|
|
185
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
186
|
-
)
|
|
187
|
-
parser.add_argument(
|
|
188
|
-
"-c",
|
|
189
|
-
"--config",
|
|
190
|
-
required=False,
|
|
191
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
# Specific args of each building block
|
|
195
|
-
required_args = parser.add_argument_group("required arguments")
|
|
196
|
-
required_args.add_argument(
|
|
197
|
-
"-o",
|
|
198
|
-
"--output_mutations_list_txt",
|
|
199
|
-
required=True,
|
|
200
|
-
help="Path to the TXT file containing an ASCII comma separated values of the mutations. Accepted formats: txt.",
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
args = parser.parse_args()
|
|
204
|
-
config = args.config if args.config else None
|
|
205
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
206
|
-
|
|
207
|
-
# Specific call of each building block
|
|
208
|
-
pdb_variants(
|
|
209
|
-
output_mutations_list_txt=args.output_mutations_list_txt, properties=properties
|
|
210
|
-
)
|
|
211
170
|
|
|
171
|
+
pdb_variants.__doc__ = PdbVariants.__doc__
|
|
172
|
+
main = PdbVariants.get_main(pdb_variants, "Wrapper for the UNIPROT (http://www.uniprot.org/) mirror of the MMB group REST API (http://mmb.irbbarcelona.org/api/) for creating a list of all the variants mapped to a PDB code from the corresponding UNIPROT entries.")
|
|
212
173
|
|
|
213
174
|
if __name__ == "__main__":
|
|
214
175
|
main()
|
biobb_io/api/structure_info.py
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
"""Module containing the StructureInfo class and the command line interface."""
|
|
4
4
|
|
|
5
|
-
import argparse
|
|
6
5
|
from typing import Optional
|
|
7
|
-
|
|
8
|
-
from biobb_common.configuration import settings
|
|
9
6
|
from biobb_common.generic.biobb_object import BiobbObject
|
|
10
7
|
from biobb_common.tools.file_utils import launchlogger
|
|
11
8
|
|
|
@@ -113,43 +110,11 @@ def structure_info(
|
|
|
113
110
|
) -> int:
|
|
114
111
|
"""Execute the :class:`StructureInfo <api.structure_info.StructureInfo>` class and
|
|
115
112
|
execute the :meth:`launch() <api.structure_info.StructureInfo.launch>` method."""
|
|
113
|
+
return StructureInfo(**dict(locals())).launch()
|
|
116
114
|
|
|
117
|
-
return StructureInfo(
|
|
118
|
-
output_json_path=output_json_path, properties=properties, **kwargs
|
|
119
|
-
).launch()
|
|
120
|
-
|
|
121
|
-
structure_info.__doc__ = StructureInfo.__doc__
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
def main():
|
|
125
|
-
"""Command line execution of this building block. Please check the command line documentation."""
|
|
126
|
-
parser = argparse.ArgumentParser(
|
|
127
|
-
description="This class is a wrapper for getting all the available information of a structure from the Protein Data Bank.",
|
|
128
|
-
formatter_class=lambda prog: argparse.RawTextHelpFormatter(prog, width=99999),
|
|
129
|
-
)
|
|
130
|
-
parser.add_argument(
|
|
131
|
-
"-c",
|
|
132
|
-
"--config",
|
|
133
|
-
required=False,
|
|
134
|
-
help="This file can be a YAML file, JSON file or JSON string",
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
# Specific args of each building block
|
|
138
|
-
required_args = parser.add_argument_group("required arguments")
|
|
139
|
-
required_args.add_argument(
|
|
140
|
-
"-o",
|
|
141
|
-
"--output_json_path",
|
|
142
|
-
required=True,
|
|
143
|
-
help="Path to the output JSON file with all the structure information. Accepted formats: json.",
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
args = parser.parse_args()
|
|
147
|
-
config = args.config if args.config else None
|
|
148
|
-
properties = settings.ConfReader(config=config).get_prop_dic()
|
|
149
|
-
|
|
150
|
-
# Specific call of each building block
|
|
151
|
-
structure_info(output_json_path=args.output_json_path, properties=properties)
|
|
152
115
|
|
|
116
|
+
structure_info.__doc__ = StructureInfo.__doc__
|
|
117
|
+
main = StructureInfo.get_main(structure_info, "This class is a wrapper for getting all the available information of a structure from the Protein Data Bank.")
|
|
153
118
|
|
|
154
119
|
if __name__ == "__main__":
|
|
155
120
|
main()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 5.1.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: biobb_io
|
|
3
|
+
Version: 5.1.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
|
|
@@ -17,14 +17,26 @@ Classifier: Operating System :: Unix
|
|
|
17
17
|
Requires-Python: >=3.9
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist:
|
|
20
|
+
Requires-Dist: biobb_common==5.1.1
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: description-content-type
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: keywords
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
Dynamic: project-url
|
|
30
|
+
Dynamic: requires-dist
|
|
31
|
+
Dynamic: requires-python
|
|
32
|
+
Dynamic: summary
|
|
21
33
|
|
|
22
34
|
[](https://GitHub.com/bioexcel/biobb_io/tags/)
|
|
23
35
|
[](https://pypi.python.org/pypi/biobb-io/)
|
|
24
36
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
25
37
|
[](https://anaconda.org/bioconda/biobb_io)
|
|
26
38
|
[](https://quay.io/repository/biocontainers/biobb_io?tab=tags)
|
|
27
|
-
[](https://depot.galaxyproject.org/singularity/biobb_io:5.1.
|
|
39
|
+
[](https://depot.galaxyproject.org/singularity/biobb_io:5.1.1--pyhdfd78af_0)
|
|
28
40
|
|
|
29
41
|
[](https://github.com/bioexcel/biobb_io)
|
|
30
42
|
[](https://pypi.org/project/biobb-io/)
|
|
@@ -62,7 +74,7 @@ The latest documentation of this package can be found in our readthedocs site:
|
|
|
62
74
|
[latest API documentation](http://biobb-io.readthedocs.io/en/latest/).
|
|
63
75
|
|
|
64
76
|
### Version
|
|
65
|
-
v5.1.
|
|
77
|
+
v5.1.1 2025.1
|
|
66
78
|
|
|
67
79
|
### Installation
|
|
68
80
|
Using PIP:
|
|
@@ -71,7 +83,7 @@ Using PIP:
|
|
|
71
83
|
|
|
72
84
|
* Installation:
|
|
73
85
|
|
|
74
|
-
pip install "biobb_io==5.1.
|
|
86
|
+
pip install "biobb_io==5.1.1"
|
|
75
87
|
|
|
76
88
|
* Usage: [Python API documentation](https://biobb-io.readthedocs.io/en/latest/modules.html)
|
|
77
89
|
|
|
@@ -79,7 +91,7 @@ Using ANACONDA:
|
|
|
79
91
|
* Installation:
|
|
80
92
|
|
|
81
93
|
|
|
82
|
-
conda install -c bioconda "biobb_io==5.1.
|
|
94
|
+
conda install -c bioconda "biobb_io==5.1.1"
|
|
83
95
|
|
|
84
96
|
|
|
85
97
|
* 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 +100,12 @@ Using DOCKER:
|
|
|
88
100
|
* Installation:
|
|
89
101
|
|
|
90
102
|
|
|
91
|
-
docker pull quay.io/biocontainers/biobb_io:5.1.
|
|
103
|
+
docker pull quay.io/biocontainers/biobb_io:5.1.1--pyhdfd78af_0
|
|
92
104
|
|
|
93
105
|
* Usage:
|
|
94
106
|
|
|
95
107
|
|
|
96
|
-
docker run quay.io/biocontainers/biobb_io:5.1.
|
|
108
|
+
docker run quay.io/biocontainers/biobb_io:5.1.1--pyhdfd78af_0 <command>
|
|
97
109
|
|
|
98
110
|
|
|
99
111
|
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 +117,7 @@ Using SINGULARITY:
|
|
|
105
117
|
* Installation:
|
|
106
118
|
|
|
107
119
|
|
|
108
|
-
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.1.
|
|
120
|
+
singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.1.1--pyhdfd78af_0
|
|
109
121
|
|
|
110
122
|
|
|
111
123
|
* Usage:
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
biobb_io/__init__.py,sha256=yuyKuMxXekhEdVhlQAADYrFWmGfm2YyXpYKUdIDHuvc,77
|
|
2
|
+
biobb_io/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
biobb_io/api/__init__.py,sha256=s4K59-8EX7yX2qBtB8717ynIEjQ0lVNTp0BDSoc_raM,558
|
|
4
|
+
biobb_io/api/alphafold.py,sha256=EsUHtbypku6rNtMaDrnKf3KLoanuOOB0LOZOnenmoP0,4371
|
|
5
|
+
biobb_io/api/api_binding_site.py,sha256=2n2iPJozRKBZ7N_6nEibt8bx58Tp2TTzKpH5g6L5_7c,4819
|
|
6
|
+
biobb_io/api/canonical_fasta.py,sha256=ohuVq410Vk_OvnMVYxReb9QUuce3Ki3FFhV_DJhKZW8,4753
|
|
7
|
+
biobb_io/api/common.py,sha256=KY3ayHCaGBe9zTLDdDc_wK13xXeIaEHTegeWPR2t02M,15766
|
|
8
|
+
biobb_io/api/ideal_sdf.py,sha256=BKpFIPcZ8vV6ayQXCmP3Kt_rcQf3ltQCRTtcCqGHriE,4566
|
|
9
|
+
biobb_io/api/ligand.py,sha256=pMd5wvYqYNlVYT5MatrX346whVfwYY58B2RR_FqEwhE,4610
|
|
10
|
+
biobb_io/api/mddb.py,sha256=J5qgudIQEeE9-UXwjFPQAiFkc7aHXVMMG7Z_j2Dj3yI,7067
|
|
11
|
+
biobb_io/api/memprotmd_sim.py,sha256=UKgc4UJPukjmBwelVcKbFqGqQhA9BOtfrlJiHf_aW5Q,4120
|
|
12
|
+
biobb_io/api/memprotmd_sim_list.py,sha256=WOg4YqWfMvIAgz_19oZ-8asKJnFv8MmRfz0t5ZQhUZo,4059
|
|
13
|
+
biobb_io/api/memprotmd_sim_search.py,sha256=vWfBxNYCmGwGyzTpHnmnuwQ39ZXWO8T0MhdjGjGgZr4,6419
|
|
14
|
+
biobb_io/api/mmcif.py,sha256=M8Tlto6d2hLTUwZGo6zIUGO5bzN6ZwMqYoiMMu1b-rM,4628
|
|
15
|
+
biobb_io/api/pdb.py,sha256=uRCMPSvuOSUObMsxlRC513wJ2bmFEh9P8FPtG30yfp0,4975
|
|
16
|
+
biobb_io/api/pdb_cluster_zip.py,sha256=9s_HXWep7X3h-kNq1cYbadXgDmsAlG8_Sat0q0snyDA,6633
|
|
17
|
+
biobb_io/api/pdb_variants.py,sha256=BGIbsHl64IANiq2R39dycIxBRGPjm3u1oGpTyeWQ2nA,6707
|
|
18
|
+
biobb_io/api/structure_info.py,sha256=aoh_Do7QipPgsse7ay-nlddeGCrK-YEjUHbg1Q21HgE,4443
|
|
19
|
+
biobb_io/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
biobb_io-5.1.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
21
|
+
biobb_io-5.1.1.dist-info/METADATA,sha256=LTPhHWFk9SzHSC-AxEUmkmrGU8wdoAvhSlTRHJfFxxc,7049
|
|
22
|
+
biobb_io-5.1.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
23
|
+
biobb_io-5.1.1.dist-info/entry_points.txt,sha256=dDYvVClLKe_Aa3HaMm-7WuS2d16FKGxlnKl816Cf5T4,644
|
|
24
|
+
biobb_io-5.1.1.dist-info/top_level.txt,sha256=1VPldlX2AnFaqODGFJK10WN8AOQuulpX88bLSaQdoS8,9
|
|
25
|
+
biobb_io-5.1.1.dist-info/RECORD,,
|
biobb_io-5.1.0.dist-info/RECORD
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
biobb_io/__init__.py,sha256=y_NxlBZAIu68iadiLxWmXIu6Oxx3QnJ7mqtfnVoR1o0,77
|
|
2
|
-
biobb_io/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
biobb_io/api/__init__.py,sha256=s4K59-8EX7yX2qBtB8717ynIEjQ0lVNTp0BDSoc_raM,558
|
|
4
|
-
biobb_io/api/alphafold.py,sha256=VitY1VGJcxo_WysO6r7qMxtMGAkNpr-EO3SqyNp76n8,5445
|
|
5
|
-
biobb_io/api/api_binding_site.py,sha256=E28InSCJ6cSeZRu4UDWr3ee1yQhPlKqUlG8eklMt9_o,5939
|
|
6
|
-
biobb_io/api/canonical_fasta.py,sha256=vc2-s8eBOo-QtJ1V9Io1eKQtmuJ17mH_6sPYIA1HIPk,5839
|
|
7
|
-
biobb_io/api/common.py,sha256=gD4Pl76uI2htDzxiOHGNdsZdO-CtU8G6BQ4d_RPIeSo,15059
|
|
8
|
-
biobb_io/api/ideal_sdf.py,sha256=9snXVskC63Ro13UhOwwCkAv89dyjkZ0AtHYy9VOAqvM,5641
|
|
9
|
-
biobb_io/api/ligand.py,sha256=1bBHRbtRFpr3eNjjXjmmdOPe18UOqdx_FxQ4wyY9zuM,5694
|
|
10
|
-
biobb_io/api/mddb.py,sha256=xo15VOiuI793i6i2UeOjVrLrq-00mibp-ev8spy44Qg,7664
|
|
11
|
-
biobb_io/api/memprotmd_sim.py,sha256=hJB9c_Y-iL0YxorlNX02ruIa7vAbi8mTO0_WQktTQeg,5217
|
|
12
|
-
biobb_io/api/memprotmd_sim_list.py,sha256=PJxoPlQLOVLrEuCkOYhQs5uWsthi2pEzWtdo5dpTDc0,5158
|
|
13
|
-
biobb_io/api/memprotmd_sim_search.py,sha256=6gjvxeguAlleLHKj6h00usyvyMfZmlbG1ER4IuGZBRE,7515
|
|
14
|
-
biobb_io/api/mmcif.py,sha256=oGQqvnBy76mjKcFbLJLbTusW858-mK63NyUGC9hKC1Q,5725
|
|
15
|
-
biobb_io/api/pdb.py,sha256=hqlpLXIORcBR34S8N8sSqczXxJ4S1X3SQSm7j6YtGLI,6055
|
|
16
|
-
biobb_io/api/pdb_cluster_zip.py,sha256=qdhTzQgCmYNT5Fi1ufRMqVeTgDz63T92wvHb8ezJDhM,7838
|
|
17
|
-
biobb_io/api/pdb_variants.py,sha256=PW4abc_Z3pxAdjFW2rl_p8jszyFLIFTDGzOwc9RwdR8,7913
|
|
18
|
-
biobb_io/api/structure_info.py,sha256=Dip_BMSgvlpAw8kBx8PIdQPihriQJqZs5aXy3Ui4bUQ,5555
|
|
19
|
-
biobb_io/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
biobb_io-5.1.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
21
|
-
biobb_io-5.1.0.dist-info/METADATA,sha256=yTYA6qU7AnlRv-o6fNcrPQsTYI0jYpkLdu_19CUkKTc,6792
|
|
22
|
-
biobb_io-5.1.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
23
|
-
biobb_io-5.1.0.dist-info/entry_points.txt,sha256=dDYvVClLKe_Aa3HaMm-7WuS2d16FKGxlnKl816Cf5T4,644
|
|
24
|
-
biobb_io-5.1.0.dist-info/top_level.txt,sha256=1VPldlX2AnFaqODGFJK10WN8AOQuulpX88bLSaQdoS8,9
|
|
25
|
-
biobb_io-5.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|