4.2. The Data Object#
4.2.1. Description#
This is the object that traverses the steps of the pipeline. It is indeed a dictionary of dictionaries. The first level of keys are the data types and the values are the corresponding information as dictionaries.
{'BOLD': {...}, 'T1w': {...}}
The second level of keys are the actual data. A special second-level key named
meta
is present in each step, that contains all the information on the
data type including source and previous transformation steps.
The Data Grabber step adds the path
second-level key
which gives the path to the file containing the data. The meta
key in this
step only contains information about the DataGrabber used.
{'BOLD': {'meta': {'datagrabber': {'class': 'SPMAuditoryTestingDataGrabber',
'types': ['BOLD', 'T1w']},
'dependencies': set(),
'element': {'subject': 'sub001'}},
'path': PosixPath('/var/folders/dv/2lbr8f8j0q12zrx3mz3ll5m40000gp/T/tmpgxcyjfo1/sub001_bold.nii.gz')},
'T1w': {'meta': {'datagrabber': {'class': 'SPMAuditoryTestingDataGrabber',
'types': ['BOLD', 'T1w']},
'dependencies': set(),
'element': {'subject': 'sub001'}},
'path': PosixPath('/var/folders/dv/2lbr8f8j0q12zrx3mz3ll5m40000gp/T/tmpgxcyjfo1/sub001_T1w.nii.gz')}}
The Data Reader step adds the data
second-level key
which is the actual data loaded into memory. The meta
key in this step
adds information about the DataReader used to read the data.
{'BOLD': {'data': <nibabel.nifti1.Nifti1Image object at 0x16b5d8910>,
'meta': {'datagrabber': {'class': 'SPMAuditoryTestingDataGrabber',
'types': ['BOLD', 'T1w']},
'datareader': {'class': 'DefaultDataReader'},
'dependencies': {'nilearn'},
'element': {'subject': 'sub001'}},
'path': PosixPath('/var/folders/dv/2lbr8f8j0q12zrx3mz3ll5m40000gp/T/tmpe49321ce/sub001_bold.nii.gz')},
'T1w': {'data': <nibabel.nifti1.Nifti1Image object at 0x16b5d78d0>,
'meta': {'datagrabber': {'class': 'SPMAuditoryTestingDataGrabber',
'types': ['BOLD', 'T1w']},
'datareader': {'class': 'DefaultDataReader'},
'dependencies': set(),
'element': {'subject': 'sub001'}},
'path': PosixPath('/var/folders/dv/2lbr8f8j0q12zrx3mz3ll5m40000gp/T/tmpe49321ce/sub001_T1w.nii.gz')}}
The Preprocess step, if used, modifies the data
second-level key’s value and appends the meta
key with information about
the preprocessor.
The Marker step removes the path
second-level key,
replaces the data
second-level key’s value with the marker’s computed value
and adds further keys needed for the storage, for example, col_names
.
{'BOLD': {'col_names': ['root_sum_of_squares_ets'],
'data': ...,
'meta': {'datagrabber': {'class': 'SPMAuditoryTestingDataGrabber',
'types': ['BOLD', 'T1w']},
'datareader': {'class': 'DefaultDataReader'},
'dependencies': {'nilearn'},
'element': {'subject': 'sub001'},
'marker': {'agg_method': 'mean',
'agg_method_params': None,
'class': 'RSSETSMarker',
'masks': None,
'name': 'RSSETSMarker',
'parcellation': 'Schaefer100x17'},
'type': 'BOLD'}}}
Note
You never directly interact with the data object but it’s important to know where and how the object is being manipulated to reason about your pipeline.
4.2.2. Data Types#
Name |
Description |
Example |
---|---|---|
|
T1w image (3D) |
Preprocessed or Raw T1w image |
|
BOLD image (4D) |
Preprocessed/Denoised BOLD image (fmriprep output) |
|
BOLD image confounds (CSV/TSV file) |
Confounds that can be applied to the BOLD image. |
|
VBM Gray Matter segmentation (3D) |
CAT output (m0wp1 images) |
|
VBM White Matter segmentation (3D) |
CAT output (m0wp2 images) |
|
Voxel-wise fALFF image (3D) |
fALFF computed with CONN toolbox |
|
Global Correlation image (3D) |
GCOR computed with CONN toolbox |
|
Local Correlation image (3D) |
LCOR computed with CONN toolbox |