nipoppy.workflows.pipeline¶
Base class for pipeline workflows.
Module Contents¶
- class nipoppy.workflows.pipeline.BasePipelineWorkflow(dpath_root, name, pipeline_name, pipeline_version=None, pipeline_step=None, participant_id=None, session_id=None, fpath_layout=None, logger=None, dry_run=False)¶
Bases:
nipoppy.workflows.base.BaseWorkflow,abc.ABCA workflow for a pipeline that has a Boutiques descriptor.
- Parameters:
- boutiques_config()¶
Get the Boutiques configuration.
- check_dir(dpath)¶
Create directory if it does not exist.
- Parameters:
dpath (pathlib.Path)
- check_pipeline_version()¶
Set the pipeline version based on the config if it is not given.
- dpath_pipeline()¶
Return the path to the pipeline’s derivatives directory.
- Return type:
- dpath_pipeline_bids_db()¶
Return the path to the pipeline’s BIDS database directory.
- Return type:
- dpath_pipeline_output()¶
Return the path to the pipeline’s output directory.
- Return type:
- dpath_pipeline_work()¶
Return the path to the pipeline’s working directory.
- Return type:
- dpaths_to_check()¶
Directory paths to create if needed during the setup phase.
- Return type:
- fpath_container()¶
Return the full path to the pipeline’s container.
- Return type:
- generate_fpath_log(dnames_parent=None, fname_stem=None)¶
Generate a log file path.
- Parameters:
- Return type:
- abstract get_participants_sessions_to_run(participant_id, session_id)¶
Return participant-session pairs to loop over with run_single().
This is an abstract method that should be defined explicitly in subclasses.
- pipeline_config()¶
Get the user config for the pipeline.
- Return type:
- process_template_json(template_json, participant_id, session_id, bids_participant=None, bids_session=None, objs=None, return_str=False, **kwargs)¶
Replace template strings in a JSON object.
- pybids_ignore_patterns()¶
Load the pipeline step’s PyBIDS ignore pattern list.
Note: this does not apply any substitutions, since the subject/session patterns are always added.
- run_cleanup()¶
Log a summary message.
- run_main()¶
Run the pipeline.
- run_setup()¶
Run pipeline setup.
- abstract run_single(participant_id, session_id)¶
Run on a single participant/session.
This is an abstract method that should be defined explicitly in subclasses.