I have resting state data from a group of subjects for whom I run uber_subject.py. Now I’m running afni_restproc.py, using the file errts.sub.tproject+tlrc. that results from uber_subject.py.
The script works for many of my subjects (the majority of them), but there is a problem with some subjects that I don’t know how to interpret. Here’s the first error message that appears:
** ERROR: Could not strip skull
** ERROR - script failed
INFO: Remove first TRs from EPI, motion params, and any user supplied regressors
++ 3dTcat: AFNI version=AFNI_19.2.26 (Sep 24 2019) [64-bit]
++ elapsed time = 12.0 s
INFO: Extract brain mask
++ 3dAutomask: AFNI version=AFNI_19.2.26 (Sep 24 2019) [64-bit]
++ Authored by: Emperor Zhark
** FATAL ERROR: Can’t open dataset ‘anat_w_skull_warped_al+tlrc’
Does anybody know what the problem could be? Thanks,
Ana
I’ve tried -uniformize and -anat_has_skull in case any of these could help with the “could not strip skull” error, but it didn’t work.
I understand that the problem could be that the EPI I’m using is the output from the resting state uber_subject. What I don’t understand is why this error only happens in half of the subjects.
Any thoughts?
Thanks!
Well, actually, I don’t know that I would recommend using afni_restproc.py… In general, we suggest people use afni_proc.py for their full single subject processing.
As part of that, we tend to recommend people use the @SSwarper program for skullstripping (SS) and nonlinear warping to standard space before running afni_proc.py, and then passing those results into the program. Happy to discuss this a bit more here.
Isn’t afni_proc.py what’s used by uber_subject.py?
I already processed this resting state data using uber_subject.py.
What I’m trying to do now is to regress out ventricles and WM. I was also trying to regress out the entire global signal for comparison.
Can I use ventricles and WM as regressors in afni_proc.py? I couldn’t see any option in uber_subject.py and it seems quite straightforward in afni_restproc.py, using the aseg file from freesurfer. That’s why I was using afni_restproc.py.
uber_subject.py is a graphical interface for setting up an afni_proc.py command. However, uber_subject.py is a bit behind and doesn’t have the flexibility to set up the full range of afni_proc.py functionality.
Do you have the afni_proc.py created by uber_subject.py somewhere? A text file with it should have been created by uber_subject.py.
Re. afni_restproc.py: that is a wrapper written by someone outside the group, and to be honest i’m not sure it’s really maintained any more.
Re ventricles+WM: sure; that is what examples 11 and 11b do (former uses FreeSurfer parcellation results, and the latter doesn’t). In those casees, there are principal components (PCs) made from ventricles, and the WM regression comes via “fast anaticor”-- basically, GM gets regressed with local WM signal.
It is possible to provide a whole brain mask and use its average signal as a regressor https://afni.nimh.nih.gov/afni/community/board/read.php?1,141015,141049#msg-141049
… mainly by having the “mask” block be part of the list of processing blocks, and including “brain” as a keyword to the “-regress_ROI …” option, such as here (with eroded WM also being included as a regressor ROI):
Thanks for your comment. This clarifies some things.
I imagine you refer to the text file “proc.sub” created by uber_subject.py. Yes, I’ve checked those files.
I’m taking a look a afni_proc. I will use the output (errts.sub.tproject+tlrc.) from my previous preproc analysis (done with uber_subject) and just run afni_proc to regress WM and ventricles, instead of running everything from the beginning. Please, let me know if you foresee any problems doing that.
I’m aware of the GSR literature. I just wanted to compare the results out of curiosity.
I still haven’t been able to transform my FS binary masks to tlrc space. 3dAllineate gives me a result with the binary ROI in a different part of the brain.
I understand now, based on Rick’s comment, that 3dAllineate doesn’t need this dataset to be resampled. I was still playing with 3dresample and it’s weird that the data is resampled but the ROI stays exactly the same (the ROIs from the FSmask and the FSmask_resampled completely overlap). What am I doing wrong?
Also, should I perhaps be using a different function to transform from orig to tlrc (i.e. @auto_tlrc instead of 3dAllineate)?
The problem with regressing the WM and ventricles form the previous errts.tproject time series is that motion, polort, and any other previously removed signals that are in the WM and ventricle time series will be re-introduced into the result (unless you regress the original model out of those 2 new time series first).
It would be better to re-run the previous 3dTproject option with the addition of 1 or 2 more -ort options, to include the WM and ventricle time series. That way the complete model is specified at once.
Has the question of afni_restproc.py been resolved for you? That is a different program from afni_proc.py. uber_subject.py runs afni_proc.py. The somewhat dangerously named afni_restproc.py is entirely separate, and we plan to remove it from the distribution.
For this FS mask, it is better to give that to afni_proc.py using -anat_follower, as is done in Example 11. That assumes the mask is aligned with the original anatomy input to afni_proc.py.
To use these things, you should probably get away from uber_subject.py (which is not up-to-date with enhancements to afni_proc.py). Try to work with the afni_proc.py commands, directly.
Thanks a lot for your reply, Rick. I always learn a lot from these comments.
I followed your suggestions and ended up repeating the preprocessing from scratch using the afni_proc.py commands this time. I followed example 11 and used the FS masks. Everything seemed quite straightforward and the data looks great.
Thanks again!
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.