afni_proc.py EPI strip

Hello,
It seems that the only way to deactivate the EPI skullstrip in afni_proc.py is to put both align_epi_strip_method None and -epi_strip None.
If I am right, this is a little bit confusing (it took me a while to understand what was going on)
Clem

EDIT: I originally thought this option would also forego the EPI strip, but apparently it doesn’t having just tested it.


        -anat_has_skull yes/no  : specify whether the anatomy has a skull

                e.g. -anat_has_skull no

            Use this option to block any skull-stripping operations, likely
            either in the align or tlrc processing blocks.

I think Clem’s question is specifically about skullstripping the EPI, separate from skullstripping the anatomical (which is what ‘-anat_has_skull …’ would affect).

Maybe we can get Daniel to weigh in on this?

–pt

The afni_proc.py option “-align_epi_strip_method None” makes afni_proc.py generate the “-epi_strip None” option in the align_epi_anat.py call in the processing script. You should not need to set a separate AEA option for that to happen. If you set the AEA option to use 3dSkullstrip or 3dAutomask, then you might have problems though. Maybe you can post your entire afni_proc.py command.

To help make this clearer, the defaults in align_epi_anat.py are to get a brain-only dataset for both the anatomical and EPI dataset inputs. It uses 3dSkullstrip by default on both anatomical and EPI datasets. afni_proc.py uses the more common sense approach of setting the option for epi stripping using 3dAutomask. The align_epi_strip_method in afni_proc.py translates to the epi_strip method in AEA, specifically for the EPI dataset.

Sure the command


afni_proc.py -subj_id Oliver2019_02_02 -script                                                                             \
    proc.Oliver2019_02_02                   																				
     -scr_overwrite -out_dir                                                                                                \
    /Oliver2019_02_02.results                \
     -blocks tshift align tlrc volreg blur mask regress -dsets                                                              \
    BOLD_rs_tshift_deob_RECEN.nii.gz        \
     -copy_anat                                                                                                             \
     Oliver2019_02_02/anatT1_deob.nii.gz                  \
     -anat_has_skull no -align_opts_aea -cost lpc+zz -check_flip -giant_move                                                \
     -epi_strip None -mask_dilate 1 -volreg_align_to MIN_OUTLIER                                                            \
     -volreg_align_e2a -volreg_tlrc_warp -mask_epi_anat yes -tlrc_base                                                      \
   	anatT1_deob_in_stdy_template.nii.gz \
     -tlrc_NL_warp -tlrc_NL_warped_dsets                                                                                    \
     anatT1_deob_in_stdy_template.nii.gz \
     identity.aff12.1D                                        \
     concate_linear_and_WARP.nii.gz      \
     -regress_motion_per_run -regress_apply_mot_types demean deriv                                                          \
     -blur_size 3 -mask_import WMa                                                                                          \
     atlas_to_study_template/WM2mm.nii.gz   \
     -regress_make_corr_vols WMa -regress_anaticor_fast                                                                     \
     -regress_run_clustsim yes -regress_est_blur_errts -html_review_style                                                   \
     pythonic -execute -tcat_remove_first_trs 5

generates:


align_epi_anat.py -anat2epi -anat anatT1_deob+orig          \
       -suffix _al_junk                                     \
       -epi vr_base_min_outlier+orig -epi_base 0            \
       -epi_strip 3dAutomask                                \
       -anat_has_skull no                                   \
       -cost lpc+zz -check_flip -giant_move -epi_strip None \
       -volreg off -tshift off

When :


 afni_proc.py -subj_id Oliver2019_02_02 -script                                                                             \
     proc.Oliver2019_02_02                   \
     -scr_overwrite -out_dir                                                                                                \
     Oliver2019_02_02.results                \
     -blocks tshift align tlrc volreg blur mask regress -dsets                                                              \
     BOLD_rs_tshift_deob_RECEN.nii.gz        \
     -copy_anat                                                                                                             \
     Oliver2019_02_02/anatT1_deob.nii.gz                  \
     -anat_has_skull no -align_opts_aea -cost lpc+zz -check_flip -giant_move                                                \
     -epi_strip None -align_epi_strip_method None -mask_dilate 1                                                            \
     -volreg_align_to MIN_OUTLIER -volreg_align_e2a -volreg_tlrc_warp                                                       \
     -mask_epi_anat yes -tlrc_base                                                                                          \
     Oliver2019_02_02/anatT1_deob_in_stdy_template.nii.gz \
     -tlrc_NL_warp -tlrc_NL_warped_dsets                                                                                    \
     Oliver2019_02_02/anatT1_deob_in_stdy_template.nii.gz \
     identity.aff12.1D                                        \
     Oliver2019_02_02/concate_linear_and_WARP.nii.gz      \
     -regress_motion_per_run -regress_apply_mot_types demean deriv                                                          \
     -blur_size 3 -mask_import WMa                                                                                          \
     atlas_to_study_template/WM2mm.nii.gz   \
     -regress_make_corr_vols WMa -regress_anaticor_fast                                                                     \
     -regress_run_clustsim yes -regress_est_blur_errts -html_review_style                                                   \
     pythonic -execute -tcat_remove_first_trs 5

generates:


align_epi_anat.py -anat2epi -anat anatT1_deob+orig          \
       -suffix _al_junk                                     \
       -epi vr_base_min_outlier+orig -epi_base 0            \
       -epi_strip None                                      \
       -anat_has_skull no                                   \
       -cost lpc+zz -check_flip -giant_move -epi_strip None \
       -volreg off -tshift off

To be clear, there is no “-epi_strip” option for afni_proc.py, there is only -align_epi_strip_method.

Note that your -epi_strip follows the -align_opts_aea option. And since -epi_strip is unknown to afni_proc.py, it is passed directly to align_epi_anat.py, which is why there is the extra -epi_strip option in that command.

  • rick