Resolved - thank you Andrew!

Solution: operator error, needed to cat file w/ input list for --inputs instead 
of just specifying file w/ input list

________________________________
From: Hoopes, Andrew
Sent: Thursday, February 15, 2018 4:43:18 PM
To: Makaretz, Sara Johanna; Freesurfer support list
Subject: Re: [Freesurfer] IndexError: list index out of range

Thanks Sarah, I haven’t been able to replicate this - do you mind sending the 
stats file that you’re using as input?

Andrew



On February 15, 2018 at 3:58:17 PM, Makaretz, Sara Johanna 
(smakar...@mgh.harvard.edu<mailto:smakar...@mgh.harvard.edu>) wrote:

Hi Andrew,

python --version
=
Python 2.7.3 -- EPD 7.3-1 (64-bit)

Sara

________________________________
From: Hoopes, Andrew
Sent: Thursday, February 15, 2018 3:56:22 PM
To: Makaretz, Sara Johanna; Freesurfer support list
Subject: Re: [Freesurfer] IndexError: list index out of range

Hi Sara and Arkadiy,

What version of python2 are you using?
python --version

thanks
Andrew


On February 13, 2018 at 10:16:34 AM, Makaretz, Sara Johanna 
(smakar...@mgh.harvard.edu<mailto:smakar...@mgh.harvard.edu>) wrote:

*I also got this error when I ran w/ python 2:


python2 $FREESURFER_HOME/bin/asegstats2table --common-segs -t 
aparc.a2009s+aseg.max.table -i aparc.a2009s+aseg.lst -m max

Parsing the .stats files
Traceback (most recent call last):
  File "/usr/local/freesurfer/stable6/bin/asegstats2table", line 548, in 
<module>
    id_name_map, measurelist = parsed.parse(options.meas)
  File "/autofs/cluster/freesurfer/centos7_x86_64/stable6/bin/fsutils.py", line 
115, in parse
    seg = strlst[1] # segmentation id is in the 2nd field
IndexError: list index out of range


________________________________
From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Makaretz, Sara Johanna 
<smakar...@mgh.harvard.edu>
Sent: Tuesday, February 13, 2018 10:12:07 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] IndexError: list index out of range


Hi Doug,


I am also getting the error "IndexError: list index out of range" - I got the 
same error using FS6.0/FS5.3/dev. This is what I'm running for asegstats2table:


asegstats2table --common-segs -t aparc.a2009s+aseg.max.table -i 
aparc.a2009s+aseg.lst -m max

Parsing the .stats files
Traceback (most recent call last):
  File "/usr/local/freesurfer/stable6/bin/asegstats2table", line 548, in 
<module>
    id_name_map, measurelist = parsed.parse(options.meas)
  File "/autofs/cluster/freesurfer/centos7_x86_64/stable6/bin/fsutils.py", line 
115, in parse
    seg = strlst[1] # segmentation id is in the 2nd field
IndexError: list index out of range

This is what I ran to make my stats files, which look fine:
mri_label2vol --seg aparc.a2009s+aseg.nii --temp pet.nii --o 
ns_aparc.a2009s+aseg.nii --reg anat2pet.lta
mri_segstats --seg ns_aparc.a2009s+aseg.nii --i pet.nii --sum 
aparc.a2009s+aseg.stats


Do you have any tips on getting this working?


Thanks in advance for any help!

Sara

________________________________
From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Maksimovskiy, Arkadiy 
<amaksimovs...@mclean.harvard.edu>
Sent: Monday, January 8, 2018 11:50:42 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] IndexError: list index out of range


Hi Doug,



I sent you the tar files, but just wanted to update you that I tried running 
this with just one subjects and am still getting an error but a different one. 
The two inputs and output errors in the terminal are pasted below:



[arkadiysimac:Freesurfer/Freesurfer_Files_with_Freesurfer_Masks/Post_Manual_Edits]
 amaksimovskiy% asegstats2table --subjects SILVA030  --meas volume --stats 
aseg.stats --tablefile Subcortical_GM_Volume1.Dec17.txt

SUBJECTS_DIR : 
/Volumes/silverilab/Arkadiy/Freesurfer/Freesurfer_Files_with_Freesurfer_Masks/Post_Manual_Edits

Parsing the .stats files

Traceback (most recent call last):

  File "/Applications/freesurfer/bin/asegstats2table", line 548, in <module>

    id_name_map, measurelist = parsed.parse(options.meas)

  File "/Applications/freesurfer/bin/fsutils.py", line 115, in parse

    seg = strlst[1] # segmentation id is in the 2nd field

IndexError: list index out of range

[arkadiysimac:Freesurfer/Freesurfer_Files_with_Freesurfer_Masks/Post_Manual_Edits]
 amaksimovskiy% asegstats2table --subjects SILVA040  --meas volume --stats 
aseg.stats --tablefile Subcortical_GM_Volume1.Dec17.txt

SUBJECTS_DIR : 
/Volumes/silverilab/Arkadiy/Freesurfer/Freesurfer_Files_with_Freesurfer_Masks/Post_Manual_Edits

Parsing the .stats files

Traceback (most recent call last):

  File "/Applications/freesurfer/bin/asegstats2table", line 548, in <module>

    id_name_map, measurelist = parsed.parse(options.meas)

  File "/Applications/freesurfer/bin/fsutils.py", line 122, in parse

    self.measurelist.append( float(strlst[self.measure_column_map[measure]] ))

ValueError: could not convert string to float: Left-Cerebellum-Cortex





Let me know if any further info is needed to troubleshoot. Thank you for 
helping with this.

-arkadiy



--

Arkadiy L. Maksimovskiy, Ph.D.

Postdoctoral Research Fellow
McLean Imaging Center, McLean Hospital
Department of Psychiatry, Harvard Medical School

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to