(ERROR: Could not strip skull)

Hi all,

I have resting state data from a group of subjects for whom I run Now I’m running, using the file errts.sub.tproject+tlrc. that results from
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,

Hi again,

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?

Hi, Ana-

Well, actually, I don’t know that I would recommend using… In general, we suggest people use for their full single subject processing.

There are a number of examples of using in its help, such as here:
… and 11b.

As part of that, we tend to recommend people use the @SSwarper program for skullstripping (SS) and nonlinear warping to standard space before running, and then passing those results into the program. Happy to discuss this a bit more here.

On the AFNI Academy channel, using is discussed here (for task-based analysis, but many aspects apply to resting state analysis):
… and on alignment things:


Thanks a lot for the message!

Isn’t what’s used by

I already processed this resting state data using
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 I couldn’t see any option in and it seems quite straightforward in, using the aseg file from freesurfer. That’s why I was using

Hi, Ana- is a graphical interface for setting up an command. However, is a bit behind and doesn’t have the flexibility to set up the full range of functionality.

Do you have the created by somewhere? A text file with it should have been created by

Re. 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.

Re. global signal-- I am legally obligated to note that there is a lot of literature out there that suggests this is step that might not be highly recommended (to say the least), such as:

It is possible to provide a whole brain mask and use its average signal as a regressor,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):

-regress_ROI WMe brain


Thanks for your comment. This clarifies some things.

I imagine you refer to the text file “proc.sub” created by 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)?

I appreciate any help. Thanks,

Hi Ana,

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 been resolved for you? That is a different program from runs The somewhat dangerously named is entirely separate, and we plan to remove it from the distribution.

For this FS mask, it is better to give that to using -anat_follower, as is done in Example 11. That assumes the mask is aligned with the original anatomy input to

To use these things, you should probably get away from (which is not up-to-date with enhancements to Try to work with the commands, directly.

  • rick

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 commands this time. I followed example 11 and used the FS masks. Everything seemed quite straightforward and the data looks great.
Thanks again!

Great, thanks for the update!

  • rick