Skip to content

Commit ea6aa31

Browse files
committed
docs: final details (file trees, confounds tsv files, etc.)
1 parent 0c38544 commit ea6aa31

File tree

1 file changed

+112
-84
lines changed

1 file changed

+112
-84
lines changed

docs/outputs.rst

Lines changed: 112 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Outputs of *fMRIPrep*
2121
the same-subject's T1w space or into MNI space.
2222

2323
3. **Additional data for subsequent analysis**, for instance the transformations
24-
between different spaces or the estimated confounds.
24+
between different spaces or the estimated confounds_.
2525

2626

2727
*fMRIPrep* outputs conform to the :abbr:`BIDS (brain imaging data structure)`
@@ -34,106 +34,151 @@ These reports provide a quick way to make visual inspection of the results easy.
3434
Each report is self contained and thus can be easily shared with collaborators (for example via email).
3535
`View a sample report. <_static/sample_report.html>`_
3636

37-
3837
Derivatives of *fMRIPrep* (preprocessed data)
3938
---------------------------------------------
4039
Preprocessed, or derivative, data are written to
4140
``<output dir>/fmriprep/sub-<subject_label>/``.
4241
The `BIDS Derivatives RC1`_ specification describes the naming and metadata conventions we follow.
4342

4443
Anatomical derivatives are placed in each subject's ``anat`` subfolder:
44+
::
4545

46-
- ``anat/sub-<subject_label>_[space-<space_label>_]desc-preproc_T1w.nii.gz``
47-
- ``anat/sub-<subject_label>_[space-<space_label>_]desc-brain_mask.nii.gz``
48-
- ``anat/sub-<subject_label>_[space-<space_label>_]dseg.nii.gz``
49-
- ``anat/sub-<subject_label>_[space-<space_label>_]label-CSF_probseg.nii.gz``
50-
- ``anat/sub-<subject_label>_[space-<space_label>_]label-GM_probseg.nii.gz``
51-
- ``anat/sub-<subject_label>_[space-<space_label>_]label-WM_probseg.nii.gz``
52-
53-
Template-normalized derivatives use the space label ``MNI152NLin2009cAsym``, while derivatives in
46+
sub-<subject_label>/
47+
anat/
48+
sub-<subject_label>[_space-<space_label>]_desc-preproc_T1w.nii.gz
49+
sub-<subject_label>[_space-<space_label>]_desc-brain_mask.nii.gz
50+
sub-<subject_label>[_space-<space_label>]_dseg.nii.gz
51+
sub-<subject_label>[_space-<space_label>]_label-CSF_probseg.nii.gz
52+
sub-<subject_label>[_space-<space_label>]_label-GM_probseg.nii.gz
53+
sub-<subject_label>[_space-<space_label>]_label-WM_probseg.nii.gz
54+
55+
Spatially-standardized derivatives are denoted with a space label,
56+
such as ``MNI152NLin2009cAsym``, while derivatives in
5457
the original ``T1w`` space omit the ``space-`` keyword.
5558

5659
Additionally, the following transforms are saved:
60+
::
5761

58-
- ``anat/sub-<subject_label>_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5``
59-
- ``anat/sub-<subject_label>_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5``
62+
sub-<subject_label>/
63+
anat/
64+
sub-<subject_label>_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5
65+
sub-<subject_label>_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5
6066

6167
If FreeSurfer reconstructions are used, the following surface files are generated:
68+
::
6269

63-
- ``anat/sub-<subject_label>_hemi-[LR]_smoothwm.surf.gii``
64-
- ``anat/sub-<subject_label>_hemi-[LR]_pial.surf.gii``
65-
- ``anat/sub-<subject_label>_hemi-[LR]_midthickness.surf.gii``
66-
- ``anat/sub-<subject_label>_hemi-[LR]_inflated.surf.gii``
70+
sub-<subject_label>/
71+
anat/
72+
sub-<subject_label>_hemi-[LR]_smoothwm.surf.gii
73+
sub-<subject_label>_hemi-[LR]_pial.surf.gii
74+
sub-<subject_label>_hemi-[LR]_midthickness.surf.gii
75+
sub-<subject_label>_hemi-[LR]_inflated.surf.gii
6776

68-
And the affine translation between ``T1w`` space and FreeSurfer's reconstruction (``fsnative``) is
69-
stored in:
77+
And the affine translation (and inverse) between the original T1w sampling and FreeSurfer's
78+
conformed space for surface reconstruction (``fsnative``) is stored in:
79+
::
7080

71-
- ``anat/sub-<subject_label>_from-T1w_to-fsnative_mode-image_xfm.txt``
81+
sub-<subject_label>/
82+
anat/
83+
sub-<subject_label>_from-fsnative_to-T1w_mode-image_xfm.txt
84+
sub-<subject_label>_from-T1w_to-fsnative_mode-image_xfm.txt
7285

73-
Functional derivatives are stored in the ``func`` subfolder.
86+
Functional derivatives are stored in the ``func/`` subfolder.
7487
All derivatives contain ``task-<task_label>`` (mandatory) and ``run-<run_index>`` (optional), and
7588
these will be indicated with ``[specifiers]``.
89+
::
7690

77-
- ``func/sub-<subject_label>_[specifiers]_space-<space_label>_boldref.nii.gz``
78-
- ``func/sub-<subject_label>_[specifiers]_space-<space_label>_desc-brain_mask.nii.gz``
79-
- ``func/sub-<subject_label>_[specifiers]_space-<space_label>_desc-preproc_bold.nii.gz``
91+
sub-<subject_label>/
92+
func/
93+
sub-<subject_label>_[specifiers]_space-<space_label>_boldref.nii.gz
94+
sub-<subject_label>_[specifiers]_space-<space_label>_desc-brain_mask.nii.gz
95+
sub-<subject_label>_[specifiers]_space-<space_label>_desc-preproc_bold.nii.gz
8096

8197
Volumetric output spaces include ``T1w`` and ``MNI152NLin2009cAsym`` (default).
8298

83-
Confounds are saved as a :abbr:`TSV (tab-separated value)` file:
99+
For each :abbr:`BOLD (blood-oxygen level dependent)` run processed with *fMRIPrep*, an
100+
accompanying *confounds* file will be generated.
101+
Confounds_ are saved as a :abbr:`TSV (tab-separated value)` file:
102+
::
84103

85-
- ``func/sub-<subject_label>_[specifiers]_desc-confounds_regressors.nii.gz``
104+
sub-<subject_label>/
105+
func/
106+
sub-<subject_label>_[specifiers]_desc-confounds_regressors.tsv
107+
sub-<subject_label>_[specifiers]_desc-confounds_regressors.json
108+
109+
These :abbr:`TSV (tab-separated values)` tables look like the example below,
110+
where each row of the file corresponds to one time point found in the
111+
corresponding :abbr:`BOLD (blood-oxygen level dependent)` time series.
112+
::
113+
114+
csf white_matter global_signal std_dvars dvars framewise_displacement t_comp_cor_00 t_comp_cor_01 t_comp_cor_02 t_comp_cor_03 t_comp_cor_04 t_comp_cor_05 a_comp_cor_00 a_comp_cor_01 a_comp_cor_02 a_comp_cor_03 a_comp_cor_04 a_comp_cor_05 non_steady_state_outlier00 trans_x trans_y trans_z rot_x rot_y rot_z aroma_motion_02 aroma_motion_04
115+
682.75275 0.0 491.64752000000004 n/a n/a n/a 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 -0.00017029 -0.0 0.0 0.0 0.0
116+
669.14166 0.0 489.4421 1.168398 17.575331 0.07211929999999998 -0.4506846719 0.1191909139 -0.0945884724 0.1542023065 -0.2302324641 0.0838194238 -0.032426848599999995 0.4284323184 -0.5809158299 0.1382414008 -0.1203486637 0.3783661265 0.0 0.0 0.0207752 0.0463124 -0.000270924 -0.0 0.0 -2.402958171 -0.7574011893
117+
665.3969 0.0 488.03 1.085204 16.323903999999995 0.0348966 0.010819676200000001 0.0651895837 -0.09556632150000001 -0.033148835 -0.4768871111 0.20641088559999998 0.2818768463 0.4303863764 0.41323714850000004 -0.2115232212 -0.0037154909000000004 0.10636180070000001 0.0 0.0 0.0 0.0457372 0.0 -0.0 0.0 -1.341359143 0.1636017242
118+
662.82715 0.0 487.37302 1.01591 15.281561 0.0333937 0.3328022893 -0.2220965269 -0.0912891436 0.2326688125 0.279138129 -0.111878887 0.16901660629999998 0.0550480212 0.1798747037 -0.25383302620000003 0.1646403629 0.3953613889 0.0 0.010164 -0.0103568 0.0424513 0.0 -0.0 0.00019174 -0.1554834655 0.6451987913
86119

87120
If FreeSurfer reconstructions are used, the ``(aparc+)aseg`` segmentations are aligned to the
88121
subject's T1w space and resampled to the BOLD grid, and the BOLD series are resampled to the
89122
midthickness surface mesh:
123+
::
90124

91-
- ``func/sub-<subject_label>_[specifiers]_space-T1w_desc-aparcaseg_dseg.nii.gz``
92-
- ``func/sub-<subject_label>_[specifiers]_space-T1w_desc-aseg_dseg.nii.gz``
93-
- ``func/sub-<subject_label>_[specifiers]_space-<space_label>_hemi-[LR].func.gii``
125+
sub-<subject_label>/
126+
func/
127+
sub-<subject_label>_[specifiers]_space-T1w_desc-aparcaseg_dseg.nii.gz
128+
sub-<subject_label>_[specifiers]_space-T1w_desc-aseg_dseg.nii.gz
129+
sub-<subject_label>_[specifiers]_space-<space_label>_hemi-[LR].func.gii
94130

95131
Surface output spaces include ``fsnative`` (full density subject-specific mesh),
96132
``fsaverage`` and the down-sampled meshes ``fsaverage6`` (41k vertices) and
97133
``fsaverage5`` (10k vertices, default).
98134

99-
If CIFTI outputs are requested, the BOLD series is also saved as ``dtseries.nii`` CIFTI2 files:
135+
If CIFTI outputs are requested (with the ``--cifti-outputs`` argument),
136+
the BOLD series are also saved as ``dtseries.nii`` CIFTI2 files:
137+
::
100138

101-
- ``func/sub-<subject_label>_[specifiers]_bold.dtseries.nii``
139+
sub-<subject_label>/
140+
func/
141+
sub-<subject_label>_[specifiers]_bold.dtseries.nii
102142

143+
CIFTI is a container format that holds both volumetric (regularly sampled in a grid)
144+
and surface (sampled on a triangular mesh) samples.
103145
Sub-cortical time series are volumetric (supported spaces: ``MNI152NLin2009cAsym``), while cortical
104-
time series are sampled to surface (supported spaces: ``fsaverage5``, ``fsaverage6``)
146+
time series are sampled on the surface (supported spaces: ``fsaverage5``, ``fsaverage6``)
105147

106148
Finally, if ICA-AROMA is used, the MELODIC mixing matrix and the components classified as noise
107149
are saved:
150+
::
108151

109-
- ``func/sub-<subject_label>_[specifiers]_AROMAnoiseICs.csv``
110-
- ``func/sub-<subject_label>_[specifiers]_desc-MELODIC_mixing.tsv``
111-
152+
sub-<subject_label>/
153+
func/
154+
sub-<subject_label>_[specifiers]_AROMAnoiseICs.csv
155+
sub-<subject_label>_[specifiers]_desc-MELODIC_mixing.tsv
112156

113157
.. _fsderivs:
114158

115159
FreeSurfer Derivatives
116160
----------------------
117-
A FreeSurfer subjects directory is created in ``<output dir>/freesurfer``.
118-
161+
A FreeSurfer subjects directory is created in ``<output_dir>/freesurfer``.
119162
::
120163

121-
freesurfer/
122-
fsaverage{,5,6}/
123-
mri/
124-
surf/
164+
<output_dir>/
165+
fmriprep/
125166
...
126-
sub-<subject_label>/
127-
mri/
128-
surf/
167+
freesurfer/
168+
fsaverage{,5,6}/
169+
mri/
170+
surf/
171+
...
172+
sub-<subject_label>/
173+
mri/
174+
surf/
175+
...
129176
...
130-
...
131177

132178
Copies of the ``fsaverage`` subjects distributed with the running version of
133179
FreeSurfer are copied into this subjects directory, if any functional data are
134180
sampled to those subject spaces.
135181

136-
137182
Confounds
138183
---------
139184
The :abbr:`BOLD (blood-oxygen level dependent)` signal measured with fMRI is a mixture of fluctuations
@@ -174,23 +219,7 @@ Such tabular files may include over 100 columns of potential confound regressors
174219
The choice of confounding variables may depend on the analysis you want to perform,
175220
and may be not straightforward as no gold standard procedure exists.
176221
For detailed description of various denoising strategies and their performance,
177-
see Parkes et al. ([Parkes2018]_) and Ciric et al. ([Ciric2017]_).
178-
179-
180-
For each :abbr:`BOLD (blood-oxygen level dependent)` run processed with *fMRIPrep*, a
181-
``<output_folder>/fmriprep/sub-<sub_id>/func/sub-<sub_id>_task-<task_id>_run-<run_id>_desc-confounds_regressors.tsv``
182-
file will be generated.
183-
These are :abbr:`TSV (tab-separated values)` tables, which look like the example below: ::
184-
185-
csf white_matter global_signal std_dvars dvars framewise_displacement t_comp_cor_00 t_comp_cor_01 t_comp_cor_02 t_comp_cor_03 t_comp_cor_04 t_comp_cor_05 a_comp_cor_00 a_comp_cor_01 a_comp_cor_02 a_comp_cor_03 a_comp_cor_04 a_comp_cor_05 non_steady_state_outlier00 trans_x trans_y trans_z rot_x rot_y rot_z aroma_motion_02 aroma_motion_04
186-
682.75275 0.0 491.64752000000004 n/a n/a n/a 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 -0.00017029 -0.0 0.0 0.0 0.0
187-
669.14166 0.0 489.4421 1.168398 17.575331 0.07211929999999998 -0.4506846719 0.1191909139 -0.0945884724 0.1542023065 -0.2302324641 0.0838194238 -0.032426848599999995 0.4284323184 -0.5809158299 0.1382414008 -0.1203486637 0.3783661265 0.0 0.0 0.0207752 0.0463124 -0.000270924 -0.0 0.0 -2.402958171 -0.7574011893
188-
665.3969 0.0 488.03 1.085204 16.323903999999995 0.0348966 0.010819676200000001 0.0651895837 -0.09556632150000001 -0.033148835 -0.4768871111 0.20641088559999998 0.2818768463 0.4303863764 0.41323714850000004 -0.2115232212 -0.0037154909000000004 0.10636180070000001 0.0 0.0 0.0 0.0457372 0.0 -0.0 0.0 -1.341359143 0.1636017242
189-
662.82715 0.0 487.37302 1.01591 15.281561 0.0333937 0.3328022893 -0.2220965269 -0.0912891436 0.2326688125 0.279138129 -0.111878887 0.16901660629999998 0.0550480212 0.1798747037 -0.25383302620000003 0.1646403629 0.3953613889 0.0 0.010164 -0.0103568 0.0424513 0.0 -0.0 0.00019174 -0.1554834655 0.6451987913
190-
191-
Each row of the file corresponds to one time point found in the
192-
corresponding :abbr:`BOLD (blood-oxygen level dependent)` time series
193-
(stored in ``<output_folder>/fmriprep/sub-<sub_id>/func/sub-<sub_id>_task-<task_id>_run-<run_id>_desc-preproc_bold.nii.gz``).
222+
see [Parkes2018]_ and [Ciric2017]_.
194223

195224
Confound regressors description
196225
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -208,19 +237,19 @@ Basic confouds
208237

209238
Parameter expansion of basic confounds
210239
======================================
211-
Only accounting for the standard six motion parameters may not be sufficient to remove all variance related to
240+
Only accounting for the standard six motion parameters may not be sufficient to remove all variance related to
212241
head motion from the fMRI signal.
213-
Thus, Friston et al. ([Friston1996]_) and Satterthwaite et al. ([Satterthwaite2013]_)
242+
Thus, Friston et al. [Friston1996]_ and Satterthwaite et al. [Satterthwaite2013]_
214243
proposed *24-motion-parameter* expansion, with a goal of removing from fMRI signal as much of the motion-related
215244
variance as possible.
216245
To make this technique more accessible, *fMRIPrep* automaticaly calculates motion parameter
217-
expansion ([Satterthwaite2013]_), providing timeseries corresponding to first *temporal derivatives* of six motion
246+
expansion [Satterthwaite2013]_, providing timeseries corresponding to first *temporal derivatives* of six motion
218247
parameters, together with their *quadratic terms*, resulting in the total 24 head motion parameters
219248
(6 standard motion parameters + 6 temporal derivatives of six motion parameters + 12 quadratic terms of 6 motion
220249
parameters and their 6 temporal derivatives).
221250
Additionally, *fMRIPrep* returns temporal derivatives and quadratic terms for the ``csf``, ``white_matter``
222251
and ``global_signal`` to enable applying 36-parameter denoising strategy
223-
proposed by Satterthwaite et al. ([Satterthwaite2013]_).
252+
proposed by Satterthwaite et al. [Satterthwaite2013]_.
224253

225254
Derivatives and quadratic terms are stored under column names with suffixes: ``_derivative1`` and powers ``_power2``.
226255
These were calculated for head motion estimates (``trans_`` and ``rot_``) and compartment signals
@@ -230,19 +259,20 @@ Confounds for outlier detection
230259
===============================
231260

232261
- ``framewise_displacement`` - is a quantification of the estimated bulk-head motion calculated using
233-
formula proposed by Power et al. ([Power2012]_);
234-
- ``dvars`` - the derivative of RMS variance over voxels (or :abbr:`DVARS`)([Power2012]_)
235-
- ``std_dvars`` - standardized DVARS;
262+
formula proposed by [Power2012]_;
263+
- ``dvars`` - the derivative of RMS variance over voxels (or :abbr:`DVARS (derivative of
264+
RMS variance over voxels)`) [Power2012]_;
265+
- ``std_dvars`` - standardized :abbr:`DVARS (derivative of RMS variance over voxels)`;
236266
- ``non_steady_state_outlier_XX`` - columns indicate non-steady state volumes with a single
237267
``1`` value and ``0`` elsewhere (*i.e.*, there is one ``non_steady_state_outlier_XX`` column per
238268
outlier/volume).
239269

240270
All these confounds can be used to detect potential outlier time points - frames with high motion or spikes.
241271
Detected outliers can be further removed from time series using methods such as: volume *censoring* - entirely
242-
discarding problematic time points ([Power2012]_), regressing signal from outlier points in denoising procedure,
272+
discarding problematic time points [Power2012]_, regressing signal from outlier points in denoising procedure,
243273
or including outlier points in the subsequent first-level analysis when building the design matrix.
244274
Averaged value of confound (for example, mean ``framewise_displacement``)
245-
can be added as a regressor in group level analysis ([Yan2013]_).
275+
can be added as a regressor in group level analysis [Yan2013]_.
246276

247277
*Spike regressors* for outlier censoring can also be generated from within *fMRIPrep* using
248278
the command line options ``--fd-spike-threshold`` and ``--dvars-spike-threshold``
@@ -259,19 +289,18 @@ ICA-AROMA confounds
259289
If you are already using ICA-AROMA cleaned data (``~desc-smoothAROMAnonaggr_bold.nii.gz``),
260290
do not include ICA-AROMA confounds during your design specification or denoising procedure.
261291

262-
263292
CompCor confounds
264293
=================
265294
:abbr:`CompCor (Component Based Noise Correction)` is a component-based noise correlation method.
266-
In the method, principal components are derived from :abbr:`ROI (Region of Interest)` which is unlikely
267-
to include signal related to neuronal activity, such as :abbr:`CSF (cerebro-spinal fluid)`
268-
and abbr:`WM (white matter)` masks.
269-
Signals extracted from CompCor components can be further regressed out from the fMRI data during
270-
denoising procedure ([Behzadi2007]_).
295+
In the method, principal components are calculated within an :abbr:`ROI (Region of Interest)`
296+
that is unlikely to include signal related to neuronal activity, such as :abbr:`CSF (cerebro-spinal fluid)`
297+
and :abbr:`WM (white matter)` masks.
298+
Signals extracted from CompCor components can be further regressed out from the fMRI data with a
299+
denoising procedure [Behzadi2007]_.
271300

272301
- ``a_comp_cor_XX`` - additional noise components are calculated using anatomical :abbr:`CompCor
273302
(Component Based Noise Correction)`;
274-
- ``t_comp_cor_XX``) - additional noise components are calculated using anatomical :abbr:`CompCor
303+
- ``t_comp_cor_XX`` - additional noise components are calculated using temporal :abbr:`CompCor
275304
(Component Based Noise Correction)`.
276305

277306
Four separate CompCor decompositions are performed to compute noise components: one temporal
@@ -281,9 +310,9 @@ from the union of these.
281310

282311
.. warning::
283312
Only a subset of these CompCor decompositions should be used for further denoising.
284-
The original Behzadi aCompCor implementation ([Behzadi2007]_) can be applied using
313+
The original Behzadi aCompCor implementation [Behzadi2007]_ can be applied using
285314
components from the combined masks, while the more recent Muschelli implementation
286-
([Muschelli2014]_) can be applied using
315+
[Muschelli2014]_ can be applied using
287316
the :abbr:`WM (white matter)` and :abbr:`CSF (cerebro-spinal fluid)` masks. To determine the provenance
288317
of each component, consult the metadata file (see below).
289318

@@ -311,12 +340,11 @@ Metadata files contain additional information about columns in the confounds TSV
311340
}
312341
}
313342
314-
315343
For CompCor decompositions, entries include:
316344

317345
- ``Method``: anatomical or temporal CompCor.
318-
- ``Mask``: denotes the ROI where the decomposition that generated the component
319-
was performed: ``CSF``, ``WM``, or ``combined`` for anatomical CompCor.
346+
- ``Mask``: denotes the :abbr:`ROI (region of interest)` where the decomposition that generated
347+
the component was performed: ``CSF``, ``WM``, or ``combined`` for anatomical CompCor.
320348
- ``SingularValue``: singular value of the component.
321349
- ``VarianceExplained``: the fraction of variance explained by the component across the decomposition ROI mask.
322350
- ``CumulativeVarianceExplained``: the total fraction of variance explained by this particular component
@@ -329,7 +357,7 @@ For CompCor decompositions, entries include:
329357
Confounds and "carpet"-plot on the visual reports
330358
-------------------------------------------------
331359
Some of the estimated confounds, as well as a "carpet" visualization of the
332-
:abbr:`BOLD (blood-oxygen level-dependent)` time-series (see [Power2016]_).
360+
:abbr:`BOLD (blood-oxygen level-dependent)` time series [Power2016]_.
333361
This plot is included for each run within the corresponding visual report.
334362
An example of these plots follows:
335363

0 commit comments

Comments
 (0)