recon-all in freesurfer no longer giving suma output

AFNI version info (afni -ver): AFNI 24.1.08

Hi all,

I was struggling to get SSwarper to run when I realized that the issue was the input file. The SSwarper script from a past project used T1.nii.gz as input file from the suma output directory from Freesurfer. This suma directory does not seem to be generating when I run recon-all on these new data. I am not getting a clear error message and am wondering if having updated my freesurfer to 7.4.1 before working with these new data has anything to do with the lack of suma directory output. Any insights are appreciated.

code text  # or delete if not needed

Howdy-

We have some notes on using FreeSurfer recon-all and then converting the results to NIFTI and standardized GIFTI surfaces with @SUMA_Make_Spec_FS here.

Did you run @SUMA_Make_Spec_FS after recon-all? It sounds like maybe not. It is the former program that creates the SUMA/ directory with NIFTI, GIFTI, etc. files.

Re. @SSwarper: we have a newer version called sswarper2 that you might want to use instead. It has essentially the same syntax and output naming structure, but tends to be a little better and more stable in some cases. The OHBM-2024 poster describing it is here.

--pt

Thanks for the response!

I am taking over a project from a former student and it appears there was a lapse in documentation.

Re; sswarper2, this looks great! I am attempting to run a subject and it seems I have a bug somewhere. I'm getting ": Command not found". I used file_tool to check syntax errors, but does anything jump out to you?

#!/bin/tcsh -xef

# Written by Cassie Stevens 9/18/24

# execute via : 
#   tcsh -xef NEWsswarper_test.sh {$subj} |& tee logs/output.NEWsswarper_test.{$subj}

# the user may specify a single subject to run with
if ( $#argv > 0 ) then
    set subj = $argv[1]
else
    set subj = s1
endif

mkdir ../sswarper2/{$subj}

sswarper2                                                                                                                   \
    -input   ../Subjects/{$subj}/original_data/pb00.{$subj}.anat_oblique.nii                  \
    -base    MNI152_2009_template_SSW.nii.gz                                                         \
    -subid   {$subj}                                                                                                        \
    -odir    ../sswarper2/{$subj}                                                                                     \
	-unifize_off						                                                            \
    -verb

Howdy-

Hmm, that is odd. sswarper2 was in the AFNI distribution by ver=24.1.08, which you listed above.

Can you copy+paste this and show the output, just to check?:

which sswarper2

--pt

To be clear, did it say:

sswarper2: Command not found.

Or just:

: Command not found.

To be sure, how are you executing the script? And what happens if you run:

tcsh
echo hello
exit

-rick

Hi Rick,

Thanks for the reply. I am executing in tcsh and I get the appropriate hello echo from the above. This is the output I am getting from the above script for sswarper2. I appreciate any insight you have on this.

It looks like your script has DOS text formatting or something. Or maybe mac, I forget which is which.

file_tool -test -infiles sswarper2_test.sh
  • rick

Thanks for this, Rick. The DOS text formatting was the problem. I was able to fix it with this:

tr -d '\r' < NEWsswarper_test.sh > NEWsswarper_test_unix.sh

Great! Note that if simply deleting those carriage returns might not leave the file exactly as you wish, file_tool can also do that, just by giving that same command a -prefix option.

file_tool -test -infiles sswarper2_test.sh -prefix FIXED.sh

-rick