I got an error as "No such file or directory: 'QC_SUBJ/media/qc_07_vstat_seed_rh-cort-vis.pbar.json.'"
I also found there weren't full outputs of preprocessing as it ended with run_qc_06.
Hmmm, it would help to see a bit more output. Could you please copy+paste the output of
afni_system_check.py -check_all
... and perhaps your afni_proc.py command as well?
Also, could you also copy+paste the terminal outputs of running one of these commands (depending on your shell, which you can tell by the letter-part of what is output by running echo $0):
# if shell is tcsh or csh
apqc_make_tcsh.py -review_style pythonic -subj_dir . \
-uvar_json out.ss_review_uvars.json -do_log |& tee log_apqc.tcsh
# if shell is bash or zsh
apqc_make_tcsh.py -review_style pythonic -subj_dir . \
-uvar_json out.ss_review_uvars.json -do_log 2>&1 | tee log_apqc.tcsh
Thanks for that info. It is a very odd place for the code to break, because essentially the same thing that just happened for the "seed_lh-PCC" vstat map---completed without complaint---is just being done again for "seed_rh-cort-vis", but it breaks in the latter case.
I just ran this on my computer with essentially the same AFNI version number, and also using Python 2.7 (which might not be so recommended anymore, given that Python 2.7 has been officially deprecated for a long time---most AFNI programs are still fine with it, but it will be catered for less-and-less in the future, and it would probably make sense to move toward using Python 3.*). I had no errors. Hmmm.
Could you please copy+paste your afni_proc.py command, and I will try a more exact copy of what you are running?
I have a few comments on different features. I will start with the ME-FMRI specific one:
Re. combination method: -combine_method tedana runs a very old version of tedana, one which indeed is in Python 2.7 (from Kundu et al., 2015). There is a much newer, more modernly maintained and developed version from Du Pre et al., 2021 that you would use with method name mtedana instead of tedana, described here. We typically recommend people use the latter, unless they are developers or comparing methods, given the relative age and current states of active development. Would you perhaps want to try the latter?
The regress censor motion is really a big value (-regress_censor_motion 3.0). The unit of it is approx. millimeters. I would typically expect that to be more of order 0.3 or so, possibly higher for children or motion prone subjects (like up to 1.0, perhaps).
Re. -regress_ROI WMe CSF, we would typically only include tissue-based regressors when those maps have been made with great detail, e.g., with FreeSurfer (see this AP example and the anat_follower .. options and comments above the command). Using the simple 3dSeg segmentation (which is what the above would use) is perhaps not exact enough, and errors in boundaries could lead to really bad processing results, grabbing GM accidentally. For that reason, too, we would typically erode the WM maps.
Re. bandpassing (-regress_bandpass 0.01 0.1): we know it is commonly done in the field, but there are strong reasons not to do so, and we would likely not recommend doing so in most cases, because the penalty of degrees of freedom lost is high (and there is useful info in those shorter times scales/higher frequencies). See this AP help note for more discussion and references.
Re. blurring (-blur_size 6): we typically recommend blurring about 1.5 times the min or ave EPI voxel dim for single echo EPI, but for multi-echo FMRI, which you have here, you probably want much more minimal EPI. I don't know your voxel size, but likely 6mm is pretty big compared to it. ME-FMRI has notably higher voxelwise TSNR than single echo EPI, and so less blurring is needed and this 6 mm blurring might spread things out a lot.
For nonlinear alignment and skullstripping the anatomical volume, we would typically recommend running sswarper2 (the updated version of previous @SSwarper) before running afni_proc.py and then handing its results over. That is more computationally efficient and generally that program does a better job at nonlinear warp estimation and skullstripping job; see the sswarper2 help for running it, and the recipe for passing its useful outputs to afni_proc.py.
To help EPI-anatomical alignment in human FMRI data, we would typically include -align_unifize_epi local, which reduces the influence of potential EPI brightness inhomogeneity.
Also, for EPI-anatomical alignment we typically prefer having -cost lpc+ZZ rather than -cost nmi; the latter can be OK, but the former is usually quite solid. Has that not worked?
I got some warnings about the FS atlases:
"** WARNING: anat follower does not seem to exist: aparc.a2009s+aseg_REN_all.nii.gz
originally from aparc.a2009s+aseg_REN_all.nii.gz
** WARNING: anat follower does not seem to exist: aparc.a2009s+aseg_REN_all.nii.gz
originally from aparc.a2009s+aseg_REN_all.nii.gz
** WARNING: anat follower does not seem to exist: fs_ap_latvent.nii.gz
originally from fs_ap_latvent.nii.gz
** WARNING: anat follower does not seem to exist: fs_aq_wm.nii.gz
originally from fs_aq_wm.nii.gz
-- template = 'MNI152_2009_template_SSW.nii.gz', exists = 1
-- have APQC atlas APQC_atlas_MNI.nii.gz
-- will use min outlier volume as motion base
** ERROR: no anat follower or ROI dict label 'FSvent'
** invalid block : regress"
I would add a -subj_id .. option, so the outputs know the correct name of the subject.
To your question about this warning that turns fatal (and similar):
WARNING: anat follower does not seem to exist: aparc.a2009s+aseg_REN_all.nii.gz
... you need to provide a path to those files. Likely somethat that includes the SUMA/ directory, created after running both FreeSurfer's recon-all and AFNI's @SUMA_Make_Spec_FS. It is analogous to needing a path for your -tlrc_NL_warped_dsets .. for loading in the SSwarper results.
Perhaps a relevant question is why do you need a path for the FreeSurfer- and SSwarper-generated files, but not for MNI152_2009_template_SSW.nii.gz? Well, AFNI distributes some standard reference datasets, including that MNI*nii.gz one. AFNI will search a few locations (including the abin directory where the binaries live) for reference files, so you don't have to copy them around everywhere. The MNI*nii.gz falls into that category.
Slight side note: You can also also set up other directories to be in this list, and those might have other properties like loading those datasets into the AFNI GUI to always be selectable as underlay/overlay, even without copying them into your local directory. That functionality in particular is called setting up the AFNI_GLOBAL_SESSION environment variable, which Daniel discusses in the AFNI Academy lectures here.
OK, so that is why MNI*nii.gz typically won't need a path to it, but the other files you have do because they are not special/broadly applicable reference files that live in a special directory. They are special in their own way, sure, but they are specific to a particular subject only, and you need to tell afni_proc.py where to find them.
Thank you so much for your kind reply! I was wondering if that means I should run -recon-all and @SUMA_Make_Spec_FS for each subject first before running afni_pro.py.
Yes, that is correct. FreeSurfer creates a detailed surface mesh and anatomical parcellation for each subject, output in their own anatomical space. It is a person-by-person analysis to run. @SUMA_Make_Spec_FS copies the outputs to more widely used NIFTI and GIFTI formats, as well as standardizing the mesh (at the std.141 and std.60 resolutions), and makes other things like the *REN* files of subsets of tissue classes, a parcellation-based brain mask fs_mask*, the *spec files of surface families, and more.
Thank you so much for all your help! Our new afni_proc.py command has been running well so far. Can I ask a very basic question? Does 3dTproject detrend the fmri data?
Also, we have another single-echo dataset with resting state fMRI, t1w image, and an additional high resolution EPI. I was wondering how we could include the high resolution EPI to improve our preprocessing. I guessed we should first align the high-resolution EPI image to the T1W anatomical image and then align the rs-fMRI to high-resolution EPI. Can that be integrated into the afni_proc.py command?
Many thanks
Yan
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.