nipoppy.workflows.pipeline.BasePipelineWorkflow¶
- class nipoppy.workflows.pipeline.BasePipelineWorkflow(dpath_root, name, pipeline_name, pipeline_version=None, pipeline_step=None, participant_id=None, session_id=None, write_list=None, fpath_layout=None, verbose=False, dry_run=False)¶
A workflow for a pipeline that has a Boutiques descriptor.
- Parameters:
- check_dir(dpath)¶
Create directory if it does not exist.
- Parameters:
dpath (pathlib.Path)
- check_pipeline_step()¶
Set the pipeline step name based on the config if it is not given.
- check_pipeline_version()¶
Set the pipeline version based on the config if it is not given.
- generate_fpath_log(dnames_parent=None, fname_stem=None)¶
Generate a log file path.
- Parameters:
- Return type:
- abstractmethod 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.
- process_template_json(template_json, participant_id, session_id, bids_participant_id=None, bids_session_id=None, objs=None, return_str=False, **kwargs)¶
Replace template strings in a JSON object.
- run_cleanup()¶
Log a summary message.
- run_main()¶
Run the pipeline.
- run_setup()¶
Run pipeline setup.
- abstractmethod run_single(participant_id, session_id)¶
Run on a single participant/session.
This is an abstract method that should be defined explicitly in subclasses.
- set_up_bids_db(dpath_pybids_db, participant_id=None, session_id=None)¶
Set up the BIDS database.
- property boutiques_config¶
Get the Boutiques configuration.
- property dpath_pipeline: pathlib.Path¶
Return the path to the pipeline’s derivatives directory.
- Return type:
- property dpath_pipeline_bids_db: pathlib.Path¶
Return the path to the pipeline’s BIDS database directory.
- Return type:
- property dpath_pipeline_output: pathlib.Path¶
Return the path to the pipeline’s output directory.
- Return type:
- property dpath_pipeline_work: pathlib.Path¶
Return the path to the pipeline’s working directory.
- Return type:
- property dpaths_to_check: list[pathlib.Path]¶
Directory paths to create if needed during the setup phase.
- Return type:
- property fpath_container: pathlib.Path¶
Return the full path to the pipeline’s container.
- Return type:
- n_success = 0¶
- n_total = 0¶
- participant_id = None¶
- property pipeline_config: nipoppy.config.pipeline.ProcPipelineConfig¶
Get the user config for the pipeline.
- Return type:
- pipeline_name¶
- pipeline_step = None¶
- property pipeline_step_config: nipoppy.config.pipeline_step.ProcPipelineStepConfig¶
Get the user config for the pipeline step.
- Return type:
- pipeline_version = None¶
- property pybids_ignore_patterns: list[str]¶
Load the pipeline step’s PyBIDS ignore pattern list.
Note: this does not apply any substitutions, since the subject/session patterns are always added.
- session_id = None¶
- property tracker_config: nipoppy.config.tracker.TrackerConfig¶
Load the pipeline step’s tracker configuration.
- Return type:
- write_list = None¶