AFNI Message Board

History of AFNI updates  

|
April 21, 2022 09:55AM
Hi, Osman-

I suggest you copy+paste the following text (which is your command, from above, just spaced out fairly uniformly) into a text file, say one called "do_ap.tcsh", so it is easier to fix and rerun, and generalize to process more subjects over time (the first line, which starts with odd characters, should be the very first thing in the new text file created):
#!/bin/tcsh

afni_proc.py                                                                 \
    -subj_id                  FT.11b.rest                                    \
    -blocks                   despike tshift align tlrc volreg blur mask     \
                              scale regress                                  \
    -copy_anat                anat+orig                                      \
    -dsets                    func+orig.HEAD                                 \
    -tcat_remove_first_trs    2                                              \
    -align_opts_aea           -cost lpc+ZZ                                   \
    -tlrc_base                TT_N27+tlrc                                    \
    -tlrc_NL_warp                                                            \
    -volreg_align_to          MIN_OUTLIER                                    \
    -volreg_align_e2a                                                        \
    -volreg_tlrc_warp                                                        \
    -volreg_warp_dxyz         2.5                                            \
    -blur_size                4                                              \
    -mask_segment_anat        yes                                            \
    -mask_segment_erode       yes                                            \
    -mask_import              Tvent template_ventricle_2.5mm+tlrc            \
    -mask_intersect           Svent CSFe Tvent                               \
    -mask_epi_anat            yes                                            \
    -regress_motion_per_run                                                  \
    -regress_ROI_PC           Svent 3                                        \
    -regress_ROI_PC_per_run   Svent                                          \
    -regress_make_corr_vols   WMe Svent                                      \
    -regress_anaticor_fast                                                   \
    -regress_censor_motion    0.2                                            \
    -regress_censor_outliers  0.05                                           \
    -regress_apply_mot_types  demean deriv                                   \
    -regress_est_blur_epits                                                  \
    -regress_est_blur_errts                                                  \
    -regress_run_clustsim     yes
Then, when you want to process this subject, you can type the following single line in the terminal:
tcsh do_ap.tcsh

Looking at your warnings and error messages, let's pick out a few to unpack:
+ This one with double asterisks can be fine---it is just reminding you to make sure that any associated stimulus timing files are also adjusted to match this removal of two initial time points (and since your run is like a resting state processing, with no stim files, then this should not be an issue to even need to verify):
** warning: removing first 2 TRs from beginning of each run
--> the stimulus timing files must reflect the removal of these TRs

+ this suggests that this file "template_ventricle_2.5mm+tlrc" does not exist on your system:
** cannot evaluate view of missing input: template_ventricle_2.5mm+tlrc
** in/out view change: NO-DSET -> +orig: mask_import_Tvent
This is not a file distributed with AFNI, so it would have to exist on your computer; how one could make this file is actually described at the top of this example 11b section here in the AP help:
[afni.nimh.nih.gov]

+ these error message also relates to that same issue (a mask can't be made because the file doesn't exist):
** 3dinfo -d3: cannot get val list from NO-DSET NO-DSET NO-DSET, for dset template_ventricle_2.5mm+tlrc
** bad dims for -mask_import dataset:
template_ventricle_2.5mm+tlrc
import dims = None, analysis dims = [2.5, 2.5, 2.5]
** script creation failure for block 'mask'

To solve the above issue, you could follow the instructions at the top of the help section, which I noted above and copy+paste here:
AFNI currently does not have a good program to extract ventricles.
But it can make a CSF mask that includes them.  So without FreeSurfer,
one could import a ventricle mask from the template (e.g. for TT space,
using TT_desai_dd_mpm+tlrc).  For example, assuming Talairach space
(and a 2.5 mm^3 final voxel grid) for the analysis, one could create a
ventricle mask as follows:

       3dcalc -a ~/abin/TT_desai_dd_mpm+tlrc                       \
              -expr 'amongst(a,152,170)' -prefix template_ventricle
       3dresample -dxyz 2.5 2.5 2.5 -inset template_ventricle+tlrc \
              -prefix template_ventricle_2.5mm

Running that 3dcalc and 3dresample command should create template_ventricle_2.5mm, which you should then be able to use in your AP command.

--pt
Subject Author Posted

afni_proc.py example 11b

osman April 20, 2022 07:25PM

Re: afni_proc.py example 11b

ptaylor April 21, 2022 09:55AM

Re: afni_proc.py example 11b Attachments

osman April 21, 2022 05:06PM

Re: afni_proc.py example 11b

ptaylor April 21, 2022 05:12PM

Re: afni_proc.py example 11b

osman April 21, 2022 05:48PM

Re: afni_proc.py example 11b Attachments

ptaylor April 21, 2022 09:28PM

Re: afni_proc.py example 11b Attachments

osman April 28, 2022 12:15PM

Re: afni_proc.py example 11b Attachments

ptaylor April 28, 2022 12:42PM

Re: afni_proc.py example 11b

rick reynolds April 28, 2022 01:06PM

Re: afni_proc.py example 11b Attachments

osman April 28, 2022 07:27PM

Re: afni_proc.py example 11b

osman April 28, 2022 07:30PM

Re: afni_proc.py example 11b

ptaylor April 29, 2022 08:49AM

Re: afni_proc.py example 11b

osman April 29, 2022 10:23AM

Re: afni_proc.py example 11b

ptaylor April 29, 2022 02:52PM



Sorry, only registered users may post in this forum.

Click here to login