Thanks for the suggestion Josh! I have definitely thought about this, but since I'm a total novice bash programmer, I thought that it would be quicker to learn which option to add to asegstats2table and aparcstats2table. I would really appreciate it if you could help me come up with this code? What shell function could I use to open each .stats file? How do I use grep to call, say line 53 in the stats file?
Many thanks, Vy On Thu, May 17, 2012 at 4:19 PM, Joshua Lee <jki...@ucdavis.edu> wrote: > Why not use a bash or csh script that loops through your subjects stat > files, and use grep read the appropriate lines to a single text file > with >>. > > - > Josh > > > On Thu, May 17, 2012 at 1:04 PM, Vy Dinh <vy_d...@rush.edu> wrote: > > Dear Freesurfer Experts, > > > > I've created a couple of ROIs from qdec comparisons of thickness and > volume > > between two groups. We extracted the data from these ROIs for each > subject > > using mris_anatomical_stats. > > > > The stat files are located within each subjects folder: > > sub/stats/rh.roi.stats > > > > Now, we would like to combine the data from each stat file to a text file > > using aparcstats2table and asegstats2table (for volume measures). I > already > > have batch scripts that call these functions for multiple subjects. The > > script basically concatenates all of the subject ids and inputs the > > concatenated string into the aparcstats2table (or asegstats2table) > command. > > > > EX: > > asegstats2table -s s1 -s s2 -s s3 -s s4 --hemi lh --meas volume > -tablefile > > test_stats.txt > > > > I would like to modify my script so that I can extract the data from the > > roi.stats file. This is only a matter of entering the correct inputs for > > aparcstats2table and asegstats2table but I have tried with little > success. > > The problems with each command are explained below. > > > > For asegstats2table: > > According to documentation > > (http://surfer.nmr.mgh.harvard.edu/fswiki/asegstats2table), I have tried > > running "asegstats2table $STRING --meas volume --skip --tablefile > > $OUTFILE " where string is "-i s1/stats/lh.roi.stats -i > > s2/stats/lh.roi.stats ......etc" but get the error message: > > > > Building the table.. > > Traceback (most recent call last): > > File > > > "/Users/skip/Desktop/harlow_mount/apps/fmri_progs/freesurfer_v51/freesurfer/bin/asegstats2table", > > line 513, in <module> > > rows, columns, table = sanitize_table(options, pretable) > > File > > > "/Users/skip/Desktop/harlow_mount/apps/fmri_progs/freesurfer_v51/freesurfer/bin/asegstats2table", > > line 412, in sanitize_table > > _specs, _id_name_map, _measl = _t[0] > > IndexError: list index out of range > > > > > > For aparcstats2table: > > when I run the command: > > > > aparcstats2table $STRING --hemi lh --parc roi_name --skip --tablefile > > $OUTFILE > > > > where string is "-s s1 -s s2 -s s3 ", I get a text file with 3 columns. > The > > first column lists the subject ids, but what are the values for the 2nd > and > > 3rd columns? Also, is it possible to input more than 2 .stats file for > the > > command? > > > > > > Looking forward to your responses, > > > > > > Vy > > > > > > Vy T.U. Dinh > > Neurological Sciences > > Rush University Medical Center > > Phone: (312) 563-3853 > > Fax: (312) 563-4660 > > Email: vy_d...@rush.edu > > > > > > _______________________________________________ > > 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. > > >
_______________________________________________ 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.