AFNI version info (afni -ver): Version AFNI_24.2.01 'Macrinus'
Hi, I think I'd like to endeavor how to figure out how to convert my previous per-processing commands to afni_proc.py.
But prior to that I'd like to understand better regressing out time series of a mask average. I have a manually segmented mask I'd like to import to use.
Question 1: Using afni_proc.py, it appears '-regress_ROI' does this. But I read in the documentation:
Other ROI labels can come from -anat_follower_ROI options, i.e.
imported masks.
* Use of this option requires either -mask_segment_anat or labels
defined via -anat_follower_ROI options.
But it's not clear to me how to implement this with the function. But let's just say I only wanted to do the regression with afni_proc.py, I imagine it's something like the following, but not sure what else to add (with this desired mask to use: $AnimalID/$FolderID/MaskFile+orig):
That mask could be passed via -anat_follower_ROI with your choice of LABEL (pizza_roi for example) and have it resampled onto the epi grid. Then applied for regression:
Thank you very much Rick. I wasn't sure how the label was being used but now I see it's just used to call for other options.
As a follow up, let's say the mask had values of 1's and 2's in it, but I only wanted to use the values equal to one. Is it possible to reference the regress_ROI to use only values equal to one?
And yes, there is more I do. Currently, I have been doing things with individual commands (e.g. 3dDespike, 3dvolreg, 3dTproject). I would like to get some help transferring my current preprocessing protocol to afni_proc.py.
That is a good question. -regress_ROI treats the dataset like a mask, treating all non-zero values as included, while only zeros are excluded. Alternatively, if the ROI label is passed to -regress_compute_tnsr_stats, then each ROI gets its own stats. So those options are different in that regard. But handling separate ROIs for regressors seemed a bit messy, especially since there should not be many such ROIs, so it is just a single mask in that case.
It is up to you in terms of the MB threads. Certainly, they are nicer when they don't get too long, so it might make sense to keep them separate. But if some are very short, putting them together should be fine. Of course, that can be hard to predict.
One last follow up; let's say I wanted to just do a regressing protocol with the function afni_proc.py, I would need to do something like the following:
Just want to confirm that the data set I call along with 'anat_follower_ROI' is the actual mask data set. But I also need to initially call the EPI data set also, correct?
EDIT: I just ran this and it seemed to work. But it gave a proc.{ $AnimalID} file.
So I need to also add '-execute' at the end of this to actually run the regressing?
That is right, either add exec or just run the proc script yourself:
tcsh -xef proc.$AnimalID 2>&1 | tee output.proc.$AnimalID.txt
And yes, the EPI data is always needed for an analysis.
Note that "anat_follower" means apply all transformations that would bring the anat into final EPI space to the follower. The _ROI aspect of it means to use nearest neighbor interpolation, so the values do not change. But in this case, there are no transformations, since registration is not included.
rick
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.