Skip to content

Commit 5cdcde7

Browse files
committed
DOC: Update usage.rst with notes on reusing derivatives
1 parent 85f30ef commit 5cdcde7

File tree

1 file changed

+37
-43
lines changed

1 file changed

+37
-43
lines changed

docs/usage.rst

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,13 @@ would be equivalent to the latest example: ::
128128

129129
Reusing precomputed derivatives
130130
-------------------------------
131+
131132
Reusing a previous, partial execution of *fMRIPrep*
132133
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133134
*fMRIPrep* will pick up where it left off a previous execution, so long as the work directory
134135
points to the same location, and this directory has not been changed/manipulated.
136+
Some workflow nodes will rerun unconditionally, so there will always be some amount of
137+
reprocessing.
135138

136139
Using a previous run of *FreeSurfer*
137140
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -143,48 +146,39 @@ You can use the ``--fs-subjects-dir`` flag to specify a different location to sa
143146
FreeSurfer outputs.
144147
If precomputed results are found, they will be reused.
145148

146-
The *anatomical fast-track*
147-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
148-
Starting with version 20.1.0, *fMRIPrep* has a command-line argument (``--anat-derivatives <PATH>``)
149-
to indicate a path from which the preprocessed information derived from the T1w, T2w (if present) and
150-
FLAIR (if present) images.
151-
This feature was envisioned to help process very large multi-session datasets where the anatomical
152-
images can be averaged (i.e., anatomy is not expected to vary substantially across sessions).
153-
An example where this kind of processing would be useful is
154-
`My Connectome <https://openneuro.org/datasets/ds000031/>`__, a dataset that contains
155-
107 sessions for a single-subject.
156-
Most of these sessions contain anatomical information which, given the design of the dataset, can be averaged
157-
across sessions as no substantial changes should happen.
158-
In other words, the anatomical information of the dataset can be considered as *cross-sectional*.
159-
Before version 20.1.0, preprocessing this dataset would be hard for two limitations:
160-
161-
* if the dataset were to be processed in just one enormous job (be it in a commercial Cloud or
162-
:abbr:`HPC (high-performance computing)` resources), the amount of data to be processed surely
163-
would exceed the time limitations per job (and/or related issues, such as restarting from where
164-
it left before); or
165-
* if the processing were `split in sessions <https://github.com/nipreps/fmriprep/issues/1175>`__,
166-
then *fMRIPrep* would attempt to re-process the anatomical information for every session.
167-
168-
Because processing this emerging type of datasets (*densely sampled neuroimaging*) was impractical with
169-
*fMRIPrep*, the option ``--anat-derivatives`` will shortcut the whole anatomical processing.
170-
171-
.. danger::
172-
Using the *anatomical fast-track* (the ``--anat-derivatives`` argument) has important side-effects
173-
that risk the reproducibility and reliability of *fMRIPrep*.
174-
This flag breaks *fMRIPrep*'s internal tracing of provenance, and it trusts whatever input *fMRIPrep*
175-
is given (so long it is BIDS-Derivatives compliant and contains all the necessary files).
176-
177-
When reporting results obtained with ``--anat-derivatives``, please make sure you highlight this
178-
particular deviation from *fMRIPrep*, and clearly describe the alternative preprocessing of
179-
anatomical data.
180-
181-
.. attention::
182-
When the intention is to combine the *anatomical fast-track* with some advanced options that involve
183-
standard spaces (e.g., ``--cifti-output``), please make sure you include the
184-
``MNI152NLin6Asym`` space to the ``--output-spaces`` list in the first invocation of *fMRIPrep*
185-
(or *sMRIPrep*) from which the results are to be reused.
186-
Otherwise, a warning message indicating that *fMRIPrep*'s expectations were not met will be issued,
187-
and the pre-computed anatomical derivatives will not be reused.
149+
BIDS Derivatives reuse
150+
~~~~~~~~~~~~~~~~~~~~~~
151+
As of version 23.2.0, *fMRIPrep* can reuse precomputed derivatives that follow BIDS Derivatives
152+
conventions. To provide derivatives to *fMRIPrep*, use the ``--derivatives`` (``-d``) flag one
153+
or more times.
154+
155+
This mechanism replaces the earlier, more limited ``--anat-derivatives`` flag.
156+
157+
.. note::
158+
Derivatives reuse is considered *experimental*.
159+
160+
This feature has several intended use-cases:
161+
162+
* To enable fMRIPrep to be run in a "minimal" mode, where only the most essential
163+
derivatives are generated. This can be useful for large datasets where disk space
164+
is a concern, or for users who only need a subset of the derivatives. Further
165+
derivatives may be generated later, or by a different tool.
166+
* To enable fMRIPrep to be integrated into a larger processing pipeline, where
167+
other tools may generate derivatives that fMRIPrep can use in place of its own
168+
steps.
169+
* To enable users to substitute their own custom derivatives for those generated
170+
by fMRIPrep. For example, a user may wish to use a different brain extraction
171+
tool, or a different registration tool, and then use fMRIPrep to generate the
172+
remaining derivatives.
173+
* To enable complicated meta-workflows, where fMRIPrep is run multiple times
174+
with different options, and the results are combined. For example, the
175+
`My Connectome <https://openneuro.org/datasets/ds000031/>`__ dataset contains
176+
107 sessions for a single-subject. Processing of all sessions simultaneously
177+
would be impractical, but the anatomical processing can be done once, and
178+
then the functional processing can be done separately for each session.
179+
180+
See also the ``--level`` flag, which can be used to control which derivatives are
181+
generated.
188182

189183
Troubleshooting
190184
---------------
@@ -195,7 +189,7 @@ Information on how to customize and understand these files can be found on the
195189
page.
196190

197191
**Support and communication**.
198-
The documentation of this project is found here: https://fmriprep.readthedocs.org/en/latest/.
192+
The documentation of this project is found here: https://fmriprep.org/en/latest/.
199193

200194
All bugs, concerns and enhancement requests for this software can be submitted here:
201195
https://github.com/nipreps/fmriprep/issues.

0 commit comments

Comments
 (0)