External Email - Use Caution        

Thanks! 

As the subject ID in my example is A152 should this be replaced by $subj in the label section too?  Each individual has a label created via label2label from a label on fsaverage or does this not matter?

Best,
Luke

On 2 Dec 2022, at 16:46, Huang, Yujing <YHUANG43@MGH.HARVARD.EDU> wrote:

Sorry, ‘Done’ should be in all lower case.
 
for subj in `ls -1`
do
echo "mri_segstats --slabel A152 rh $SUBJECTS_DIR/$subj/label/rh.c1.label --i $SUBJECTS_DIR/$subj/surf/rh.pial_lgi --sum $SUBJECTS_DIR/$subj/stats/rh.c1.pial_lgi.stats"
#mri_segstats --slabel A152 rh $SUBJECTS_DIR/$subj/label/rh.c1.label --i $SUBJECTS_DIR/$subj/surf/rh.pial_lgi --sum $SUBJECTS_DIR/$subj/stats/rh.c1.pial_lgi.stats
done
 
1. remove the commented out line # first to verify echo printout
2. add back the line w/o the # sign
 
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Huang, Yujing
Sent: Friday, December 2, 2022 10:34 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] LGI label statistics
 
Hi Luke,
 
I don’t know any bash script available to perform the batch job.
 
You can enter it in a for loop at prompt. From your $SUBJECTS_DIR,
 
for subj in `ls -1`
do
echo "mri_segstats --slabel A152 rh $SUBJECTS_DIR/$subj/label/rh.c1.label --i $SUBJECTS_DIR/$subj/surf/rh.pial_lgi --sum $SUBJECTS_DIR/$subj/stats/rh.c1.pial_lgi.stats"
#mri_segstats --slabel A152 rh $SUBJECTS_DIR/$subj/label/rh.c1.label --i $SUBJECTS_DIR/$subj/surf/rh.pial_lgi --sum $SUBJECTS_DIR/$subj/stats/rh.c1.pial_lgi.stats
Done
 
I commented out the command submitting mri_segstat. I always verify the printout from the echo first before submitting the jobs.
 
Hope this helps.
 
Best,
 
Yujing
 
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Luke K Harper
Sent: Friday, December 2, 2022 10:08 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] LGI label statistics
 

        External Email - Use Caution        

Hi Yujing
 
Ah great, Thank you so much for your help! That was the answer. I have been able to extract the stats now using the following script:
 
mri_segstats --slabel A152 rh $SUBJECTS_DIR/A152/label/rh.c1.label --i $SUBJECTS_DIR/A152/surf/rh.pial_lgi --sum $SUBJECTS_DIR/A152/stats/rh.c1.pial_lgi.stats
 
I have 186 individuals and have been trying to extract each individuals statistics individually, do you know if there is a bash shell script available to perform this process on all individuals in my study at once?
 
Best,
Luke
 

 

On 2 Dec 2022, at 15:28, Huang, Yujing <YHUANG43@MGH.HARVARD.EDU> wrote:
 
Hi Luke,
 
Can you try to pass the full path to your label file?  Instead of ‘rh.c1.label’, pass ‘/Users/lu8342ha/Desktop/subjects/A152/label/rh.c1.label’ to mri_segstats.
 
I think that should work.
 
Best,
 
Yujing
 
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Luke K Harper
Sent: Friday, December 2, 2022 5:14 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] LGI label statistics
 
        External Email - Use Caution        
Dear freesurfer,
 
I am attempting to extract LGI statistical data from a label running the mri_segstats command
 
Here is the script I am attempting to run:
 
mri_segstats --slabel A152 rh rh.c1.label --i $SUBJECTS_DIR/A152/surf/rh.pial_lgi --sum rh.aparc.pial_lgi.stats
 
This returns an error: error: mri_segstats: could not open label file rh.c1.label
 
I created the label using freeview - make closed path - then filling the closed path. The label projects on pial and inflated surfaces
Furthermore the label is able to be identified and used in the following command
 
mris_anatomical_stats \
-l /Users/lu8342ha/Desktop/subjects/A152/label/rh.c1.label \
-f /Users/lu8342ha/Desktop/subjects/A152/stats/rh.c1.stats \
A152 \
rh
 
Please could you advise me on where I am going wrong here?
 
Many thanks,
 
Luke
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to behttps://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 Mass General Brigham Compliance HelpLine at 
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline<MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 
 
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be 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 Mass General Brigham Compliance HelpLine at MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline <MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.