biobb-io 5.0.1__py3-none-any.whl → 5.1.0__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 CHANGED
@@ -2,4 +2,4 @@ from . import api
2
2
 
3
3
  name = "biobb_io"
4
4
  __all__ = ["api"]
5
- __version__ = "5.0.1"
5
+ __version__ = "5.1.0"
biobb_io/api/__init__.py CHANGED
@@ -12,6 +12,7 @@ from . import (
12
12
  pdb_cluster_zip,
13
13
  pdb_variants,
14
14
  structure_info,
15
+ mddb
15
16
  )
16
17
 
17
18
  name = "api"
@@ -29,4 +30,5 @@ __all__ = [
29
30
  "mmcif",
30
31
  "ideal_sdf",
31
32
  "structure_info",
33
+ "mddb"
32
34
  ]
biobb_io/api/alphafold.py CHANGED
@@ -118,6 +118,8 @@ def alphafold(output_pdb_path: str, properties: Optional[dict] = None, **kwargs)
118
118
  output_pdb_path=output_pdb_path, properties=properties, **kwargs
119
119
  ).launch()
120
120
 
121
+ alphafold.__doc__ = AlphaFold.__doc__
122
+
121
123
 
122
124
  def main():
123
125
  """Command line execution of this building block. Please check the command line documentation."""
@@ -130,6 +130,8 @@ def api_binding_site(
130
130
  output_json_path=output_json_path, properties=properties, **kwargs
131
131
  ).launch()
132
132
 
133
+ api_binding_site.__doc__ = ApiBindingSite.__doc__
134
+
133
135
 
134
136
  def main():
135
137
  """Command line execution of this building block. Please check the command line documentation."""
@@ -120,6 +120,8 @@ def canonical_fasta(
120
120
  output_fasta_path=output_fasta_path, properties=properties, **kwargs
121
121
  ).launch()
122
122
 
123
+ canonical_fasta.__doc__ = CanonicalFasta.__doc__
124
+
123
125
 
124
126
  def main():
125
127
  """Command line execution of this building block. Please check the command line documentation."""
biobb_io/api/common.py CHANGED
@@ -4,6 +4,7 @@ import json
4
4
  import os
5
5
  import re
6
6
  import urllib.request
7
+ import urllib.parse
7
8
  from pathlib import Path, PurePath
8
9
 
9
10
  import requests
@@ -20,14 +21,12 @@ def check_output_path(path, argument, optional, out_log, classname) -> str:
20
21
  file_extension = PurePath(path).suffix
21
22
  if not is_valid_file(file_extension[1:], argument):
22
23
  fu.log(
23
- classname
24
- + ": Format %s in %s file is not compatible"
24
+ classname + ": Format %s in %s file is not compatible"
25
25
  % (file_extension[1:], argument),
26
26
  out_log,
27
27
  )
28
28
  raise SystemExit(
29
- classname
30
- + ": Format %s in %s file is not compatible"
29
+ classname + ": Format %s in %s file is not compatible"
31
30
  % (file_extension[1:], argument)
32
31
  )
33
32
  return path
@@ -45,6 +44,8 @@ def is_valid_file(ext, argument):
45
44
  "output_json_path": ["json"],
46
45
  "output_fasta_path": ["fasta"],
47
46
  "output_mmcif_path": ["mmcif", "cif"],
47
+ "output_top_path": ["pdb"],
48
+ "output_trj_path": ["mdcrd", "trr", "xtc"]
48
49
  }
49
50
  return ext in formats[argument]
50
51
 
@@ -84,6 +85,42 @@ def download_af(uniprot_code, out_log=None, global_log=None, classname=None):
84
85
  return r.content.decode("utf-8")
85
86
 
86
87
 
88
+ def download_mddb_top(project_id, node_id, selection, out_log=None, global_log=None, classname=None):
89
+ """
90
+ Returns:
91
+ String: Content of the pdb file.
92
+ """
93
+
94
+ url = "https://" + node_id + ".mddbr.eu/api/rest/v1/projects/" + project_id + "/structure?selection=" + urllib.parse.quote(str(selection))
95
+
96
+ fu.log("Downloading %s topology from: %s" % (project_id, url), out_log, global_log)
97
+
98
+ r = requests.get(url)
99
+ if r.status_code == 404:
100
+ fu.log(classname + ": Incorrect url, check project_id, node_id and selection: %s" % (url), out_log)
101
+ raise SystemExit(classname + ": Incorrect url, check project_id, node_id and selection: %s" % (url))
102
+
103
+ return r.content.decode("utf-8")
104
+
105
+
106
+ def download_mddb_trj(project_id, node_id, trj_format, frames, selection, out_log=None, global_log=None, classname=None):
107
+ """
108
+ Returns:
109
+ String: Content of the trajectory file.
110
+ """
111
+
112
+ url = "https://" + node_id + ".mddbr.eu/api/rest/v1/projects/" + project_id + "/trajectory?format=" + trj_format + "&frames=" + frames + "&selection=" + urllib.parse.quote(str(selection))
113
+
114
+ fu.log("Downloading %s trajectory from: %s" % (project_id, url), out_log, global_log)
115
+
116
+ r = requests.get(url)
117
+ if r.status_code == 404:
118
+ fu.log(classname + ": Incorrect url, check project_id, node_id, trj_format, frames and selection: %s" % (url), out_log)
119
+ raise SystemExit(classname + ": Incorrect url, check project_id, node_id, trj_format, frames and selection: %s" % (url))
120
+
121
+ return r.content
122
+
123
+
87
124
  def download_mmcif(pdb_code, api_id, out_log=None, global_log=None):
88
125
  """
89
126
  Returns:
@@ -112,9 +149,7 @@ def download_ligand(ligand_code, api_id, out_log=None, global_log=None):
112
149
  text = requests.get(url, verify=True).content.decode("utf-8")
113
150
  elif api_id == "pdbe":
114
151
  url = (
115
- "https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/"
116
- + ligand_code.upper()
117
- + "_ideal.pdb"
152
+ "https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/" + ligand_code.upper() + "_ideal.pdb"
118
153
  )
119
154
  text = urllib.request.urlopen(url).read().decode("utf-8")
120
155
 
@@ -173,16 +208,12 @@ def download_ideal_sdf(ligand_code, api_id, out_log=None, global_log=None):
173
208
 
174
209
  if api_id == "pdb":
175
210
  url = (
176
- "https://files.rcsb.org/ligands/download/"
177
- + ligand_code.upper()
178
- + "_ideal.sdf"
211
+ "https://files.rcsb.org/ligands/download/" + ligand_code.upper() + "_ideal.sdf"
179
212
  )
180
213
  text = requests.get(url, verify=True).content.decode("utf-8")
181
214
  elif api_id == "pdbe":
182
215
  url = (
183
- "https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/"
184
- + ligand_code.upper()
185
- + "_ideal.sdf"
216
+ "https://www.ebi.ac.uk/pdbe/static/files/pdbechem_v2/" + ligand_code.upper() + "_ideal.sdf"
186
217
  )
187
218
  text = urllib.request.urlopen(url).read().decode("utf-8")
188
219
 
@@ -230,6 +261,13 @@ def write_pdb(pdb_string, output_pdb_path, filt=None, out_log=None, global_log=N
230
261
  output_pdb_file.write(pdb_string)
231
262
 
232
263
 
264
+ def write_bin(bin_string, output_bin_path, out_log=None, global_log=None):
265
+ """Writes a BIN"""
266
+ fu.log("Writting bin to: %s" % (output_bin_path), out_log, global_log)
267
+ with open(output_bin_path, "wb") as output_bin_file:
268
+ output_bin_file.write(bin_string)
269
+
270
+
233
271
  def write_mmcif(mmcif_string, output_mmcif_path, out_log=None, global_log=None):
234
272
  """Writes a mmcif"""
235
273
  fu.log("Writting mmcif to: %s" % (output_mmcif_path), out_log, global_log)
@@ -268,22 +306,11 @@ def get_cluster_pdb_codes(pdb_code, cluster, out_log=None, global_log=None):
268
306
 
269
307
  if out_log:
270
308
  out_log.info(
271
- "Cluster: "
272
- + str(cluster)
273
- + " of pdb_code: "
274
- + pdb_code
275
- + "\n List: "
276
- + str(pdb_codes)
309
+ "Cluster: " + str(cluster) + " of pdb_code: " + pdb_code + "\n List: " + str(pdb_codes)
277
310
  )
278
311
  if global_log:
279
312
  global_log.info(
280
- fu.get_logs_prefix()
281
- + "Cluster: "
282
- + str(cluster)
283
- + " of pdb_code: "
284
- + pdb_code
285
- + "\n List: "
286
- + str(pdb_codes)
313
+ fu.get_logs_prefix() + "Cluster: " + str(cluster) + " of pdb_code: " + pdb_code + "\n List: " + str(pdb_codes)
287
314
  )
288
315
 
289
316
  return pdb_codes
@@ -395,9 +422,7 @@ def get_memprotmd_sim(pdb_code, output_file, out_log=None, global_log=None):
395
422
  fu.log("Getting simulation file from pdb code %s" % (pdb_code), out_log, global_log)
396
423
 
397
424
  url = (
398
- "http://memprotmd.bioch.ox.ac.uk/data/memprotmd/simulations/"
399
- + pdb_code
400
- + "_default_dppc/files/run/at.zip"
425
+ "http://memprotmd.bioch.ox.ac.uk/data/memprotmd/simulations/" + pdb_code + "_default_dppc/files/run/at.zip"
401
426
  )
402
427
  response = requests.get(url)
403
428
 
biobb_io/api/ideal_sdf.py CHANGED
@@ -118,6 +118,8 @@ def ideal_sdf(output_sdf_path: str, properties: Optional[dict] = None, **kwargs)
118
118
  output_sdf_path=output_sdf_path, properties=properties, **kwargs
119
119
  ).launch()
120
120
 
121
+ ideal_sdf.__doc__ = IdealSdf.__doc__
122
+
121
123
 
122
124
  def main():
123
125
  """Command line execution of this building block. Please check the command line documentation."""
biobb_io/api/ligand.py CHANGED
@@ -27,7 +27,7 @@ class Ligand(BiobbObject):
27
27
  output_pdb_path (str): Path to the output PDB ligand file. File type: output. `Sample file <https://github.com/bioexcel/biobb_io/raw/master/biobb_io/test/reference/api/output_ligand.pdb>`_. Accepted formats: pdb (edam:format_1476).
28
28
  properties (dic - Python dictionary object containing the tool parameters, not input/output files):
29
29
  * **ligand_code** (*str*) - (None) RSCB PDB ligand code.
30
- * **api_id** (*str*) - ("mmb") Identifier of the PDB REST API from which the PDB structure will be downloaded. Values: pdbe (`PDB in Europe REST API <https://www.ebi.ac.uk/pdbe/pdbe-rest-api>`_), mmb (`MMB PDB mirror API <http://mmb.irbbarcelona.org/api/>`_).
30
+ * **api_id** (*str*) - ("pdbe") Identifier of the PDB REST API from which the PDB structure will be downloaded. Values: pdbe (`PDB in Europe REST API <https://www.ebi.ac.uk/pdbe/pdbe-rest-api>`_), mmb (`MMB PDB mirror API <http://mmb.irbbarcelona.org/api/>`_).
31
31
  * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
32
32
  * **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
33
33
  * **sandbox_path** (*str*) - ("./") [WF property] Parent path to the sandbox directory.
@@ -38,7 +38,7 @@ class Ligand(BiobbObject):
38
38
  from biobb_io.api.ligand import ligand
39
39
  prop = {
40
40
  'ligand_code': 'CPB',
41
- 'api_id': 'mmb'
41
+ 'api_id': 'pdbe'
42
42
  }
43
43
  ligand(output_pdb_path='/path/to/newLigand.pdb',
44
44
  properties=prop)
@@ -64,7 +64,7 @@ class Ligand(BiobbObject):
64
64
  self.io_dict = {"out": {"output_pdb_path": output_pdb_path}}
65
65
 
66
66
  # Properties specific for BB
67
- self.api_id = properties.get("api_id", "mmb")
67
+ self.api_id = properties.get("api_id", "pdbe")
68
68
  self.ligand_code = properties.get("ligand_code", None)
69
69
  self.properties = properties
70
70
 
@@ -118,6 +118,8 @@ def ligand(output_pdb_path: str, properties: Optional[dict] = None, **kwargs) ->
118
118
  output_pdb_path=output_pdb_path, properties=properties, **kwargs
119
119
  ).launch()
120
120
 
121
+ ligand.__doc__ = Ligand.__doc__
122
+
121
123
 
122
124
  def main():
123
125
  """Command line execution of this building block. Please check the command line documentation."""
biobb_io/api/mddb.py ADDED
@@ -0,0 +1,196 @@
1
+ #!/usr/bin/env python
2
+
3
+ """Module containing the MDDB 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_mddb_top,
16
+ write_pdb,
17
+ download_mddb_trj,
18
+ write_bin
19
+ )
20
+
21
+
22
+ class MDDB(BiobbObject):
23
+ """
24
+ | biobb_io MDDB
25
+ | This class is a wrapper for downloading a trajectory / topology pair from the MDDB Database.
26
+ | Wrapper for the `MDDB Database <https://mmb.mddbr.eu/>`_ for downloading a trajectory and its corresponding topology.
27
+
28
+ Args:
29
+ output_top_path (str): Path to the output toplogy file. File type: output. `Sample file <https://github.com/bioexcel/biobb_io/raw/master/biobb_io/test/reference/api/output_mddb.pdb>`_. Accepted formats: pdb (edam:format_1476).
30
+ output_trj_path (str): Path to the output trajectory file. File type: output. `Sample file <https://github.com/bioexcel/biobb_io/raw/master/biobb_io/test/reference/api/output_mddb.xtc>`_. Accepted formats: mdcrd (edam:format_3878), trr (edam:format_3910), xtc (edam:format_3875).
31
+ properties (dic - Python dictionary object containing the tool parameters, not input/output files):
32
+ * **project_id** (*str*) - (None) Project accession or identifier.
33
+ * **node_id** (*str*) - ("mmb") MDDB node identifier.
34
+ * **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
+ * **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
+ * **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.
37
+ * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
38
+ * **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
39
+ * **sandbox_path** (*str*) - ("./") [WF property] Parent path to the sandbox directory.
40
+
41
+ Examples:
42
+ This is a use example of how to use the building block from Python::
43
+
44
+ from biobb_io.api.mddb import mddb
45
+ prop = {
46
+ 'project_id': 'A0001',
47
+ 'trj_format': 'xtc'
48
+ }
49
+ mddb(output_top_path='/path/to/newTopology.pdb',
50
+ output_trj_path='/path/to/newTrajectory.pdb',
51
+ properties=prop)
52
+
53
+ Info:
54
+ * wrapped_software:
55
+ * name: MDDB Database
56
+ * license: Apache-2.0
57
+ * ontology:
58
+ * name: EDAM
59
+ * schema: http://edamontology.org/EDAM.owl
60
+
61
+ """
62
+
63
+ def __init__(self, output_top_path, output_trj_path, properties=None, **kwargs) -> None:
64
+ properties = properties or {}
65
+
66
+ # Call parent class constructor
67
+ super().__init__(properties)
68
+ self.locals_var_dict = locals().copy()
69
+
70
+ # Input/Output files
71
+ self.io_dict = {"out": {"output_top_path": output_top_path, "output_trj_path": output_trj_path}}
72
+
73
+ # Properties specific for BB
74
+ self.project_id = properties.get("project_id", None)
75
+ self.node_id = properties.get("node_id", "mmb")
76
+ self.trj_format = properties.get("trj_format", "xtc")
77
+ self.frames = properties.get("frames", "")
78
+ self.selection = properties.get("selection", "*")
79
+ self.properties = properties
80
+
81
+ # Check the properties
82
+ self.check_properties(properties)
83
+ self.check_arguments()
84
+
85
+ def check_data_params(self, out_log, err_log):
86
+ """Checks all the input/output paths and parameters"""
87
+ self.output_top_path = check_output_path(
88
+ self.io_dict["out"]["output_top_path"],
89
+ "output_top_path",
90
+ False,
91
+ out_log,
92
+ self.__class__.__name__,
93
+ )
94
+ self.output_trj_path = check_output_path(
95
+ self.io_dict["out"]["output_trj_path"],
96
+ "output_trj_path",
97
+ False,
98
+ out_log,
99
+ self.__class__.__name__,
100
+ )
101
+
102
+ @launchlogger
103
+ def launch(self) -> int:
104
+ """Execute the :class:`MDDB <api.mddb.MDDB>` api.mddb.MDDB object."""
105
+
106
+ # check input/output paths and parameters
107
+ self.check_data_params(self.out_log, self.err_log)
108
+
109
+ # Setup Biobb
110
+ if self.check_restart():
111
+ return 0
112
+
113
+ check_mandatory_property(
114
+ self.project_id, "project_id", self.out_log, self.__class__.__name__
115
+ )
116
+
117
+ self.project_id = self.project_id.strip().upper()
118
+
119
+ # Downloading topology file
120
+ top_string = download_mddb_top(
121
+ self.project_id,
122
+ self.node_id,
123
+ self.selection,
124
+ self.out_log,
125
+ self.global_log,
126
+ self.__class__.__name__
127
+ )
128
+ write_pdb(top_string, self.output_top_path, None, self.out_log, self.global_log)
129
+
130
+ # Downloading trajectory file
131
+ trj_string = download_mddb_trj(
132
+ self.project_id,
133
+ self.node_id,
134
+ self.trj_format,
135
+ self.frames,
136
+ self.selection,
137
+ self.out_log,
138
+ self.global_log,
139
+ self.__class__.__name__,
140
+ )
141
+ write_bin(trj_string, self.output_trj_path, self.out_log, self.global_log)
142
+
143
+ self.check_arguments(output_files_created=True, raise_exception=False)
144
+
145
+ return 0
146
+
147
+
148
+ def mddb(output_top_path: str, output_trj_path: str, properties: Optional[dict] = None, **kwargs) -> int:
149
+ """Execute the :class:`MDDB <api.mddb.MDDB>` class and
150
+ execute the :meth:`launch() <api.mddb.MDDB.launch>` method."""
151
+
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
+
194
+
195
+ if __name__ == "__main__":
196
+ main()
@@ -113,6 +113,8 @@ def memprotmd_sim(
113
113
  output_simulation=output_simulation, properties=properties, **kwargs
114
114
  ).launch()
115
115
 
116
+ memprotmd_sim.__doc__ = MemProtMDSim.__doc__
117
+
116
118
 
117
119
  def main():
118
120
  """Command line execution of this building block. Please check the command line documentation."""
@@ -102,6 +102,8 @@ def memprotmd_sim_list(
102
102
  output_simulations=output_simulations, properties=properties, **kwargs
103
103
  ).launch()
104
104
 
105
+ memprotmd_sim_list.__doc__ = MemProtMDSimList.__doc__
106
+
105
107
 
106
108
  def main():
107
109
  """Command line execution of this building block. Please check the command line documentation."""
@@ -113,6 +113,8 @@ def memprotmd_sim_search(
113
113
  output_simulations=output_simulations, properties=properties, **kwargs
114
114
  ).launch()
115
115
 
116
+ memprotmd_sim_search.__doc__ = MemProtMDSimSearch.__doc__
117
+
116
118
 
117
119
  def main():
118
120
  """Command line execution of this building block. Please check the command line documentation."""
biobb_io/api/mmcif.py CHANGED
@@ -118,6 +118,8 @@ def mmcif(output_mmcif_path: str, properties: Optional[dict] = None, **kwargs) -
118
118
  output_mmcif_path=output_mmcif_path, properties=properties, **kwargs
119
119
  ).launch()
120
120
 
121
+ mmcif.__doc__ = Mmcif.__doc__
122
+
121
123
 
122
124
  def main():
123
125
  """Command line execution of this building block. Please check the command line documentation."""
biobb_io/api/pdb.py CHANGED
@@ -123,6 +123,8 @@ def pdb(output_pdb_path: str, properties: Optional[dict] = None, **kwargs) -> in
123
123
  output_pdb_path=output_pdb_path, properties=properties, **kwargs
124
124
  ).launch()
125
125
 
126
+ pdb.__doc__ = Pdb.__doc__
127
+
126
128
 
127
129
  def main():
128
130
  """Command line execution of this building block. Please check the command line documentation."""
@@ -132,7 +132,10 @@ class PdbClusterZip(BiobbObject):
132
132
  fu.log("Zipping the pdb files to: %s" % self.output_pdb_zip_path)
133
133
  fu.zip_list(self.output_pdb_zip_path, file_list, out_log=self.out_log)
134
134
 
135
- self.tmp_files.extend([self.stage_io_dict.get("unique_dir", ""), unique_dir])
135
+ self.tmp_files.extend([
136
+ # self.stage_io_dict.get("unique_dir", ""),
137
+ unique_dir
138
+ ])
136
139
  self.remove_tmp_files()
137
140
 
138
141
  self.check_arguments(output_files_created=True, raise_exception=False)
@@ -150,6 +153,8 @@ def pdb_cluster_zip(
150
153
  output_pdb_zip_path=output_pdb_zip_path, properties=properties, **kwargs
151
154
  ).launch()
152
155
 
156
+ pdb_cluster_zip.__doc__ = PdbClusterZip.__doc__
157
+
153
158
 
154
159
  def main():
155
160
  """Command line execution of this building block. Please check the command line documentation."""
@@ -131,14 +131,10 @@ class PdbVariants(BiobbObject):
131
131
  for k in mapdic.keys():
132
132
  for fragment in mapdic[k]:
133
133
  if (
134
- int(fragment["unp_start"])
135
- <= int(uni_mut["resnum"])
136
- <= int(fragment["unp_end"])
134
+ int(fragment["unp_start"]) <= int(uni_mut["resnum"]) <= int(fragment["unp_end"])
137
135
  ):
138
136
  resnum = (
139
- int(uni_mut["resnum"])
140
- + int(fragment["pdb_start"])
141
- - int(fragment["unp_start"])
137
+ int(uni_mut["resnum"]) + int(fragment["pdb_start"]) - int(fragment["unp_start"])
142
138
  )
143
139
  mutations.append(
144
140
  k[-1] + "." + uni_mut["wt"] + str(resnum) + uni_mut["mt"]
@@ -179,6 +175,8 @@ def pdb_variants(
179
175
  **kwargs,
180
176
  ).launch()
181
177
 
178
+ pdb_variants.__doc__ = PdbVariants.__doc__
179
+
182
180
 
183
181
  def main():
184
182
  """Command line execution of this building block. Please check the command line documentation."""
@@ -118,6 +118,8 @@ def structure_info(
118
118
  output_json_path=output_json_path, properties=properties, **kwargs
119
119
  ).launch()
120
120
 
121
+ structure_info.__doc__ = StructureInfo.__doc__
122
+
121
123
 
122
124
  def main():
123
125
  """Command line execution of this building block. Please check the command line documentation."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
- Name: biobb_io
3
- Version: 5.0.1
2
+ Name: biobb-io
3
+ Version: 5.1.0
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,14 @@ 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: biobb-common==5.0.0
20
+ Requires-Dist: biobb-common ==5.1.0
21
21
 
22
22
  [![](https://img.shields.io/github/v/tag/bioexcel/biobb_io?label=Version)](https://GitHub.com/bioexcel/biobb_io/tags/)
23
23
  [![](https://img.shields.io/pypi/v/biobb-io.svg?label=Pypi)](https://pypi.python.org/pypi/biobb-io/)
24
24
  [![](https://img.shields.io/conda/vn/bioconda/biobb_io?label=Conda)](https://anaconda.org/bioconda/biobb_io)
25
25
  [![](https://img.shields.io/conda/dn/bioconda/biobb_io?label=Conda%20Downloads)](https://anaconda.org/bioconda/biobb_io)
26
26
  [![](https://img.shields.io/badge/Docker-Quay.io-blue)](https://quay.io/repository/biocontainers/biobb_io?tab=tags)
27
- [![](https://img.shields.io/badge/Singularity-GalaxyProject-blue)](https://depot.galaxyproject.org/singularity/biobb_io:5.0.1--pyhdfd78af_0)
27
+ [![](https://img.shields.io/badge/Singularity-GalaxyProject-blue)](https://depot.galaxyproject.org/singularity/biobb_io:5.1.0--pyhdfd78af_0)
28
28
 
29
29
  [![](https://img.shields.io/badge/OS-Unix%20%7C%20MacOS-blue)](https://github.com/bioexcel/biobb_io)
30
30
  [![](https://img.shields.io/pypi/pyversions/biobb-io.svg?label=Python%20Versions)](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.1 2024.2
65
+ v5.1.0 2025.1
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.1"
74
+ pip install "biobb_io==5.1.0"
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.1"
82
+ conda install -c bioconda "biobb_io==5.1.0"
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.1--pyhdfd78af_0
91
+ docker pull quay.io/biocontainers/biobb_io:5.1.0--pyhdfd78af_0
92
92
 
93
93
  * Usage:
94
94
 
95
95
 
96
- docker run quay.io/biocontainers/biobb_io:5.0.1--pyhdfd78af_0 <command>
96
+ docker run quay.io/biocontainers/biobb_io:5.1.0--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.1--pyhdfd78af_0
108
+ singularity pull --name biobb_io.sif https://depot.galaxyproject.org/singularity/biobb_io:5.1.0--pyhdfd78af_0
109
109
 
110
110
 
111
111
  * Usage:
@@ -118,10 +118,10 @@ Using SINGULARITY:
118
118
  The command list and specification can be found at the [Command Line documentation](https://biobb-io.readthedocs.io/en/latest/command_line.html).
119
119
 
120
120
  ### Copyright & Licensing
121
- This software has been developed in the [MMB group](http://mmb.irbbarcelona.org) at the [BSC](http://www.bsc.es/) & [IRB](https://www.irbbarcelona.org/) for the [European BioExcel](http://bioexcel.eu/), funded by the European Commission (EU H2020 [823830](http://cordis.europa.eu/projects/823830), EU H2020 [675728](http://cordis.europa.eu/projects/675728)).
121
+ This software has been developed in the [MMB group](http://mmb.irbbarcelona.org) at the [BSC](http://www.bsc.es/) & [IRB](https://www.irbbarcelona.org/) for the [European BioExcel](http://bioexcel.eu/), funded by the European Commission (EU Horizon Europe [101093290](https://cordis.europa.eu/project/id/101093290), EU H2020 [823830](http://cordis.europa.eu/projects/823830), EU H2020 [675728](http://cordis.europa.eu/projects/675728)).
122
122
 
123
- * (c) 2015-2024 [Barcelona Supercomputing Center](https://www.bsc.es/)
124
- * (c) 2015-2024 [Institute for Research in Biomedicine](https://www.irbbarcelona.org/)
123
+ * (c) 2015-2025 [Barcelona Supercomputing Center](https://www.bsc.es/)
124
+ * (c) 2015-2025 [Institute for Research in Biomedicine](https://www.irbbarcelona.org/)
125
125
 
126
126
  Licensed under the
127
127
  [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), see the file LICENSE for details.
@@ -0,0 +1,25 @@
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: bdist_wheel (0.41.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -4,6 +4,7 @@ api_binding_site = biobb_io.api.api_binding_site:main
4
4
  canonical_fasta = biobb_io.api.canonical_fasta:main
5
5
  ideal_sdf = biobb_io.api.ideal_sdf:main
6
6
  ligand = biobb_io.api.ligand:main
7
+ mddb = biobb_io.api.mddb:main
7
8
  memprotmd_sim = biobb_io.api.memprotmd_sim:main
8
9
  memprotmd_sim_list = biobb_io.api.memprotmd_sim_list:main
9
10
  memprotmd_sim_search = biobb_io.api.memprotmd_sim_search:main
@@ -1,24 +0,0 @@
1
- biobb_io/__init__.py,sha256=5fB4i9qgGOZ0ZrZRiZrdxgVxzntL56ErhlDSvnqqnP8,77
2
- biobb_io/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- biobb_io/api/__init__.py,sha256=fR17sA2mh78x2NoyM25XN3vlsjka4aNubzaP4SvpCDc,538
4
- biobb_io/api/alphafold.py,sha256=e_5N0yntKTjI-Sd9cM1IGv56FwlD1HqeODXooSLmSBg,5402
5
- biobb_io/api/api_binding_site.py,sha256=cu6McFh1e75J8JMaZHjnfiK2ljQVOsREsXH3ZvOyUyU,5884
6
- biobb_io/api/canonical_fasta.py,sha256=DTwvoV8yY_xX_X3E9PbhucNaLk21jJ-K_34db1p9SOU,5785
7
- biobb_io/api/common.py,sha256=TQD3oSWL-WtXxJHnNp9469Iun-REqFeAb8dmKWU3UJc,13384
8
- biobb_io/api/ideal_sdf.py,sha256=MxNiFLoQU0tF7k3mztDYHkIpmZ5s9Z0p4BI-NlTW7Dc,5599
9
- biobb_io/api/ligand.py,sha256=_iFZWxuMPz2c0IOQPpeaBsvjsFcOr0wqtf0c6QICX2M,5654
10
- biobb_io/api/memprotmd_sim.py,sha256=bnZFaAMkMIYzS75VognyNh0H8F5gZCwQM1ErhLrrtWw,5167
11
- biobb_io/api/memprotmd_sim_list.py,sha256=zFsaM-d2efmiWPbMEMFEUmKKet9P18O4-7XsMxgh3a4,5099
12
- biobb_io/api/memprotmd_sim_search.py,sha256=_bTzx552Sn2GiogGojWL5uR8mPNsgJwEUxA9P_jgiKE,7452
13
- biobb_io/api/mmcif.py,sha256=kntBTLcWpxAubyjtSMEokP7ZyzmTWRyx36zqCEfnVgg,5690
14
- biobb_io/api/pdb.py,sha256=mpaMklW3N5avUO08W3bB75cPRfPHcRccDB8TaG-xLF8,6024
15
- biobb_io/api/pdb_cluster_zip.py,sha256=eml2QmX0NTUk8YkEwDPqSPu3ZjTtBqYUVl9r4eWtFzs,7749
16
- biobb_io/api/pdb_variants.py,sha256=GbovaDIQZQDPiSQaHp1ohr_Ds3eucdkdLR7bcW3c7Q4,7969
17
- biobb_io/api/structure_info.py,sha256=VKy9lxMTpbkGMuxWoEwP9NLwdw8AapLFutHs8J0qgjA,5503
18
- biobb_io/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- biobb_io-5.0.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
20
- biobb_io-5.0.1.dist-info/METADATA,sha256=fbV5Ca_iWW37qv4RVIsre4cCvwBx7BPtwUGWduZBsk4,6713
21
- biobb_io-5.0.1.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
22
- biobb_io-5.0.1.dist-info/entry_points.txt,sha256=UdQz4F28f13ergWXqKMrx15mH05nX7G85xBaP8W2Wdw,614
23
- biobb_io-5.0.1.dist-info/top_level.txt,sha256=1VPldlX2AnFaqODGFJK10WN8AOQuulpX88bLSaQdoS8,9
24
- biobb_io-5.0.1.dist-info/RECORD,,