Hi all-
I’m trying to use the tedana functionality built in to AFNI_proc.py. This is my first attempt with multi-echo data and I’m running into a problem. Here is the AFNI_proc.py script for some rest data:
afni_proc.py \
-subj_id ${subject} \
-script proc.${subject}_MBME_rest \
-scr_overwrite \
-out_dir ${resdir}/${subject}_results_MBME_rest \
-dsets_me_run ${subdir}/Nifti/${subject}/ses-001/func/${subject}_ses-001_restMBME_run-001_echo-*_bold.nii.gz \
-echo_times 12.8 30.4 48 \
-reg_echo 2 \
-copy_anat ${subdir}/results/${subject}/fs/${subject}/SUMA/T1.nii \
-anat_has_skull yes \
-anat_follower_ROI FSvent epi ${resdir}/masks/${subject}_vent_mask.nii \
-anat_follower_ROI FSwm epi ${resdir}/masks/${subject}_wm_mask.nii \
-anat_follower_erode FSvent FSwm \
-blocks despike tshift align tlrc volreg blur mask combine scale regress \
-blip_forward_dset ${subdir}/Nifti/${subject}/ses-001/fmap/${subject}_ses-001_fmap_run-001_phasediff.nii.gz \
-blip_reverse_dset ${subdir}/Nifti/${subject}/ses-001/fmap/${subject}_ses-001_fmap_run-002_phasediff.nii.gz \
-despike_new yes \
-tlrc_base MNI152_T1_2009c+tlrc \
-tlrc_NL_warp \
-align_opts_aea \
-giant_move \
-cost lpc+ZZ \
-volreg_align_to MIN_OUTLIER \
-volreg_tlrc_warp \
-volreg_align_e2a \
-combine_method OC_tedort \
-blur_in_automask \
-mask_apply anat \
-regress_motion_per_run \
-regress_ROI_PC FSvent 3 \
-regress_ROI_PC_per_run FSvent \
-regress_anaticor_fast \
-regress_anaticor_label FSwm \
-test_stim_files no \
-regress_opts_3dD \
-jobs 4 \
-regress_bandpass 0.01 0.1 \
-regress_censor_motion 0.2 \
-regress_apply_mot_types demean deriv \
-regress_censor_first_trs 4 \
-regress_est_blur_errts \
-remove_preproc_files \
-execute
end
I get the following text output to the terminal:
3dcalc -float -a /projects/MBME_test/results/SKY02400_results_MBME_rest/tedana_r01/tedprep_echo_3_masked+tlrc -expr 'a*10000/5398.880684' -prefix /projects/MBME_test/results/SKY02400_results_MBME_rest/tedana_r01/tedprep_echo_3_preZcat
Output Zcat dataset is /projects/MBME_test/results/SKY02400_results_MBME_rest/tedana_r01/tedprep_Zcat_all.nii.gz
python /home/doug/abin/meica.libs/tedana.py \
--label r01 \
--orig_data /projects/MBME_test/results/SKY02400_results_MBME_rest/tedana_r01/tedprep_Zcat_all.nii.gz \
--TEs 12.8,30.4,48.0 \
File "/home/doug/abin/meica.libs/tedana.py", line 77
print '-- initializing random seed to %s' % seed
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('-- initializing random seed to %s' % seed)?
end
mkdir meica_orts
foreach run ( 01 )
@extract_meica_ortvec -meica_dir tedana_r01/TED.r01 -reject_midk 1 -work_dir tedana_r01/work.orts -prefix tedana_r01/meica_orts.1D
-- computing projection terms from MEICA results
** missing input meica parameter file, tedana_r01/TED.r01/accepted.txt
The Zcat file exists, but the TED.r01 directory has not been created. I thought maybe this was a python version issue so I ran the -find_prog python flag on system check and get the following output:
/home/doug/freesurfer/bin/fspython
/usr/bin/python3.8
/usr/bin/python3-futurize
/usr/bin/python3-pasteurize
/home/doug/abin/afni_python_wrapper.py
/home/doug/abin/python_module_test.py
proc.py seems to be calling the tedana.py file from the abin directory, so maybe it isn’t a python version problem?
Here are the results of my system check if that is useful:
-------------------------------- general ---------------------------------
architecture: 64bit ELF
system: Linux
release: 5.13.0-44-generic
version: #49~20.04.1-Ubuntu SMP Wed May 18 18:44:28 UTC 2022
distribution: ubuntu 20.04 focal
number of CPUs: 8
apparent login shell: bash
shell RC file: .bashrc (exists)
--------------------- AFNI and related program tests ---------------------
which afni : /home/doug/abin/afni
afni version : Precompiled binary linux_ubuntu_16_64: Jun 2 2022
: AFNI_22.1.12 'Antoninus Pius'
AFNI_version.txt : AFNI_22.1.12, linux_ubuntu_16_64, Jun 02 2022
which python : /usr/bin/python
python version : 3.8.10
which R : /usr/bin/R
R version : R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
which tcsh : /usr/bin/tcsh
instances of various programs found in PATH:
afni : 1 (/home/doug/abin/afni)
R : 1 (/usr/bin/R)
python : 1 (/usr/bin/python3.8)
python2 : 0
python3 : 1 (/usr/bin/python3.8)
** have python3 but not python2
testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
uber_subject.py : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
3dMVM : success
checking for R packages...
rPkgsInstall -pkgs ALL -check : success
R RHOME : /usr/lib/R
checking for $HOME files...
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found
------------------------------ python libs -------------------------------
** failed to load module PyQt4
-- PyQt4 is no longer needed for an AFNI bootcamp
++ module loaded: matplotlib.pyplot
module file : /usr/lib/python3/dist-packages/matplotlib/pyplot.py
matplotlib version : 3.1.2
-------------------------------- env vars --------------------------------
PATH = /home/doug/freesurfer/bin:/home/doug/freesurfer/fsfast/bin:/home/doug/freesurfer/tktools:/home/doug/freesurfer/mni/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/doug/abin:/usr/local/MATLAB/R2022a/bin
PYTHONPATH =
R_LIBS = /home/doug/R
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =
------------------------------ data checks -------------------------------
data dir : found AFNI_data6 under $HOME (110653M Avail)
top history: 20 Feb 2020 [rickr]: updated FT_analysis examples
data dir : found AFNI_demos under $HOME
top history: ...ct 2020 [taylorp]: updated scripts under FATCAT_DEMO
data dir : found suma_demo under $HOME
top history: ...s_New/data/Build_tmp on Mon Mar 4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas : found TT_N27+tlrc under /home/doug/abin
------------------------------ OS specific -------------------------------
which apt-get : /usr/bin/apt-get
apt-get version : apt 2.0.6 (amd64)
have Ubuntu system: ubuntu 20.04 focal
have Ubuntu afni : Precompiled binary linux_ubuntu_16_64: Jun 2 2022
========================= summary, please fix: =========================
* just be aware: login shell 'bash', but our code examples use 'tcsh'
Is my problem as simple as setting the python path in AFNI?
I’d be happy to upload the full text output if that would be helpful.
Any advice would be appreciated. I’m not sure what troubleshooting steps to try next.
Thanks,
Doug