configuration package

Submodules

configuration.settings module

Settings loader module.

This module contains the classes to read the different formats of the configuration files.

The configuration files are composed by paths to the files and properties. There are several common properties for all the building blocks.

Some yaml files contain a tool key with the name of the tool to be executed inside the step key. The tool key is used by the resp API to identify the tool to be executed.

Syntax:
  • property (dataType) - (Default value) Short description.

Available common step properties: (Each Biobb step also has their specific properties)
  • tool (str) - (None) Name of the tool to be executed, mostly used by the biobbAPI.

  • global_log (Logger object) - (None) Log from the main workflow.

  • prefix (str) - (None) Prefix if provided.

  • step (str) - (None) Name of the step.

  • path (str) - (‘’) Absolute path to the step working dir.

  • working_dir_path (str) - (Current working dir) Workflow output directory.

  • global_properties_list (list) - ([]) List of global properties.

class configuration.settings.ConfReader(config: str | None = None, *args, **kwargs)[source]

Bases: object

Configuration file loader for yaml format files.

Parameters:
  • config (str) – Path to the configuration [YAML|JSON] file or JSON string.

  • system (str) – System name from the systems section in the configuration file.

get_paths_dic(prefix: str = '') dict[str, Any][source]
get_prop_dic(prefix: str = '', global_log: Logger | None = None) dict[str, Any][source]

get_prop_dic() returns the properties dictionary where keys are the step names in the configuration YAML file and every value contains another nested dictionary containing the keys and values of each step properties section. All the paths in the system section are copied in each nested dictionary. For each nested dictionary the following keys are added:

path (str): Absolute path to the step working dir.
step (str): Name of the step.
prefix (str): Prefix if provided.
global_log (Logger object): Log from the main workflow.
tool (str): Name of the tool to be executed, mostly used by the biobbAPI.
working_dir_path (str): Workflow output directory.
global_properties_list (list): List of global properties.
Parameters:
  • prefix (str) – Prefix if provided.

  • ( (global_log) – obj:Logger): Log from the main workflow.

Returns:

dictionary of properties.

Return type:

dict

get_working_dir_path() str[source]

get_working_dir_path() returns the working directory path.

Returns:

Working directory path.

Return type:

str

configuration.settings.trans_galaxy_charmap(input_str)[source]

Fixes escape characters introduced by Galaxy on Json inputs