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
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
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 mailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu mailto: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 mailto:freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] LGI label statistics
External Email - Use CautionDear 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 mailto:Freesurfer@nmr.mgh.harvard.edu https://secure-web.cisco.com/19hNQSGxFV-Bh6uGRZWlW1nPiQced3qZ5h0iZ7kZcoQ-iEG... https://secure-web.cisco.com/19hNQSGxFV-Bh6uGRZWlW1nPiQced3qZ5h0iZ7kZcoQ-iEGcxMrywGjT39Iy3Gf9hbDI_9t1bCdezJVIIxMeAWUZ6y_2Sdi7V10S4hBUTIHDzXcb7dfM7CjRwnKmMrnF6yi1TEWh2X_h0_QPXSDvuQ0o7VO8ZXUT3OH6YJbKmKP8Ykx47ARuxd1jWy_LRSUWgmTCUlQObxsztUcmq2od5p6yH6klNcJgTH8QYvq_kqjLSvHTV6ExjJtBP5h3El8CSw9Y0TBbAP8EFXZge7LqEo3uNejdpxJgu5_3GwMv5wphV1BT5tluL18y2QgIxCn-PZI1ouTju4ah7ZLlftybIyA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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 https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqV... https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline<https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqV... https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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.
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.EDUmailto: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.edumailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edumailto: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.edumailto: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.edumailto: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/freesurferhttps://secure-web.cisco.com/19hNQSGxFV-Bh6uGRZWlW1nPiQced3qZ5h0iZ7kZcoQ-iEGcxMrywGjT39Iy3Gf9hbDI_9t1bCdezJVIIxMeAWUZ6y_2Sdi7V10S4hBUTIHDzXcb7dfM7CjRwnKmMrnF6yi1TEWh2X_h0_QPXSDvuQ0o7VO8ZXUT3OH6YJbKmKP8Ykx47ARuxd1jWy_LRSUWgmTCUlQObxsztUcmq2od5p6yH6klNcJgTH8QYvq_kqjLSvHTV6ExjJtBP5h3El8CSw9Y0TBbAP8EFXZge7LqEo3uNejdpxJgu5_3GwMv5wphV1BT5tluL18y2QgIxCn-PZI1ouTju4ah7ZLlftybIyA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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/compliancelinehttps://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline<MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/compliancelinehttps://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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.
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.edumailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edumailto: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.edumailto: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.EDUmailto: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.edumailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edumailto: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.edumailto: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.edumailto: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/freesurferhttps://secure-web.cisco.com/19hNQSGxFV-Bh6uGRZWlW1nPiQced3qZ5h0iZ7kZcoQ-iEGcxMrywGjT39Iy3Gf9hbDI_9t1bCdezJVIIxMeAWUZ6y_2Sdi7V10S4hBUTIHDzXcb7dfM7CjRwnKmMrnF6yi1TEWh2X_h0_QPXSDvuQ0o7VO8ZXUT3OH6YJbKmKP8Ykx47ARuxd1jWy_LRSUWgmTCUlQObxsztUcmq2od5p6yH6klNcJgTH8QYvq_kqjLSvHTV6ExjJtBP5h3El8CSw9Y0TBbAP8EFXZge7LqEo3uNejdpxJgu5_3GwMv5wphV1BT5tluL18y2QgIxCn-PZI1ouTju4ah7ZLlftybIyA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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/compliancelinehttps://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline<MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/compliancelinehttps://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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.
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
- remove the commented out line # first to verify echo printout
- 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 mailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu mailto: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 mailto:freesurfer@nmr.mgh.harvard.edu> Subject: Re: [Freesurfer] LGI label statistics
External Email - Use CautionHi 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 mailto: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 mailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu mailto: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 mailto:freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] LGI label statistics
External Email - Use CautionDear 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 mailto: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 https://secure-web.cisco.com/19hNQSGxFV-Bh6uGRZWlW1nPiQced3qZ5h0iZ7kZcoQ-iEGcxMrywGjT39Iy3Gf9hbDI_9t1bCdezJVIIxMeAWUZ6y_2Sdi7V10S4hBUTIHDzXcb7dfM7CjRwnKmMrnF6yi1TEWh2X_h0_QPXSDvuQ0o7VO8ZXUT3OH6YJbKmKP8Ykx47ARuxd1jWy_LRSUWgmTCUlQObxsztUcmq2od5p6yH6klNcJgTH8QYvq_kqjLSvHTV6ExjJtBP5h3El8CSw9Y0TBbAP8EFXZge7LqEo3uNejdpxJgu5_3GwMv5wphV1BT5tluL18y2QgIxCn-PZI1ouTju4ah7ZLlftybIyA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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://secure-web.cisco.com/1HgSjJMqoIVSffnhzjYqNhSwyiTflzMXKYm4MyelxAA51tU... https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline<MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/1HgSjJMqoIVSffnhzjYqNhSwyiTflzMXKYm4MyelxAA51tU... https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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 https://secure-web.cisco.com/1jHGyLeYHxUXZeVbW8FrHl3_ItvMq0TBFK0i1mR5Iyvl54B... 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 https://secure-web.cisco.com/1HgSjJMqoIVSffnhzjYqNhSwyiTflzMXKYm4MyelxAA51tU... https://secure-web.cisco.com/1HgSjJMqoIVSffnhzjYqNhSwyiTflzMXKYm4MyelxAA51tUVtuITDpJcPfHQmC-b0QPVNEbPXkHkFOhkHwg7iw7Ek3FPb7ZpcCWVGPfFV5iXw5sRKsRMOASQ5CwhED_T4QHtrGXQXA92tWLfbDang2T1mcNFSZLpVu7HvfqjgfXQrr0fAo1l_y8SDzgd7ILSNKqacl6r8VqPD6OHB3AY5paXED-9U3OXTPTN0LQitkOcoHXJb2v-6cyUUCag16wRpYS6LQfULLKEfUBLzEOFqSVRnUx8TANPfUQzkPubqa-wR7AtRpySEzKBf90H8xh5M/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline . 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.
Yes, replace A152 in your example with $subj. I’m assuming there are label/rh.c1.label and surf/rh.pial_lgi in each individual subjects.
Not sure I understand your second question.
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:57 AM To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] LGI label statistics
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.EDUmailto: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.edumailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edumailto: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.edumailto: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.edumailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edumailto: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.edumailto: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.EDUmailto: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.edumailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edumailto: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.edumailto: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.edumailto: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/freesurferhttps://secure-web.cisco.com/19hNQSGxFV-Bh6uGRZWlW1nPiQced3qZ5h0iZ7kZcoQ-iEGcxMrywGjT39Iy3Gf9hbDI_9t1bCdezJVIIxMeAWUZ6y_2Sdi7V10S4hBUTIHDzXcb7dfM7CjRwnKmMrnF6yi1TEWh2X_h0_QPXSDvuQ0o7VO8ZXUT3OH6YJbKmKP8Ykx47ARuxd1jWy_LRSUWgmTCUlQObxsztUcmq2od5p6yH6klNcJgTH8QYvq_kqjLSvHTV6ExjJtBP5h3El8CSw9Y0TBbAP8EFXZge7LqEo3uNejdpxJgu5_3GwMv5wphV1BT5tluL18y2QgIxCn-PZI1ouTju4ah7ZLlftybIyA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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/compliancelinehttps://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline<MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/compliancelinehttps://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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.edumailto: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/freesurferhttps://secure-web.cisco.com/1jHGyLeYHxUXZeVbW8FrHl3_ItvMq0TBFK0i1mR5Iyvl54BO6rIrmO087FmcfJWk5ahutIdlutDdS4B2deKo6i5yNyL_iOho2qMMqAk8K-FO6fEQawYy1Q4ULdl-8PdwMNiaPVVFTzKT2P9OX20N9nZU5dn011Q7iANCMinyks-sPYuXVciXmw-p_2gvYW75VneBI5rMXfsqaRr9BxjNmws9WuVIe73GTf4qWjsaIdejNY-MMEGrD82VjB3GNFdnpNhSrl6Mt57xhiF1aEshaUbofnZj9oknh1jpEvXXftZs-rw5l6tjmenYtK7kN5GP6/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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/compliancelinehttps://secure-web.cisco.com/1HgSjJMqoIVSffnhzjYqNhSwyiTflzMXKYm4MyelxAA51tUVtuITDpJcPfHQmC-b0QPVNEbPXkHkFOhkHwg7iw7Ek3FPb7ZpcCWVGPfFV5iXw5sRKsRMOASQ5CwhED_T4QHtrGXQXA92tWLfbDang2T1mcNFSZLpVu7HvfqjgfXQrr0fAo1l_y8SDzgd7ILSNKqacl6r8VqPD6OHB3AY5paXED-9U3OXTPTN0LQitkOcoHXJb2v-6cyUUCag16wRpYS6LQfULLKEfUBLzEOFqSVRnUx8TANPfUQzkPubqa-wR7AtRpySEzKBf90H8xh5M/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline <MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://www.massgeneralbrigham.org/compliancelinehttps://secure-web.cisco.com/1HgSjJMqoIVSffnhzjYqNhSwyiTflzMXKYm4MyelxAA51tUVtuITDpJcPfHQmC-b0QPVNEbPXkHkFOhkHwg7iw7Ek3FPb7ZpcCWVGPfFV5iXw5sRKsRMOASQ5CwhED_T4QHtrGXQXA92tWLfbDang2T1mcNFSZLpVu7HvfqjgfXQrr0fAo1l_y8SDzgd7ILSNKqacl6r8VqPD6OHB3AY5paXED-9U3OXTPTN0LQitkOcoHXJb2v-6cyUUCag16wRpYS6LQfULLKEfUBLzEOFqSVRnUx8TANPfUQzkPubqa-wR7AtRpySEzKBf90H8xh5M/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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.
External Email - Use Caution
Perfect that has worked.
Thank you so much for your help!
Have a great weekend, Luke
On 2 Dec 2022, at 16:57, Luke K Harper l.harper@doctors.org.uk wrote:
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 mailto: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
- remove the commented out line # first to verify echo printout
- add back the line w/o the # sign
From: freesurfer-bounces@nmr.mgh.harvard.edu mailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu mailto: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 mailto: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 mailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu mailto: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 mailto:freesurfer@nmr.mgh.harvard.edu> Subject: Re: [Freesurfer] LGI label statistics
External Email - Use CautionHi 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 mailto: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 mailto:freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu mailto: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 mailto:freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] LGI label statistics
External Email - Use CautionDear 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 mailto: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 https://secure-web.cisco.com/19hNQSGxFV-Bh6uGRZWlW1nPiQced3qZ5h0iZ7kZcoQ-iEGcxMrywGjT39Iy3Gf9hbDI_9t1bCdezJVIIxMeAWUZ6y_2Sdi7V10S4hBUTIHDzXcb7dfM7CjRwnKmMrnF6yi1TEWh2X_h0_QPXSDvuQ0o7VO8ZXUT3OH6YJbKmKP8Ykx47ARuxd1jWy_LRSUWgmTCUlQObxsztUcmq2od5p6yH6klNcJgTH8QYvq_kqjLSvHTV6ExjJtBP5h3El8CSw9Y0TBbAP8EFXZge7LqEo3uNejdpxJgu5_3GwMv5wphV1BT5tluL18y2QgIxCn-PZI1ouTju4ah7ZLlftybIyA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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://secure-web.cisco.com/15As9HtuhJjN7e3wtp8orB3ufbJIQ60WoItXhQmRE2RocOS... https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline<MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/15As9HtuhJjN7e3wtp8orB3ufbJIQ60WoItXhQmRE2RocOS... https://secure-web.cisco.com/1dN6OqH6xTffwSzbdIQPvUsQdhVlQcBukN9g4xg-D0MuHqVon1A35tmB0wXBWS-JF-DWpJvO6DChno4TWSLZIF2-_fZpBKBKT2tKuZ7d2ksMqVN1aaIVLSwleqn-8W--7CfD2gHLWrCSw15KRu0ltnJKup_Bdqitn0SyiluYGkVkKnwQ6MsckOGXskoKW_X7PSQDPrjVbT0wrGM0Gjf4B5IsqJ7UknoNAlc_PsKwJOlA2Abu2Xg1rkcqvii1bW4BuGUPFJqXUabiegNBMtWOphzluXdfwXRRe9Nco-wvYrVVT6KHfIh5eyro2M0KbHtxCpexNyNtNIk63ErRj9MfH9w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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 mailto:Freesurfer@nmr.mgh.harvard.edu https://secure-web.cisco.com/1PowQSzzLx1N3d25KWGDmXmpiSP5mPqr9aY29mo4WLxB7Vy... https://secure-web.cisco.com/1PowQSzzLx1N3d25KWGDmXmpiSP5mPqr9aY29mo4WLxB7Vy7necsLP89wGm39BAuMdAmrlPZ0mFZe3VwwuOxsvHhQn3oAuPoyD6XD0v1q_nSm0tLwRMVlYrM2O-q38_dJ62cEeVC1rEayhJqOHU8sDI7l2nE7JlbeugD8wzNsuHouFEWBPfN-1FLzylU50p6QUtqrtQFS3RSgSc8JtdIWFtbAxmXku7hEeoK8uC1rotOg5jrwXetLgo7AsH7D9wDSUGxY069npbBb8BO1rw9KCLO9pw8ibb7GhjaEDP8hcaM-BjLsTpi1dcNmHRk2BAiFBHIp9NHq1wGu6hHc6wZlIg/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer 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 https://secure-web.cisco.com/15As9HtuhJjN7e3wtp8orB3ufbJIQ60WoItXhQmRE2RocOS... https://secure-web.cisco.com/15As9HtuhJjN7e3wtp8orB3ufbJIQ60WoItXhQmRE2RocOSKrKJTrB39g9dLURVnJOP6KyPnGazaS8wOME3GXUJZhhnv2XyKqOEBq32fXRohtLl1f6Ly3PwX1EUWAYZgbp_iFVruBuqi9fF01yu20LosmQ8WMSFae0RxJxJaM6LGvHWBG-yvSc5Ym4zxsmmE-uuIjI-SGqychWHzZoqoij5T9jZUqbz3sI7PlTc-V8HxBeE1zDRkmBuLhK4aXJssoS0AuFAMvuoDIqte5GsklN8uB5XGTnGtswWn1o1RTUi0xbV0onkJrsjpFjRnme6D1YUFPH799YQC6D1FScsRfyA/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline <https://secure-web.cisco.com/15As9HtuhJjN7e3wtp8orB3ufbJIQ60WoItXhQmRE2RocOS... https://secure-web.cisco.com/15As9HtuhJjN7e3wtp8orB3ufbJIQ60WoItXhQmRE2RocOSKrKJTrB39g9dLURVnJOP6KyPnGazaS8wOME3GXUJZhhnv2XyKqOEBq32fXRohtLl1f6Ly3PwX1EUWAYZgbp_iFVruBuqi9fF01yu20LosmQ8WMSFae0RxJxJaM6LGvHWBG-yvSc5Ym4zxsmmE-uuIjI-SGqychWHzZoqoij5T9jZUqbz3sI7PlTc-V8HxBeE1zDRkmBuLhK4aXJssoS0AuFAMvuoDIqte5GsklN8uB5XGTnGtswWn1o1RTUi0xbV0onkJrsjpFjRnme6D1YUFPH799YQC6D1FScsRfyA/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . 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@nmr.mgh.harvard.edu