@SUMA_Make_Spec_FS with additional annotations

Hello,
I am trying to add an additional annotation (DKTatlas). I see there is a new flag, -extra_annot_labels that I think should do what I want.

For reference, I am running:
Precompiled binary linux_openmp_64: Jan 18 2021 (Version AFNI_21.0.04 ‘Titus’)

I used the command:
@SUMA_Make_Spec_FS -NIFTI -extra_annot_labels DKTatlas -sid sub-CSA006

I also tried

@SUMA_Make_Spec_FS -NIFTI -extra_annot_labels aparc.DKTatlas -sid sub-CSA006

As the help says it wants the files to exist with the name
lh.LABEL.annot
rh.LABEL.annot

for the DKTatlas, there is:

In the label directory:
aparc.annot.DKTatlas.ctab
lh.aparc.DKTatlas.annot
rh.aparc.DKTatlas.annot

In the mri directory:
aparc.DKTatlas+aseg.mgz

It seems to register the flag, as it says on line 2 of the output: ++ will track 1 extra annot labels

But then it never gives an error message, or tries to do anything with the DKTatlas.

Any help is much appreciated!
Stephanie McMains

Hi, Stephanie-

Sorry for the delay in replying.

That is odd… I just ran FS on the Bootcamp subject (AFNI_data6/FT_analysis/FT/anatHEAD), and then (I have a different subject ID, but that shouldn’t matter):


@SUMA_Make_Spec_FS \
    -NIFTI \
    -extra_annot_labels   aparc.DKTatlas   \
    -sid sub-000          \
    -fspath sub-000

… and I get DKT output files in the SUMA/ directory. That is, indeed, the correct way to run this command. (You didn’t use “-fspath …”, because I guess you ran it from the directory made by recon-all, but that doesn’t make a difference).

What version of FreeSurfer are you running?

If you run the command “-debug 2”, it will be very verbose about what it is trying; and if you save all the text from the terminal, then I could take a look; to do that, you have to know if you are using: check with:


echo $0

… which should tell you bash/zsh or tcsh or something.

For bash or zsh, add the following to the end of your command line:


2>&1 | tee o.text_output_of_reconall.txt

… and for tcsh/csh, add the following:


|& tee o.text_output_of_reconall.txt

… and you can email me the output *.txt file.

–pt

Thanks for the reply. Let me give some more details about my specific setup then.

Freesurfer version from build-stamp.txt
freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c

Ran it with:
@SUMA_Make_Spec_FS -NIFTI -extra_annot_labels aparc.DKTatlas -sid sub-CSA006 -debug 2

I noticed these lines this time, that also mention the extra label…
++ have 1 extra labels, including as if -extra_fs_dsets
** missing surf input to mris_convert for -extra_fs_dsets

There are no surf files for the DTK atlas.

Output from it:
++ Running @SUMA_Make_Spec_FS version: 2.2.1
++ will track 1 extra annot labels
– usage okay
– using start_dir ‘/projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf’
– all programs found
– using surf directory ‘.’…
– using orig directory ‘…/mri/orig’…
++ creating directory ‘./SUMA’ for results…
– found 6 LH surfaces
– lh.smoothwm lh.pial lh.inflated lh.sphere lh.white lh.sphere.reg
– found 6 RH surfaces
– rh.smoothwm rh.pial rh.inflated rh.sphere rh.white rh.sphere.reg
mri_convert -ot nii /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/…/mri/orig.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/orig.nii
reading from /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/…/mri/orig.mgz…
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/orig.nii…
++ created AFNI file ‘./SUMA/sub-CSA006_SurfVol.nii’
Made roi label table for AFNI - fs_table.niml.lt
mri_convert -ot nii …/mri/T1.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/T1.nii…
mri_convert -ot nii …/mri/aparc+aseg.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/aparc+aseg.nii
reading from …/mri/aparc+aseg.mgz…
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/aparc+aseg.nii…
mri_convert -ot nii …/mri/aparc.a2009s+aseg.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/aparc.a2009s+aseg.nii
reading from …/mri/aparc.a2009s+aseg.mgz…
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/aparc.a2009s+aseg.nii…

Notice: SessionAtlases.niml already exists, appending to it aparc.a2009s+aseg.
mri_convert -ot nii …/mri/aseg.auto.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/aseg.auto.nii…
mri_convert -ot nii …/mri/aseg.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/aseg.nii…

Notice: SessionAtlases.niml already exists, appending to it aseg.
mri_convert -ot nii …/mri/brain.finalsurfs.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/brain.finalsurfs.nii…
mri_convert -ot nii …/mri/brain.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/brain.nii…
mri_convert -ot nii …/mri/brainmask.auto.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/brainmask.auto.nii
reading from …/mri/brainmask.auto.mgz…
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/brainmask.auto.nii…
mri_convert -ot nii …/mri/brainmask.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/brainmask.nii…
mri_convert -ot nii …/mri/norm.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/norm.nii…
mri_convert -ot nii …/mri/nu.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/nu.nii…
mri_convert -ot nii …/mri/lh.ribbon.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/lh.ribbon.nii…
mri_convert -ot nii …/mri/rh.ribbon.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/rh.ribbon.nii…
mri_convert -ot nii …/mri/wm.asegedit.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/wm.asegedit.nii…
mri_convert -ot nii …/mri/wm.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/wm.nii…
mri_convert -ot nii …/mri/wm.seg.mgz /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./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, -7.45058e-09)
j_ras = (0, 0, -1)
k_ras = (1.86265e-09, 1, -5.82077e-11)
writing to /projectnb/onr/mcmains/razan/fs_data/sub-CSA006/surf/./SUMA/wm.seg.nii…
– running ‘mris_convert lh.smoothwm lh.smoothwm.asc’
Saving lh.smoothwm.asc as a surface
Reading lh.smoothwm.asc …
Performing affine transform…
Writing surface…
++ lh.smoothwm.gii created
– running ‘mris_convert lh.pial lh.pial.asc’
Saving lh.pial.asc as a surface
Reading lh.pial.asc …
Performing affine transform…
Writing surface…
++ lh.pial.gii created
– running ‘mris_convert lh.inflated lh.inflated.asc’
Saving lh.inflated.asc as a surface
Reading lh.inflated.asc …
Performing affine transform…
Writing surface…
++ lh.inflated.gii created
– running ‘mris_convert lh.sphere lh.sphere.asc’
Saving lh.sphere.asc as a surface
Reading lh.sphere.asc …
Performing affine transform…
Writing surface…
++ lh.sphere.gii created
– running ‘mris_convert lh.white lh.white.asc’
Saving lh.white.asc as a surface
Reading lh.white.asc …
Performing affine transform…
Writing surface…
++ lh.white.gii created
– running ‘mris_convert lh.sphere.reg lh.sphere.reg.asc’
Saving lh.sphere.reg.asc as a surface
Reading lh.sphere.reg.asc …
Performing affine transform…
Writing surface…
++ lh.sphere.reg.gii created
– running ‘mris_convert rh.smoothwm rh.smoothwm.asc’
Saving rh.smoothwm.asc as a surface
Reading rh.smoothwm.asc …
Performing affine transform…
Writing surface…
++ rh.smoothwm.gii created
– running ‘mris_convert rh.pial rh.pial.asc’
Saving rh.pial.asc as a surface
Reading rh.pial.asc …
Performing affine transform…
Writing surface…
++ rh.pial.gii created
– running ‘mris_convert rh.inflated rh.inflated.asc’
Saving rh.inflated.asc as a surface
Reading rh.inflated.asc …
Performing affine transform…
Writing surface…
++ rh.inflated.gii created
– running ‘mris_convert rh.sphere rh.sphere.asc’
Saving rh.sphere.asc as a surface
Reading rh.sphere.asc …
Performing affine transform…
Writing surface…
++ rh.sphere.gii created
– running ‘mris_convert rh.white rh.white.asc’
Saving rh.white.asc as a surface
Reading rh.white.asc …
Performing affine transform…
Writing surface…
++ rh.white.gii created
– running ‘mris_convert rh.sphere.reg rh.sphere.reg.asc’
Saving rh.sphere.reg.asc as a surface
Reading rh.sphere.reg.asc …
Performing affine transform…
Writing surface…
++ rh.sphere.reg.gii created
++ have 1 extra labels, including as if -extra_fs_dsets
** missing surf input to mris_convert for -extra_fs_dsets
++ 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
++ creating spec file ‘sub-CSA006_lh.spec’…
++ created spec file’./SUMA/sub-CSA006_lh.spec’
++ creating spec file ‘sub-CSA006_rh.spec’…
++ created spec file’./SUMA/sub-CSA006_rh.spec’
++ creating spec file ‘sub-CSA006_both.spec’…
++ created spec file’./SUMA/sub-CSA006_both.spec’


Running MapIcosahedron for both hemispheres at ld values of 141 60


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-CSA006_both.spec -sv sub-CSA006_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
++ found ./aparc+aseg.nii
++ found ./aparc.a2009s+aseg.nii
++ Renumbering FS whole brain (./aparc+aseg.nii).
++ … getting gm…
++ … getting wmat…
++ … getting csf…
++ … getting vent…
++ … getting othr…
++ … getting unkn…

++ Running checks now.

++ Attaching labeltable to: aparc+aseg_REN_all.nii.gz
++ Attaching labeltable to: aparc+aseg_REN_gm.nii.gz
++ Attaching labeltable to: aparc+aseg_REN_gmrois.nii.gz
++ Attaching labeltable to: aparc+aseg_REN_wmat.nii.gz
++ Attaching labeltable to: aparc+aseg_REN_csf.nii.gz
++ Attaching labeltable to: aparc+aseg_REN_vent.nii.gz
++ Attaching labeltable to: aparc+aseg_REN_othr.nii.gz
++ Attaching labeltable to: aparc+aseg_REN_unkn.nii.gz

++ OK through ‘2000’ dsets.

++ Renumbering FS whole brain (./aparc.a2009s+aseg.nii).
++ … getting gm…
++ … getting wmat…
++ … getting csf…
++ … getting vent…
++ … getting othr…
++ … getting unkn…

++ Running checks now.

++ Attaching labeltable to: aparc.a2009s+aseg_REN_all.nii.gz
++ Attaching labeltable to: aparc.a2009s+aseg_REN_gm.nii.gz
++ Attaching labeltable to: aparc.a2009s+aseg_REN_gmrois.nii.gz
++ Attaching labeltable to: aparc.a2009s+aseg_REN_wmat.nii.gz
++ Attaching labeltable to: aparc.a2009s+aseg_REN_csf.nii.gz
++ Attaching labeltable to: aparc.a2009s+aseg_REN_vent.nii.gz
++ Attaching labeltable to: aparc.a2009s+aseg_REN_othr.nii.gz
++ Attaching labeltable to: aparc.a2009s+aseg_REN_unkn.nii.gz

++ OK through ‘2009’ dsets.

++ Compressing all remaining .nii files, except for SurfVol.

@SUMA_Make_Spec_FS … finished

Hi, Stephanie-

Well, that is odd. I am not sure. Would you mind uploading the file tree output by recon-all? I know this is a bit of a pain, because it is so large, but I am not sure how else to investigate at this point. Perhaps if you could upload the dset you input to recon-all, as well, I can try running it on my computer.

I just shared a Box drive folder with you.

–pt

I uploaded the orig dicoms to the box drive you sent. I also included a text file of the files in the FreeSurfer directory. Let me know if that wasn’t what you were asking for.

Thanks!
Stephanie

So it was all me. I ran it originally from inside of the surf directory. Everything else ran fine except the extra atlas, so I didn’t realize it. Worked once I went inside the main recon-all directory or used the fspath.

Thanks for helping me discover my own stupidity! I have been away from data analysis too long!

Thanks,
Stephanie

Hi, Stephanie-

Glad it is sorted. I wouldn’t feel too down about running into this issue. Data analysis is really complex and issues can be subtle (and even really, really subtle). And if some program doesn’t seem to be working correctly, certainly asking for advice is a good thing to sort it out, whatever is happening.

–pt