Coverage for biobb_pdb_tools/pdb_tools/biobb_pdb_merge.py: 90%

10 statements  

« prev     ^ index     » next       coverage.py v7.18.0, created at 2026-12-03 15:44 +0000

1#!/usr/bin/env python3 

2 

3"""Module containing the Pdbmerge class and the command line interface.""" 

4 

5from typing import Optional 

6from biobb_common.generic.biobb_object import launcher 

7from biobb_pdb_tools.pdb_tools.common import PdbToolsBase 

8 

9 

10class Pdbmerge(PdbToolsBase): 

11 """ 

12 | biobb_pdb_tools Pdbmerge 

13 | Merges several PDB files into one. 

14 | This tool merges several PDB files into one. It can be used to merge several PDB files into one. 

15 

16 Args: 

17 input_file_path (str): Input ZIP file of selected protein. File type: input. `Sample file <https://raw.githubusercontent.com/bioexcel/biobb_pdb_tools/master/biobb_pdb_tools/test/data/pdb_tools/input_pdb_merge.zip>`_. Accepted formats: zip (edam:format_3987), pdb (edam:format_1476). 

18 output_file_path (str): PDB file with input PDBs merged. File type: output. `Sample file <https://raw.githubusercontent.com/bioexcel/biobb_pdb_tools/master/biobb_pdb_tools/test/reference/pdb_tools/ref_pdb_merge.pdb>`_. Accepted formats: pdb (edam:format_1476). 

19 properties (dic): 

20 * **binary_path** (*str*) - ("pdb_merge") Path to the pdb_merge 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. 

23 

24 Examples: 

25 This is a use example of how to use the building block from Python:: 

26 

27 from biobb_pdb_tools.pdb_tools.biobb_pdb_merge import biobb_pdb_merge 

28 

29 biobb_pdb_merge(input_file_path='/path/to/input1.zip', 

30 output_file_path='/path/to/output.pdb') 

31 

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 

40 

41 """ 

42 

43 zip_input = True 

44 

45 def __init__( 

46 self, input_file_path: str, output_file_path: str, properties: Optional[dict] = None, **kwargs 

47 ) -> None: 

48 super().__init__(**locals()) 

49 

50 

51biobb_pdb_merge = launcher(Pdbmerge) 

52 

53if __name__ == "__main__": 

54 Pdbmerge.main()