AFNI version info (afni -ver): Version AFNI_24.2.01 'Macrinus'
Hello,
I'd like to move my previous pre- processing protocol to afni_proc.py, if possible. Below are my current functions. Ideally, I do not want it to do any auto-masking as I've found that our application requires us to manually segment our areas of interest.
Let me know any other information I can provide to help clarify.
3dDespike \
-overwrite \
-nomask \
-localedit \
-cut 2.5 5 \
-ignore 2 \
-prefix $AnimalID/$FolderID/${AnimalID}_${FolderID}.DS.Box \
$AnimalID/$FolderID/${AnimalID}_${FolderID}.Box+orig
align_epi_anat.py \
-overwrite \
-epi $AnimalID/$FolderID/${AnimalID}_${FolderID}.DS.Box+orig \
-anat $AnimalID/$FolderID/${AnimalID}_${FolderID}.Box.Mean+orig \
-epi2anat \
-epi_base "$NBASE0" \
-epi_strip None \
-volreg_method 3dvolreg \
-volreg_base median \
-volreg_opts "-heptic -weight COPY_tempab2D+orig'[0]'" \
-anat_has_skull no \
-output_dir "$AnimalID/$FolderID/" \
-cost ls
# have not validated this below function works. Just want to give an idea that I'd like to also include this kind of regressing protocol
#
afni_proc.py \
-subj_id $AnimalID \
-dsets $AnimalID/$FolderID/${AnimalID}_${FolderID}.DS.Box_al+orig \
-blocks regress \
-anat_follower_ROI mMask epi $AnimalID/$FolderID/MMASK_${AnimalID}_${FolderID}.Box.Mean+orig \
-regress_ROI mMask
While the option order does not matter, let me set up a command that specifies the EPI (and any related into), the anat (and related), then the -blocks and block options. Changes that will be included:
include a scale block
assume 2 pre-steady state TRs (-ignore 2 suggests it)
align EPI to MIN_OUTLIER rather than median or $NBASE0
I do not currently think there is a way to apply 3dvolreg -weight
(such a thing could possibly be added)
regression will include motion (you could consider censoring)
some additional QC will be added
This is tcsh syntax, so you may need to translate.
Thanks so much for this Rick. I will give it a try.
An initial ponder leads me to the question:
If we realize our application does need the weight for optimal co-registration, is there a way to break up the afni_proc.py command to do essentially the same thing overall, but keeping use of 'align_epi_anat' instead?
EDIT: And using the a 1D file of motion parameters for the regress_motion part?
Currently I convert the motion parameters as follows:
Because you are leaving the EPI in original space, there is no harm in breaking the process into pieces, one up through volreg, one after.
Or, you could pass the needed files (.BRIK, .HEAD or .nii.gz) via -copy_files, and edit the proc script to use that file for a volreg weight.
Additionally, you could get me to add such an option to the program. I won't guarantee doing that right away, but it seems like it would be reasonable to add. But note that using an external weight volume probably means you should be using an external registration base (which aligns with the weight) via -volreg_base_dset.
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.