Thanks Doug! I did that and it worked, but now here's another problem: the
values that I obtained for V1, V2, and cortex for each subject are all the
same. For example, BV20 left hemisphere values for V1, V2, and cortex are
all 2.7241 (same thing happens for the right hemisphere). Maybe I can tell
you what I did step by step to see  if you can find where I went wrong.

First, I did a for loop to run mri_segstats for each participant for each
label per hemisphere (here is an example of V1):

foreach s (BV20 BV21 BV22 BV23 BV24 BV25 BV26 BV27 BV28 BV29 BV30 BV31 BV32
BV33 BV34 BV35 BV36 BV37 BV38 BV39 BV40 BV41 BV43 BV44 BV47 MB07 MB08 MB09
MB10 MB11 MB12 MB13 MB14 MB15 MB16 MB17 MB18 MB19 MB20) <<hit enter>>
mri_segstats --label-thresh .5 --slabel $s lh
$SUBJECTS_DIR/$s/label/lh.V1.thresh.label --i
$SUBJECTS_DIR/$s/surf/lh.pial_lgi --sum
$SUBJECTS_DIR/$s/stats/lh.V1.thresh.label.LGI.stats  <<hit enter>>
end <<hit enter>>

for left V2 I ran:

foreach s (BV20 BV21 BV22 BV23 BV24 BV25 BV26 BV27 BV28 BV29 BV30 BV31 BV32
BV33 BV34 BV35 BV36 BV37 BV38 BV39 BV40 BV41 BV43 BV44 BV47 MB07 MB08 MB09
MB10 MB11 MB12 MB13 MB14 MB15 MB16 MB17 MB18 MB19 MB20) <<hit enter>>
mri_segstats --label-thresh .5 --slabel $s lh
$SUBJECTS_DIR/$s/label/lh.V2.thresh.label --i
$SUBJECTS_DIR/$s/surf/lh.pial_lgi --sum
$SUBJECTS_DIR/$s/stats/lh.V2.thresh.label.LGI.stats  <<hit enter>>
end <<hit enter>>

and for left cortex I ran:
foreach s (BV20 BV21 BV22 BV23 BV24 BV25 BV26 BV27 BV28 BV29 BV30 BV31 BV32
BV33 BV34 BV35 BV36 BV37 BV38 BV39 BV40 BV41 BV43 BV44 BV47 MB07 MB08 MB09
MB10 MB11 MB12 MB13 MB14 MB15 MB16 MB17 MB18 MB19 MB20) <<hit enter>>
mri_segstats --label-thresh .5 --slabel $s lh
$SUBJECTS_DIR/$s/label/lh.cortex --i $SUBJECTS_DIR/$s/surf/lh.pial_lgi
--sum $SUBJECTS_DIR/$s/stats/lh.cortex.LGI.stats
end <<hit enter>>


This is where the problem must be occurring since all files created during
these commands show the same files per hemisphere. I've attached three
files created during mri_segstats (left V1, V2, cortex.stats) for one
participant. I've also attached files created during asegstats2table to
show how all values are the same for each label for all participants (V1,
V2, cortex.LGI.txt).

If anyone has any insight into the problem, that would be great!

Best,
Krista


On Wed, Mar 5, 2014 at 1:54 PM, Douglas N Greve
<gr...@nmr.mgh.harvard.edu>wrote:

>
> use asegstats2table (I know, it's confusing:)
> doug
>
>
>
> On 03/05/2014 01:42 PM, krista kelly wrote:
>
>> Hi again,
>>
>> My apologies for the barrage of emails! I was able to do mri_segstats on
>> V1 labels for pial_lgi using the following:
>>
>> mri_segstats --label-thresh .5 --slabel $s lh
>> $SUBJECTS_DIR/$s/label/lh.V1.thresh.label --i
>> $SUBJECTS_DIR/$s/surf/lh.pial_lgi --sum $SUBJECTS_DIR/$s/stats/lh.V1.
>> thresh.label.LGI.stats
>>
>> However, now I'm having trouble with bringing all of the data into one
>> table using aparcstats2table. I found online how to get the data for aparc
>> annotation (https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/
>> 2013-September/033069.html) and tried to adapt to the labels. Here is
>> what I've tried:
>>
>> aparcstats2table --subjects BV20 BV21 BV22 BV23 BV24 BV25 BV26 BV27 BV28
>> BV29 BV30 BV31 BV32 BV33 BV34 BV35 BV36 BV37 BV38 BV39 BV40 BV41 BV43 BV44
>> BV47 MB07 MB08 MB09 MB10 MB11 MB12 MB13 MB14 MB15 MB16 MB17 MB18 --hemi lh
>> --meas thickness --parc V1.thresh.label.LGI --tablefile
>> lh.V1.thresh.label.LGI.txt
>>
>> I get the following output when I do this:
>>
>> SUBJECTS_DIR : /Applications/freesurfer/subjects
>> Parsing the .stats files
>> Traceback (most recent call last):
>>   File "/Applications/freesurfer/bin/aparcstats2table", line 371, in
>> <module>
>>     parc_measure_map = parsed.parse(options.meas)
>>   File "/Applications/freesurfer/bin/fsutils.py", line 207, in parse
>>     val = float(strlist[self.measure_column_map[measure]])
>> ValueError: could not convert string to float: Seg0000
>>
>> I've attached an example of the file created during mri_segstats in case
>> that helps.
>>
>> Thanks!
>> Krista
>>
>>
>> On Wed, Mar 5, 2014 at 1:21 PM, krista kelly 
>> <krista.kell...@gmail.com<mailto:
>> krista.kell...@gmail.com>> wrote:
>>
>>     Perfect, it works thanks!
>>
>>
>>     On Wed, Mar 5, 2014 at 11:35 AM, Douglas N Greve
>>     <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote:
>>
>>         sorry, it is --slabel
>>         btw, there is documentation. If you run it without options it
>>         gives you a list of arguments as well as examples
>>         doug
>>
>>         On 03/05/2014 11:32 AM, krista kelly wrote:
>>
>>             Thanks Doug, but when I try this I get the following
>>             error: Option --label unknown
>>
>>
>>             On Wed, Mar 5, 2014 at 11:21 AM, Douglas N Greve
>>             <gr...@nmr.mgh.harvard.edu
>>             <mailto:gr...@nmr.mgh.harvard.edu>
>>             <mailto:gr...@nmr.mgh.harvard.edu
>>
>>             <mailto:gr...@nmr.mgh.harvard.edu>>> wrote:
>>
>>
>>                 try
>>                 mri_segstats --label-thresh .5 --label BV20 lh
>>             V1.thresh.label --i
>>                 $SUBJECTS_DIR/BV20/surf/lh.pial_lgi --sum
>>             lh.V1.thresh.label.stats
>>
>>                 On 03/05/2014 11:15 AM, krista kelly wrote:
>>                 > Hello,
>>                 >
>>                 > I would like to extract the pial_lgi data from
>>             Freesurfer's
>>                 V1.thresh
>>                 > labels but can't quite figure it out. I've tried
>>             adapting the
>>                 commands
>>                 > from the LGI Freesurfer tutorial as such:
>>                 >
>>                 > mri_segstats --label-thresh BV20 lh V1.thresh.label --i
>>                 > $SUBJECTS_DIR/BV20/surf/lh.pial_lgi --sum
>>             lh.V1.thresh.label.stats
>>                 >
>>                 > I've also tried
>>                 >
>>                 > mris_anatomical_stats -l lh.V1.thresh.label -f
>>                 > BV20/stats/lh.V1.thresh.label.stats BV20 lh pial_lgi
>>                 >
>>                 > but I've had no luck with either.
>>                 >
>>                 > I would appreciate any help!
>>                 >
>>                 > Thanks,
>>                 > Krista
>>                 >
>>                 >
>>                 > _______________________________________________
>>                 > Freesurfer mailing list
>>                 > Freesurfer@nmr.mgh.harvard.edu
>>             <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>                 <mailto:Freesurfer@nmr.mgh.harvard.edu
>>
>>             <mailto:Freesurfer@nmr.mgh.harvard.edu>>
>>
>>                 >
>>             https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>                 --
>>                 Douglas N. Greve, Ph.D.
>>                 MGH-NMR Center
>>             gr...@nmr.mgh.harvard.edu
>>             <mailto:gr...@nmr.mgh.harvard.edu>
>>             <mailto:gr...@nmr.mgh.harvard.edu
>>
>>             <mailto:gr...@nmr.mgh.harvard.edu>>
>>                 Phone Number: 617-724-2358 <tel:617-724-2358>
>>             <tel:617-724-2358 <tel:617-724-2358>>
>>                 Fax: 617-726-7422 <tel:617-726-7422> <tel:617-726-7422
>>
>>             <tel:617-726-7422>>
>>
>>                 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>>             <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>>                 <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>>                 FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>>             www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>>             <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>>                            <http://www.nmr.mgh.harvard.
>> edu/facility/filedrop/index.html>
>>
>>                 Outgoing:
>>             ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/
>> greve/
>>
>>                 _______________________________________________
>>                 Freesurfer mailing list
>>             Freesurfer@nmr.mgh.harvard.edu
>>             <mailto:Freesurfer@nmr.mgh.harvard.edu>
>>             <mailto:Freesurfer@nmr.mgh.harvard.edu
>>
>>             <mailto: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.
>>
>>
>>
>>         --         Douglas N. Greve, Ph.D.
>>         MGH-NMR Center
>>         gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>>         Phone Number: 617-724-2358 <tel:617-724-2358>
>>         Fax: 617-726-7422 <tel:617-726-7422>
>>
>>         Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>>         <http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting>
>>         FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>>         www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>>         Outgoing:
>>         ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>>
>>
>>
>>
> --
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> gr...@nmr.mgh.harvard.edu
> Phone Number: 617-724-2358
> Fax: 617-726-7422
>
> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
> www.nmr.mgh.harvard.edu/facility/filedrop/index.html
> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>
>
Measure:mean    Seg0000
0       2.7241
1       2.848
2       2.6973
3       2.9216
4       3.0258
5       2.8606
6       2.9551
7       2.9481
8       2.7841
9       2.9659
10      2.818
11      3.0274
12      2.848
13      2.9511
14      2.9606
15      2.7832
16      3.0406
17      2.8928
18      2.67
19      3.1675
20      2.9009
21      3.0137
22      2.863
23      2.9074
24      2.9299
25      2.9049
26      2.9549
27      3.2677
28      2.9805
29      3.3029
30      2.9966
31      2.8433
32      3.1578
33      2.8357
34      2.8416
35      3.1281
36      3.0077

Attachment: lh.cortex.LGI.stats
Description: Binary data

Attachment: lh.V1.thresh.label.LGI.stats
Description: Binary data

Attachment: lh.V2.thresh.label.LGI.stats
Description: Binary data

Measure:mean    Seg0000
0       2.7241
1       2.848
2       2.6973
3       2.9216
4       3.0258
5       2.8606
6       2.9551
7       2.9481
8       2.7841
9       2.9659
10      2.818
11      3.0274
12      2.848
13      2.9511
14      2.9606
15      2.7832
16      3.0406
17      2.8928
18      2.67
19      3.1675
20      2.9009
21      3.0137
22      2.863
23      2.9074
24      2.9299
25      2.9049
26      2.9549
27      3.2677
28      2.9805
29      3.3029
30      2.9966
31      2.8433
32      3.1578
33      2.8357
34      2.8416
35      3.1281
36      3.0077
Measure:mean    Seg0000
0       2.7241
1       2.848
2       2.6973
3       2.9216
4       3.0258
5       2.8606
6       2.9551
7       2.9481
8       2.7841
9       2.9659
10      2.818
11      3.0274
12      2.848
13      2.9511
14      2.9606
15      2.7832
16      3.0406
17      2.8928
18      2.67
19      3.1675
20      2.9009
21      3.0137
22      2.863
23      2.9074
24      2.9299
25      2.9049
26      2.9549
27      3.2677
28      2.9805
29      3.3029
30      2.9966
31      2.8433
32      3.1578
33      2.8357
34      2.8416
35      3.1281
36      3.0077
_______________________________________________
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