Hi there, I am using @SUMA_Make_Spec_FS -GIFTI (full code below)
There is something going wrong. It produces less files (90) than normal (97), with missing files including lh.pial.
I used to run this code on my uni’s HPC and it worked fine. I am now working on a local machine at my institute. Could it have something to do with tcsh on our system? I had to ask for it to be installed, and some things don’t work as I would expect, e.g., module load does not work. I wondered this after reading this post who had tcsh issues causing problems with SUMA_Make_Spec_FS NO COR files for @SUMA_Make_Spec_FS function
Running other afni processes on this new local computer all seems to work fine.
Any help would be very appreciated. Code and more details/ output below.
Thank you!
Harriet
Code
#!/bin/tcsh
set base_dir = /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer
set sub = sub-050
set ses = ses-01
# Go to sub surf dir
set surf_dir = $base_dir/${sub}/${ses}
cd $surf_dir
# Run make_spec
@SUMA_Make_Spec_FS -GIFTI -sid ${sub}_${ses}
Here is the -ver info and output
Precompiled binary linux_ubuntu_24_64: Oct 1 2024 (Version AFNI_24.3.00 'Elagabalus')
(base) uqhdemp1@cai-wks2:/90days/uqhdemp1/Parent_scripts/Anat2Surfaces$ tcsh 3_run_suma_make_spec
++ Running @SUMA_Make_Spec_FS version: 2.2.4
++ creating directory './SUMA' for results...
-- found 5 LH surfaces
-- found 5 RH surfaces
mri_convert -ot nii /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/mri/orig.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/orig.nii
reading from /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/mri/orig.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/orig.nii...
++ 3drefit: AFNI version=AFNI_24.3.00 (Oct 1 2024) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/sub-050_ses-01_SurfVol.nii
+ changing ID code
+ loading and re-writing dataset /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/sub-050_ses-01_SurfVol.nii (/90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/SUMA/sub-050_ses-01_SurfVol.nii in NIFTI storage)
++ 3drefit processed 1 datasets
++ created AFNI file './SUMA/sub-050_ses-01_SurfVol.nii'
Made roi label table for AFNI - fs_table.niml.lt
mri_convert -ot nii mri/T1.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/T1.nii
reading from mri/T1.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/T1.nii...
mri_convert -ot nii mri/aseg.auto.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/aseg.auto.nii
reading from mri/aseg.auto.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/aseg.auto.nii...
mri_convert -ot nii mri/aseg.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/aseg.nii
reading from mri/aseg.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/aseg.nii...
++ 3drefit: AFNI version=AFNI_24.3.00 (Oct 1 2024) [64-bit]
++ Authored by: RW Cox
** AFNI converts NIFTI_datatype=8 (INT32) in file /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/SUMA/aseg.nii to FLOAT32
Warnings of this type will be muted for this session.
Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
++ Processing AFNI dataset aseg.nii
+ setting labeltable
+ loading and re-writing dataset aseg.nii (/90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/SUMA/aseg.nii in NIFTI storage)
++ 3drefit processed 1 datasets
mri_convert -ot nii mri/brain.finalsurfs.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/brain.finalsurfs.nii
reading from mri/brain.finalsurfs.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/brain.finalsurfs.nii...
mri_convert -ot nii mri/brain.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/brain.nii
reading from mri/brain.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/brain.nii...
mri_convert -ot nii mri/brainmask.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/brainmask.nii
reading from mri/brainmask.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/brainmask.nii...
mri_convert -ot nii mri/norm.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/norm.nii
reading from mri/norm.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/norm.nii...
mri_convert -ot nii mri/nu.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/nu.nii
reading from mri/nu.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/nu.nii...
mri_convert -ot nii mri/lh.ribbon.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/lh.ribbon.nii
reading from mri/lh.ribbon.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/lh.ribbon.nii...
mri_convert -ot nii mri/rh.ribbon.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/rh.ribbon.nii
reading from mri/rh.ribbon.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/rh.ribbon.nii...
mri_convert -ot nii mri/wm.asegedit.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/wm.asegedit.nii
reading from mri/wm.asegedit.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/wm.asegedit.nii...
mri_convert -ot nii mri/wm.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/wm.nii
reading from mri/wm.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/wm.nii...
mri_convert -ot nii mri/wm.seg.mgz /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/wm.seg.nii
reading from mri/wm.seg.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, -0, 0)
j_ras = (-0, 0, -1)
k_ras = (-0, 1, 0)
writing to /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/./SUMA/wm.seg.nii...
-- running 'mris_convert lh.smoothwm lh.smoothwm.asc'
Saving lh.smoothwm.asc as a surface in TKREGISTER space
Reading lh.smoothwm.asc ...
Comment: #!ascii version of lh.smoothwm
Performing affine transform...
Writing surface...
-- running 'mris_convert lh.inflated lh.inflated.asc'
Saving lh.inflated.asc as a surface in TKREGISTER space
Reading lh.inflated.asc ...
Comment: #!ascii version of lh.inflated
Performing affine transform...
Writing surface...
-- running 'mris_convert lh.sphere lh.sphere.asc'
Saving lh.sphere.asc as a surface in TKREGISTER space
Reading lh.sphere.asc ...
Comment: #!ascii version of lh.sphere
Performing affine transform...
Writing surface...
-- running 'mris_convert lh.white lh.white.asc'
Saving lh.white.asc as a surface in TKREGISTER space
Reading lh.white.asc ...
Comment: #!ascii version of lh.white
Performing affine transform...
Writing surface...
-- running 'mris_convert lh.sphere.reg lh.sphere.reg.asc'
Saving lh.sphere.reg.asc as a surface in TKREGISTER space
Reading lh.sphere.reg.asc ...
Comment: #!ascii version of lh.sphere.reg
Performing affine transform...
Writing surface...
-- running 'mris_convert rh.smoothwm rh.smoothwm.asc'
Saving rh.smoothwm.asc as a surface in TKREGISTER space
Reading rh.smoothwm.asc ...
Comment: #!ascii version of rh.smoothwm
Performing affine transform...
Writing surface...
-- running 'mris_convert rh.inflated rh.inflated.asc'
Saving rh.inflated.asc as a surface in TKREGISTER space
Reading rh.inflated.asc ...
Comment: #!ascii version of rh.inflated
Performing affine transform...
Writing surface...
-- running 'mris_convert rh.sphere rh.sphere.asc'
Saving rh.sphere.asc as a surface in TKREGISTER space
Reading rh.sphere.asc ...
Comment: #!ascii version of rh.sphere
Performing affine transform...
Writing surface...
-- running 'mris_convert rh.white rh.white.asc'
Saving rh.white.asc as a surface in TKREGISTER space
Reading rh.white.asc ...
Comment: #!ascii version of rh.white
Performing affine transform...
Writing surface...
-- running 'mris_convert rh.sphere.reg rh.sphere.reg.asc'
Saving rh.sphere.reg.asc as a surface in TKREGISTER space
Reading rh.sphere.reg.asc ...
Comment: #!ascii version of rh.sphere.reg
Performing affine transform...
Writing surface...
++ Converting surf dsets: lh.thickness
++ Converting surf dsets: lh.curv
++ Converting surf dsets: lh.sulc
++ Converting surf dsets: rh.thickness
++ Converting surf dsets: rh.curv
++ Converting surf dsets: rh.sulc
++ created spec file'./SUMA/sub-050_ses-01_lh.spec'
++ created spec file'./SUMA/sub-050_ses-01_rh.spec'
++ created spec file'./SUMA/sub-050_ses-01_both.spec'
------------------------------------------------------------------
Running MapIcosahedron for both hemispheres at ld values of 141 60
** **
To view in SUMA, run:
suma -spec std.141.sub-050_ses-01_lh.spec
** **
** **
To view in SUMA, run:
suma -spec std.141.sub-050_ses-01_rh.spec
** **
** **
To view in SUMA, run:
suma -spec std.60.sub-050_ses-01_lh.spec
** **
** **
To view in SUMA, run:
suma -spec std.60.sub-050_ses-01_rh.spec
** **
------------------------------------------------------------------
Please verify that the datasets are aligned properly in both
afni and suma. You may do this by running the following commands:
cd ./SUMA
afni -niml &
suma -spec sub-050_ses-01_both.spec -sv sub-050_ses-01_SurfVol.nii
++ Going to make renumbered ROIs now.
--> done for colorbar and making tissue maps.
See '@SUMA_renumber_FS -help' for description.
++ Running @SUMA_renumber_FS version: 1.6
** Trouble finding 'aparc+aseg.nii*'! Check /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/SUMA
++ Going to make a nice WB mask.
... and some useful QC images.
... and some useful ROI info tables.
++ Prepare for running adjunct_suma_fs_mask_and_qc (ver = 0.33)
set: No match.
++ Prepare for running adjunct_suma_fs_roi_info (ver = 0.3)
++ Executing 3dcalc()
argv[0]=3dcalc argv[1]=-a argv[2]=brainmask.nii argv[3]=-expr argv[4]=step(a) argv[5]=-session argv[6]=/tmp argv[7]=-prefix argv[8]=3dcalc_AFN_lcFqRCr7g6YQ2KbJuVyh1w argv[9]=-verbose
++ 3dcalc: AFNI version=AFNI_24.3.00 (Oct 1 2024) [64-bit]
++ Authored by: A cast of thousands
++ Computing sub-brick 0
++ Scaling output to type byte brick(s)
++ Sub-brick 0: no scale factor
++ Computing output statistics
++ Output dataset /tmp/3dcalc_AFN_lcFqRCr7g6YQ2KbJuVyh1w+orig.BRIK
set: No match.
++ Compressing all remaining .nii files, except for SurfVol.
@SUMA_Make_Spec_FS ... finished
Apparent issues
++ Running @SUMA_renumber_FS version: 1.6
** Trouble finding 'aparc+aseg.nii*'! Check /90days/uqhdemp1/Data/MND/bids/derivatives/Fastsurfer/sub-050/ses-01/SUMA
++ Prepare for running adjunct_suma_fs_mask_and_qc (ver = 0.33)
set: No match.
Then some more set: No match. Later on
Below is the output of afni_system_check.py -check_all
(base) uqhdemp1@cai-wks2:/90days/uqhdemp1/Parent_scripts/Anat2Surfaces$ afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit
cpu type: x86_64
system: Linux
release: 6.8.0-49-generic
version: #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2
distribution: ubuntu 24.04 Noble Numbat
number of CPUs: 80
apparent login shell: bash
shell RC file: .bashrc (exists)
--------------------- AFNI and related program tests ---------------------
which afni : /usr/local/abin/afni
afni version : Precompiled binary linux_ubuntu_24_64: Oct 1 2024
: AFNI_24.3.00 'Elagabalus'
AFNI_version.txt : AFNI_24.3.00, linux_ubuntu_24_64, Oct 01 2024, official
which python : /usr/bin/python
python version : 3.12.3
which R : /usr/bin/R
R version : R version 4.3.3 (x86_64-pc-linux-gnu)
instances of various programs found in PATH:
afni : 1 (/usr/local/abin/afni)
R : 1 (/usr/bin/R)
python : 1 (/usr/bin/python3.12)
python2 : 0
python3 : 1 (/usr/bin/python3.12)
** have python3 but not python2
testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
uber_subject.py : success
3dMVM : success
------------------------ dependent program tests -------------------------
checking for dependent programs...
which tcsh : /usr/bin/tcsh
tcsh version : 6.24.10
which Xvfb : /usr/bin/Xvfb
checking for R packages...
rPkgsInstall -pkgs ALL -check : success
R RHOME : /usr/lib/R
------------------------------ python libs -------------------------------
++ module loaded: matplotlib.pyplot
module file : /usr/lib/python3/dist-packages/matplotlib/pyplot.py
matplotlib version : 3.6.3
++ module loaded: flask
module file : /usr/lib/python3/dist-packages/flask/__init__.py
flask version : 3.0.2
++ module loaded: flask_cors
module file : /usr/lib/python3/dist-packages/flask_cors/__init__.py
flask_cors version : 4.0.0
-------------------------------- env vars --------------------------------
PATH = /opt/freesurfer-7.4.1/bin:/opt/freesurfer-7.4.1/fsfast/bin:/opt/freesurfer-7.4.1/tktools:/opt/freesurfer-7.4.1/mni/bin:/usr/local/abin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/.local/bin
PYTHONPATH =
R_LIBS = /usr/local/share/R-4.3
LD_LIBRARY_PATH = /.singularity.d/libs
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =
CONDA_SHLVL =
CONDA_DEFAULT_ENV =
CC =
----------------------------- eval dot files -----------------------------
----------- AFNI $HOME files -----------
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : missing
--------- shell startup files ----------
-- no .tcshrc, will create one as a follower of .cshrc
-- considered operations: path, apsearch
-- note: followers should not need edits, so edit flags should be 0
(have 1 follower(s), which can be ignored)
dot file test : want 4 modifications across 3 files:
file path flatdir apsearch follower
--------------- ---- ------- -------- --------
.cshrc 1 0 1 0
.tcshrc 0 0 0 1
.bashrc 1 0 1 0
------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /usr/local/abin
------------------------------ OS specific -------------------------------
which apt-get : /usr/bin/apt-get
apt-get version : apt 2.7.14 (amd64)
have Ubuntu system: ubuntu 24.04 Noble Numbat
have Ubuntu afni : Precompiled binary linux_ubuntu_24_64: Oct 1 2024
========================= summary, please fix: =========================
* just be aware: login shell 'bash', but our code examples use 'tcsh'
* 'afni' executable is owned by root
* please run: apsearch -update_all_afni_help
* dot file test : want 4 modifications across 3 files:
* insufficient data for AFNI bootcamp
(see "Prepare for Bootcamp" on install pages)
I tried to run the same code as above, but with debug mode on:
-debug 2
But got this error:
(base) uqhdemp1@cai-wks2:/90days/uqhdemp1/Parent_scripts/Anat2Surfaces$ -debug 2
Command '-debug' not found, did you mean:
command 'udebug' from deb openafs-client (1.8.10-2ubuntu1~22.04.2)
Try: apt install <deb name>
Also adding this from the forum example above:
(base) uqhdemp1@cai-wks2:/90days/uqhdemp1/Parent_scripts/Anat2Surfaces$ file_tool -show_bad_all -infiles `which @SUMA_Make_Spec_FS`
/data/lfs2/neurocommand/local/containers/afni_24.3.00_20241003/@SUMA_Make_Spec_FS has 0 bad characters
/data/lfs2/neurocommand/local/containers/afni_24.3.00_20241003/@SUMA_Make_Spec_FS file type: UNIX
Also following that example from the forum above, I tried changing my code to the following:
@SUMA_Make_Spec_FS -fs_setup -GIFTI -sid ${sub}_${ses} -fspath ./${sub}_${ses} |& tee output.3_run_suma_make_spec_${sub}_${ses}.txt
But it came back with this, so I may not have understood the instructions:
(base) uqhdemp1@cai-wks2:/90days/uqhdemp1/Parent_scripts/Anat2Surfaces$ tcsh 3_run_suma_make_spec
++ Running @SUMA_Make_Spec_FS version: 2.2.4
++ sourcing $FREESURFER_HOME/SetUpFreeSurfer.csh
INFO: /data/home/uqhdemp1/matlab/startup.m does not exist ... creating
failure: directory not found - './sub-050_ses-01'
program failure: exiting...
Tcsh is installed, and some things work normally with it
(base) uqhdemp1@cai-wks2:/90days/uqhdemp1/Parent_scripts/Anat2Surfaces$ which tcsh
/usr/bin/tcsh
Thank you once again!