template package

Submodules

template.template module

Module containing the Template class and the command line interface.

class template.template.Template(input_file_path1, output_file_path, input_file_path2=None, properties=None, **kwargs)[source]

Bases: BiobbObject

biobb_template Template
Short description for the template module in Restructured Text (reST) syntax. Mandatory.
Long description for the template module in Restructured Text (reST) syntax. Optional.
Parameters:
  • input_file_path1 (str) – Description for the first input file path. File type: input. Sample file. Accepted formats: top (edam:format_3881).

  • input_file_path2 (str) (Optional) –

    Description for the second input file path (optional). File type: input. Sample file. Accepted formats: dcd (edam:format_3878).

  • output_file_path (str) –

    Description for the output file path. File type: output. Sample file. Accepted formats: zip (edam:format_3987).

  • properties (dic) –

    • boolean_property (bool) - (True) Example of boolean property.

    • binary_path (str) - (“zip”) Example of executable binary property.

    • remove_tmp (bool) - (True) [WF property] Remove temporal files.

    • restart (bool) - (False) [WF property] Do not execute if output files exist.

Examples

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

from biobb_template.template.template import template

prop = {
    'boolean_property': True
}
template(input_file_path1='/path/to/myTopology.top',
        output_file_path='/path/to/newCompressedFile.zip',
        input_file_path2='/path/to/mytrajectory.dcd',
        properties=prop)
Info:
launch() int[source]

Execute the Template object.

template.template.main()[source]

Command line execution of this building block. Please check the command line documentation.

template.template.template(input_file_path1: str, output_file_path: str, input_file_path2: str | None = None, properties: dict | None = None, **kwargs) int[source]

Create Template class and execute the launch() method.

template.template_container module

Module containing the TemplateContainer class and the command line interface.

class template.template_container.TemplateContainer(input_file_path1, output_file_path, input_file_path2=None, properties=None, **kwargs)[source]

Bases: BiobbObject

biobb_template TemplateContainer
Short description for the template container module in Restructured Text (reST) syntax. Mandatory.
Long description for the template container module in Restructured Text (reST) syntax. Optional.
Parameters:
  • input_file_path1 (str) –

    Description for the first input file path. File type: input. Sample file. Accepted formats: top (edam:format_3881).

  • input_file_path2 (str) (Optional) –

    Description for the second input file path (optional). File type: input. Sample file. Accepted formats: dcd (edam:format_3878).

  • output_file_path (str) –

    Description for the output file path. File type: output. Sample file. Accepted formats: zip (edam:format_3987).

  • properties (dic) –

    • boolean_property (bool) - (True) Example of boolean property.

    • binary_path (str) - (“zip”) Example of executable binary property.

    • remove_tmp (bool) - (True) [WF property] Remove temporal files.

    • restart (bool) - (False) [WF property] Do not execute if output files exist.

    • container_path (str) - (None) Container path definition.

    • container_image (str) - (‘mmbirb/zip:latest’) Container image definition.

    • container_volume_path (str) - (‘/tmp’) Container volume path definition.

    • container_working_dir (str) - (None) Container working directory definition.

    • container_user_id (str) - (None) Container user_id definition.

    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.

Examples

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

from biobb_template.template.template_container import template_container

prop = {
    'boolean_property': True,
    'container_path': 'docker',
    'container_image': 'mmbirb/zip:latest',
    'container_volume_path': '/tmp'
}
template_container(input_file_path1='/path/to/myTopology.top',
                output_file_path='/path/to/newCompressedFile.zip',
                input_file_path2='/path/to/mytrajectory.dcd',
                properties=prop)
Info:
launch() int[source]

Execute the TemplateContainer object.

template.template_container.main()[source]

Command line execution of this building block. Please check the command line documentation.

template.template_container.template_container(input_file_path1: str, output_file_path: str, input_file_path2: str | None = None, properties: dict | None = None, **kwargs) int[source]

Create TemplateContainer class and execute the launch() method.