nipoppy.tabular.bagel

Class for bagel tracker files.

Module Contents

class nipoppy.tabular.bagel.Bagel(*args, **kwargs)

Bases: nipoppy.tabular.base.BaseTabular

A file to track data availability/processing status.

col_bids_participant = 'bids_participant'
col_bids_session = 'session'
col_participant_id = 'participant_id'
col_pipeline_complete = 'pipeline_complete'
col_pipeline_name = 'pipeline_name'
col_pipeline_version = 'pipeline_version'
col_session_id = 'session_id'
index_cols
model
status_fail
status_incomplete
status_success
status_unavailable
get_completed_participants_sessions(pipeline_name, pipeline_version, participant_id=None, session_id=None)

Get participant-session pairs that have successfully completed a pipeline run.

Can optionally filter within a specific participant and/or session.

Parameters:
  • pipeline_name (str)

  • pipeline_version (str)

  • participant_id (Optional[str])

  • session_id (Optional[str])

class nipoppy.tabular.bagel.BagelModel(/, **data)

Bases: nipoppy.tabular.base.BaseTabularModel

A file generated by the trackers.

Contains process statuses for image processing pipelines.

Note: This class is called “model” to be consistent with Pydantic nomenclature, but it can be thought of as a schema for each row in the bagel file.

Parameters:

data (Any)

bids_participant: str | None
participant_id: str
pipeline_complete: str
pipeline_name: str
pipeline_starttime: str
pipeline_version: str
session: str | None
session_id: str
classmethod check_status(value)

Check that a status field has a valid value.

Parameters:

value (str)

validate_after()

Check fields.

nipoppy.tabular.bagel.STATUS_FAIL = 'FAIL'
nipoppy.tabular.bagel.STATUS_INCOMPLETE = 'INCOMPLETE'
nipoppy.tabular.bagel.STATUS_SUCCESS = 'SUCCESS'
nipoppy.tabular.bagel.STATUS_UNAVAILABLE = 'UNAVAILABLE'