flowcraft.generator.process_details module¶
-
flowcraft.generator.process_details.
colored_print
(msg, color_label='white_bold')[source]¶ - This function enables users to add a color to the print. It also enables to pass end_char to print allowing to print several strings in the same line in different prints.
Parameters: - color_string: str
The color code to pass to the function, which enables color change as well as background color change.
- msg: str
The actual text to be printed
- end_char: str
The character in which each print should finish. By default it will be “
- “.
-
flowcraft.generator.process_details.
procs_dict_parser
(procs_dict)[source]¶ This function handles the dictionary of attributes of each Process class to print to stdout lists of all the components or the components which the user specifies in the -t flag.
Parameters: - procs_dict: dict
A dictionary with the class attributes for all the components (or components that are used by the -t flag), that allow to create both the short_list and detailed_list. Dictionary example: {“abyss”: {‘input_type’: ‘fastq’, ‘output_type’: ‘fasta’, ‘dependencies’: [], ‘directives’: {‘abyss’: {‘cpus’: 4, ‘memory’: ‘{ 5.GB * task.attempt }’, ‘container’: ‘flowcraft/abyss’, ‘version’: ‘2.1.1’, ‘scratch’: ‘true’}}}
-
flowcraft.generator.process_details.
proc_collector
(process_map, args, pipeline_string)[source]¶ Function that collects all processes available and stores a dictionary of the required arguments of each process class to be passed to procs_dict_parser
Parameters: - process_map: dict
The dictionary with the Processes currently available in flowcraft and their corresponding classes as values
- args: argparse.Namespace
The arguments passed through argparser that will be access to check the type of list to be printed
- pipeline_string: str
the pipeline string