nipoppy.tabular¶
Classes for tabular data representation/manipulation.
Submodules¶
Package Contents¶
- class nipoppy.tabular.Bagel(*args, **kwargs)¶
Bases:
nipoppy.tabular.base.BaseTabularA 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¶
- 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.
- class nipoppy.tabular.Doughnut(*args, session_ids=None, visit_ids=None, **kwargs)¶
Bases:
nipoppy.tabular.manifest.ManifestA dataset’s doughnut, for tracking DICOM-to-BIDS conversion status.
- col_in_bids = 'in_bids'¶
- col_in_raw_imaging = 'in_raw_imaging'¶
- col_in_sourcedata = 'in_sourcedata'¶
- col_participant_dicom_dir = 'participant_dicom_dir'¶
- index_cols¶
- model¶
- status_cols¶
- get_bidsified_participants_sessions(participant_id=None, session_id=None)¶
Get participants and sessions with BIDS data.
- get_downloaded_participants_sessions(participant_id=None, session_id=None)¶
Get participants and sessions with downloaded data.
- get_organized_participants_sessions(participant_id=None, session_id=None)¶
Get participants and sessions with organized data.
- get_status(participant_id, session_id, col)¶
Get one of the statuses for an existing record.
- class nipoppy.tabular.Manifest(*args, session_ids=None, visit_ids=None, **kwargs)¶
Bases:
nipoppy.tabular.base.BaseTabularA dataset’s manifest.
- col_datatype = 'datatype'¶
- col_participant_id = 'participant_id'¶
- col_session_id = 'session_id'¶
- col_visit_id = 'visit_id'¶
- index_cols¶
- model¶
- get_imaging_subset(session_id=None)¶
Get records with imaging data.
- Parameters:
session_id (Optional[str])
- get_participants_sessions(participant_id=None, session_id=None)¶
Get participant IDs and session IDs.
- classmethod load(*args, session_ids=None, visit_ids=None, validate=True, **kwargs)¶
Load the manifest.
- Return type:
typing_extensions.Self
- validate(*args, **kwargs)¶
Validate the manifest.
- Return type:
typing_extensions.Self
- nipoppy.tabular.generate_doughnut(manifest, dicom_dir_map, dpath_downloaded=None, dpath_organized=None, dpath_bidsified=None, empty=False, logger=None)¶
Generate a doughnut object.
- Parameters:
manifest (nipoppy.tabular.manifest.Manifest)
dicom_dir_map (nipoppy.tabular.dicom_dir_map.DicomDirMap)
dpath_downloaded (Optional[nipoppy.env.StrOrPathLike])
dpath_organized (Optional[nipoppy.env.StrOrPathLike])
dpath_bidsified (Optional[nipoppy.env.StrOrPathLike])
logger (Optional[logging.Logger])
- Return type:
- nipoppy.tabular.update_doughnut(doughnut, manifest, dicom_dir_map, dpath_downloaded=None, dpath_organized=None, dpath_bidsified=None, empty=False, logger=None)¶
Update an existing doughnut file.
- Parameters:
doughnut (Doughnut)
manifest (nipoppy.tabular.manifest.Manifest)
dicom_dir_map (nipoppy.tabular.dicom_dir_map.DicomDirMap)
dpath_downloaded (Optional[nipoppy.env.StrOrPathLike])
dpath_organized (Optional[nipoppy.env.StrOrPathLike])
dpath_bidsified (Optional[nipoppy.env.StrOrPathLike])
logger (Optional[logging.Logger])
- Return type: