nipoppy.tabular.doughnut¶
Class for the doughnut file.
Module Contents¶
- class nipoppy.tabular.doughnut.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.doughnut.DoughnutModel(/, **data)¶
Bases:
nipoppy.tabular.manifest.ManifestModelAn internally- or user-generated file to keep track of the BIDS conversion process.
Should contain exactly the same data as the manifest, with some additional columns.
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 doughnut file.
- Parameters:
data (Any)
- nipoppy.tabular.doughnut.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.doughnut.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: