pipeline

pipeline

Helpers for bioinformatics pipelines

Submodules:

Main classes & functions

Functions

Name Description
count_pipeline_samples Count the number of samples in a pipeline run.
create_pipeline Retrieves a pipeline class by its name from the provided pipelines dictionary.

count_pipeline_samples

pipeline.count_pipeline_samples(tree_str, pipeline_name)

Count the number of samples in a pipeline run.

Parameters

Name Type Description Default
tree_str str The tree as a JSON string representing the pipeline run output directory (from tree -aJ command). required
pipeline_name str The name of the pipeline. required

Returns

Name Type Description
int The number of samples in the pipeline run. Returns NaN if the pipeline is not recognized.
list The sample names in the pipeline run. Returns an empty list if the pipeline is not recognized.

See Also

~ccbr_tools.spooker.get_tree: The function used to generate the tree structure.

create_pipeline

pipeline.create_pipeline(pipeline_name, pipelines=PIPELINES)

Retrieves a pipeline class by its name from the provided pipelines dictionary. Args: pipeline_name (str): The name of the pipeline to retrieve. pipelines (dict, optional): A dictionary mapping pipeline names to pipeline functions or objects. Defaults to PIPELINES. Returns: object or None: The pipeline class if found; otherwise, None.