I have a couple questions, and then I really do try to address some of your questions here, too (buckle up, it’s going to be a long journey through this reply!):
Just to check—did you leave out some afni_proc.py options that you are actually using from the posting? It makes it a bit harder to comment on some aspects and interactions of options, then. (It looks like it, because the last afni_proc.py line shown has a "" at the end, and you have written “(contd)”.)
what does it mean that your “T1 [is] in minimum outlier space (via ANTS)”?
In the present script, using “-volreg_align_to MIN_OUTLIER” means that your EPI volume with fewest outliers will be: A) used as a reference for motion correction (volreg block); and B) used to align to the T1w volume (align block). Your final EPI time series will be mapped to lay as well as possible over that T1w volume. Are you saying that ANTS has already done something like this? How did it know the minimum outlier volume (which is something AFNI calculates based on 3dvolreg)?
What size are your voxels?
Using “-blur_size 2” would essentially do no smoothing on voxels that most human EPIs are acquired at (e.g., 3mm or so). Even at 2mm voxels, I don’t think it would really do much of any smoothing. From the afni_proc.py help:
-blur_size SIZE_MM : specify the size, in millimeters
e.g. -blur_size 6.0
This option allows the user to specify the size of the blur used
by 3dmerge (or another applied smoothing program). It is applied
as the 'bmm' parameter in the filter option (such as -1blur_fwhm)
Note the relationship between blur sizes, as used in 3dmerge:
sigma = 0.57735027 * rms = 0.42466090 * fwhm
(implying fwhm = 1.359556 * rms)
Programs 3dmerge and 3dBlurInMask apply -blur_size as an additional
gaussian blur. Therefore smoothing estimates should be computed
per subject for the correction for multiple comparisons.
Programs 3dBlurToFWHM and SurfSmooth apply -blur_size as the
resulting blur, and so do not requre blur estimation.
Please see '3dmerge -help' for more information.
Please see '3dBlurInMask -help' for more information.
Please see '3dBlurToFWHM -help' for more information.
Please see 'SurfSmooth -help' for more information.
See also -blur_filter.
2b) Re. clustsim note: I think the above is the reason why the program says you are not blurring—you have effectively specified “no blur” by having a very small value. The clustsim stuff should be on by default, but including this option explicitly asks for it:
(and check afni_proc.py’s help for more about that).
- About “-GOFORIT …”: How come you are using this? what kind of messages led you to use this, which might mask some deep matrix-creation problems? From 3dDeconvolve’s help:
[-GOFORIT [g]] Use this to proceed even if the matrix has
bad problems (e.g., duplicate columns, large
condition number, etc.).
*N.B.: Warnings that you should particularly heed have
the string '!!' somewhere in their text.
*N.B.: Error and Warning messages go to stderr and
also to file 3dDeconvolve.err.
++ You can disable the creation of this .err
file by setting environment variable
AFNI_USE_ERROR_FILE to NO before running
*N.B.: The optional number 'g' that appears is the
number of warnings that can be ignored.
That is, if you use -GOFORIT 7 and 9 '!!'
matrix warnings appear, then the program will
not run. If 'g' is not present, 1 is used.
3dREMLfit’s help also warns about making sure you can justify using this opt.
- The polort message: to capture looooong slow drifts of the time series baseline, one option is to include low-order polynomials in the regression model. The degree of polynomial to use can be specified here with “-regress_polort …”. How do you know what order to keep? The option’s help elucidates:
-regress_polort DEGREE : specify the polynomial degree of baseline
e.g. -regress_polort 2
default: 1 + floor(run_length / 150.0)
3dDeconvolve models the baseline for each run separately, using
Legendre polynomials (by default). This option specifies the
degree of polynomial. Note that this will create DEGREE * NRUNS
The default is computed from the length of a run, in seconds, as
shown above. For example, if each run were 320 seconds, then the
default polort would be 3 (cubic).
* It is also possible to use a high-pass filter to model baseline
drift (using sinusoids). Since sinusoids do not model quadratic
drift well, one could consider using both, as in:
-regress_polort 2 \
-regress_bandpass 0.01 1
Here, the sinusoids allow every frequency from 0.01 on up to pass
(assuming the Nyquist frequency is <= 1), modeling the lower
frequencies as regressors of no interest, along with 3 terms for
Please see '3dDeconvolve -help' for more information
Basically, there is a rule-of-thumb based on the EPI duration (which appears to be 437.5 s in your case here—you can see what value of polort that gives in the formulation noted in the above help). Because you didn’t specify anything wtih this opt, the script generates its own choice.
For very long time series, we would recomment using “high pass” bandpassing, putting regressors with loooow frequency into the model (say, below 0.001 Hz), because the polynomials can become a bit unruly at very high orders.
- Re. censoring: These are pretty large values to use as thresholds:
Did your subjects move a lot, and/or is this a “difficult” scanning population? For standard human FMRI acquisitions (voxels about 2-3mm), we might recommend starting with:
-regress_censor_outliers 0.05 \
-regress_censor_motion 0.3 \
The tradeoff is: lower values mean harsher thresholding and therefore fewer time points left in the data; however, higher values mean potentially leaving in more motion-contaminated data, throwing off results. Motion tends to be of larger concern in resting state FMRI, because you don’t have task stimuli to try to model, but it is worth seeing if you can lower these thresholds and still process your data.
- Re motion regressing—that is specified with this option:
-regress_apply_mot_types demean deriv\
Normally, the “deriv” part is just included for resting state processing, and not for task. As noted above, resting state data is more sensitive to motion than task-based data. The “sacrifice” you make by including “deriv” is that 6 more degrees of freedom get used up in your model (because you are adding 6 more regressors to your model).
- We often include this option for motion regression when you have multiple runs in a single afni_proc.py call:
- it is probably worth looking at the MASKING NOTE, as the output advises:
It might be worth including this opt:
-mask_epi_anat yes \
… to calculate the stricter mask, for either later use or for QC estimates.
- For QC, you should reeeeally consider adding this opt:
… to get the fuller QC HTML output. It just requires you having Python and matplotlib on your OS.
- Re. anaticor: you don’t want to run " -regress_anaticor_fast ", instead? of “-regress_anaticor”?