Coverage for biobb_pdb_tools/pdb_tools/biobb_pdb_splitseg.py: 90%
10 statements
« prev ^ index » next coverage.py v7.18.0, created at 2026-12-03 15:44 +0000
« prev ^ index » next coverage.py v7.18.0, created at 2026-12-03 15:44 +0000
1#!/usr/bin/env python3
3"""Module containing the Pdbsplitseg class and the command line interface."""
5from typing import Optional
6from biobb_common.generic.biobb_object import launcher
7from biobb_pdb_tools.pdb_tools.common import PdbSplitBase
10class Pdbsplitseg(PdbSplitBase):
11 """
12 | biobb_pdb_tools Pdbsplitseg
13 | Splits a PDB file into several, each containing one segment.
14 | This tool splits a PDB file into several, each containing one segment. It can be used to split a PDB file into several, each containing one segment.
16 Args:
17 input_file_path (str): Input PDB file. File type: input. `Sample file <https://raw.githubusercontent.com/bioexcel/biobb_pdb_tools/master/biobb_pdb_tools/test/data/pdb_tools/input_pdb_splitseg.pdb>`_. Accepted formats: pdb (edam:format_1476).
18 output_file_path (str): ZIP file containing all PDB files splited by protein segment. File type: output. `Sample file <https://github.com/bioexcel/biobb_pdb_tools/blob/master/biobb_pdb_tools/test/reference/pdb_tools/ref_pdb_splitseg.zip>`_. Accepted formats: zip (edam:format_3987).
19 properties (dic):
20 * **binary_path** (*str*) - ("pdb_splitseg") Path to the pdb_splitseg executable binary.
21 * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
22 * **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
24 Examples:
25 This is a use example of how to use the building block from Python::
27 from biobb_pdb_tools.pdb_tools.biobb_pdb_splitseg import biobb_pdb_splitseg
29 biobb_pdb_splitseg(input_file_path='/path/to/input.pdb',
30 output_file_path='/path/to/output.pdb')
32 Info:
33 * wrapped_software:
34 * name: pdb_tools
35 * version: >=2.5.0
36 * license: Apache-2.0
37 * ontology:
38 * name: EDAM
39 * schema: http://edamontology.org/EDAM.owl
41 """
43 split_by = "segment"
45 def __init__(
46 self, input_file_path: str, output_file_path: str, properties: Optional[dict] = None, **kwargs
47 ) -> None:
48 super().__init__(**locals())
51biobb_pdb_splitseg = launcher(Pdbsplitseg)
53if __name__ == "__main__":
54 Pdbsplitseg.main()