pl.pipeline

Module Contents

class pl.pipeline.Pipeline(models_folder="Models", working_folder="Results", sim_data_folder="sim_data", sim_plots_folder="sim_plots")[source]

Generic pipeline.

Parameters:
  • models_folder – the folder containing the models
  • working_folder – the folder to store the results
  • sim_data_folder – the folder to store the simulation data
  • sim_plots_folder – the folder to store the graphic results
__init__(models_folder="Models", working_folder="Results", sim_data_folder="sim_data", sim_plots_folder="sim_plots")[source]
run(config_file)[source]

Run the pipeline.

Parameters:config_file – a configuration file for this pipeline.
Returns:True if the pipeline was executed correctly, False otherwise.
get_models_folder()[source]

Return the folder containing the models.

Returns:the models folder.
get_working_folder()[source]

Return the folder containing the results.

Returns:the working folder.
get_sim_data_folder()[source]

Return the folder containing the in-silico generated data sets.

Returns:the folder of the simulated data sets.
get_sim_plots_folder()[source]

Return the folder containing the in-silico generated plots.

Returns:the folder of the simulated plots.
generate_tarball(output_folder)[source]

Create a gz tarball.

Parameters:
  • working_dir – the working directory
  • output_folder – the name of the folder to store the tar.gz file
Returns:

True if the generation of the tarball succeeded.

get_simul_obj(simulator)[source]

Return the simulator object if this exists. Otherwise throws an exception. The simulator name starts with an upper case letter. Each simulator is in a package within sbpipe.simulator.

Parameters:simulator – the simulator name
Returns:the simulator object.
load(config)[source]

Safely load a YAML configuration file and return its structure as a dictionary object.

Parameters:config – a YAML configuration file
Returns:the dictionary structure of the configuration file
Raise:yaml.YAMLError if the config cannot be loaded.
parse(config_dict)[source]

Read a dictionary structure containing the pipeline configuration. This method is abstract.

Returns:a tuple containing the configuration