Coverage for biobb_pdb_tools/pdb_tools/biobb_pdb_fixinsert.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 Pdbfixinsert 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 PdbToolsBase
10class Pdbfixinsert(PdbToolsBase):
11 """
12 | biobb_pdb_tools Pdbfixinsert
13 | Deletes insertion codes and shifts the residue numbering of downstream residues.
14 | Works by deleting an insertion code and shifting the residue numbering of downstream residues. Allows for picking specific residues to delete insertion codes for.
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/1IGY.pdb>`_. Accepted formats: pdb (edam:format_1476).
18 output_file_path (str): PDB file with fixed insertion codes. File type: output. `Sample file <https://raw.githubusercontent.com/bioexcel/biobb_pdb_tools/master/biobb_pdb_tools/test/reference/pdb_tools/ref_pdb_fixinsert.pdb>`_. Accepted formats: pdb (edam:format_1476).
19 properties (dic):
20 * **residues** (*string*) - (None) Specific residues to delete insertion codes for, format: "A9,B12" (chain and residue number).
21 * **binary_path** (*str*) - ("pdb_fixinsert") Path to the pdb_fixinsert executable binary.
22 * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
23 * **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
25 Examples:
26 This is a use example of how to use the building block from Python::
28 from biobb_pdb_tools.pdb_tools.biobb_pdb_fixinsert import biobb_pdb_fixinsert
30 # Delete specific insertion codes
31 prop = {
32 'residues': 'A9,B12'
33 }
34 biobb_pdb_fixinsert(input_file_path='/path/to/input.pdb',
35 output_file_path='/path/to/output.pdb',
36 properties=prop)
38 Info:
39 * wrapped_software:
40 * name: pdb_tools
41 * version: >=2.5.0
42 * license: Apache-2.0
43 * ontology:
44 * name: EDAM
45 * schema: http://edamontology.org/EDAM.owl
47 """
49 option_property = "residues"
51 def __init__(
52 self, input_file_path: str, output_file_path: str, properties: Optional[dict] = None, **kwargs
53 ) -> None:
54 super().__init__(**locals())
57biobb_pdb_fixinsert = launcher(Pdbfixinsert)
59if __name__ == "__main__":
60 Pdbfixinsert.main()