[Freesurfer] QDEC table loading errors
Hello- I'm having a resurgence of an old problem (http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg12152.html) but the old solution is not cutting it. When I try to load a table in QDEC 1.4, I get the following error: Loading data table qdec.table.dat... ERROR: QdecDataTable::Load did not find a column named 'fsid', 'ID', or 'Subject' in the first column of qdec.table.dat! Error loading the data table. However, the file definitely does have 'fsid' as the first column. head qdec.table.dat | awk '{print $1, $2, $3}' fsid Sex AgeGrp 14080 Female Oldr 14081 Female Oldr 14286 Female Oldr 14287 Female Oldr 14390 Female Oldr 14391 Male Oldr 14392 Male Oldr 14428 Female Oldr 14430 Male Oldr Creating the file on Windows, Mac, and Unix platforms using a variety of programs (kate, oocalc, text wrangler, excel, word, notepad, etc) with 'fsid', 'ID', or 'Subject' as the column title doesn't help, nor does running dos2unix on the file(s). Having tab delimited or space delimited files doesn't make any difference, either. Trying to open the tables with QDEC in Unix (RedHat) or Mac (10.6.4) doesn't change the outcome. Any ideas on how to solve this riddle? Thanks, Jim -- Jim Porter, M.A. Graduate Student Clinical Science and Psychopathology Research University of Minnesota ___ 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.
Re: [Freesurfer] QDEC table loading errors
Of course, once I ask for help I stumble immediately upon the solution. There appears to be a limit to the number of columns that QDEC is willing to put up with when reading in tables. If I create a table that only has the few columns that I'm interested in (as opposed to the kitchen sink spreadsheet I was working with), then it reads in without error. Thanks for the help by proxy! Jim On 9/22/10 10:38 AM, Nick Schmansky wrote: can you send me the file? n. On Wed, 2010-09-22 at 10:28 -0500, James Porter wrote: Hello- I'm having a resurgence of an old problem (http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg12152.html) but the old solution is not cutting it. When I try to load a table in QDEC 1.4, I get the following error: Loading data table qdec.table.dat... ERROR: QdecDataTable::Load did not find a column named 'fsid', 'ID', or 'Subject' in the first column of qdec.table.dat! Error loading the data table. However, the file definitely does have 'fsid' as the first column. head qdec.table.dat | awk '{print $1, $2, $3}' fsid Sex AgeGrp 14080 Female Oldr 14081 Female Oldr 14286 Female Oldr 14287 Female Oldr 14390 Female Oldr 14391 Male Oldr 14392 Male Oldr 14428 Female Oldr 14430 Male Oldr Creating the file on Windows, Mac, and Unix platforms using a variety of programs (kate, oocalc, text wrangler, excel, word, notepad, etc) with 'fsid', 'ID', or 'Subject' as the column title doesn't help, nor does running dos2unix on the file(s). Having tab delimited or space delimited files doesn't make any difference, either. Trying to open the tables with QDEC in Unix (RedHat) or Mac (10.6.4) doesn't change the outcome. Any ideas on how to solve this riddle? Thanks, Jim -- Jim Porter, M.A. Graduate Student Clinical Science and Psychopathology Research University of Minnesota ___ 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.
[Freesurfer] FDR Calculations
Hello- Does the built-in FDR function in tksurfer and QDEC run the calculations upon the actual values in the .mgh files, or does it take the exponent of those -log10(p) values first? -- Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota ___ 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.
Re: [Freesurfer] question about clustering simulation
Is there an updated version of mri_mcsim available? When I try to run it, all I get back are error messages that none of the option flags are valid (e.g., ERROR: Option --base unknown). Thanks, Jim Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota On 7/22/64 1:59 PM, James Porter wrote: Hello Doug- When using mri_mcsim, is there an option to reduce the iterations of fwhm values? I'd like to create a database of sims within an in-house average subject as well as within different labels, but I have no need for 30 fwhm values. If I could restrict it to just a few choice values, that would be great. Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota On 7/22/64 1:59 PM, Douglas N Greve wrote: use the value in the fwhm.dat. I would always round up to be safe. doug Michael Waskom wrote: Hi Doug, This looks very helpful! Should we use the fwhm size corresponding to the argument of the --fwhm flag when recon-all runs mri_surf2surf (for anatomical stats), or round the measure found in the fwhm.dat of the glmfit dir? Thanks, Mike -- Forwarded message -- From: Douglas N Greve gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu To: port...@umn.edu mailto:port...@umn.edu Date: Tue, 27 Apr 2010 11:17:24 -0400 Subject: Re: [Freesurfer] question about clustering simulation Yea, that was a bug in the simulation program I used. I did confirm that the simulations were done on the correct hemisphere. Feel free to edit the files. I'll fix the master when I get a chance. doug James Porter wrote: Doug- Let me be the first to say thank you for saving me massive amounts of simulation time. One bug though: the right hemisphere files say they were created using the left hemisphere, and mri_surfcluster rejects them. Would it be verboten to just alter the csd files, or do you have versions that were created off of fsaverage's right hemisphere? matacao:mult-comp-cor porterj$ head fsaverage/rh/cortex/fwhm19/abs/th33/mc-z.csd # simtype null-z # anattype surface fsaverage lh # FixGroupSubjectArea 1 # merged 0 # contrastNA # seed1271355821 # thresh 3.30 # threshsign 0.00 # searchspace 74490.928733 # nullfwhm19.00 Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota On 7/22/64 1:59 PM, Douglas N Greve wrote: 1. Correct on both counts. When I wrote the simulation, I was only trying to replicate the random fields analysis. But with a simulation, you have more freedom that I am not yet exploiting. 2. This is what we are already doing with mc-z 3. I'm working on this as well. It turns out that the random fields approximation works a lot better when using the number of vertices. Also, I've run mc-z simulations under a bunch of thresholding and FWHM conditions for whole-hemisphere cortex labels. These will be integrated in new version of FS, but I've put them here ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mult-comp-cor.tar.gz as well. There's a README file in there. This will make running your own time-consuming simulations unnecessary (when using the cortex mask at least). doug Anthony Dick wrote: Hello all, I am interested in using the mri_glmfit simulation to control for multiple comparisons in data I have run on the surface in AFNI. Before doing this, I have a few questions: 1. What does the simulation with the mc-z flag do, exactly? It claims to be comparable to AFNI's AlphaSim, but it takes a maximum cluster area for each iteration, which is not exactly what AlphaSim does. Here is my guess: Given a surface, a given smoothness of the data, and a given per-vertex threshold, for each iteration the simulation populates that surface with random data taken from a normal distribution, thresholds the data, and applies the smoothness of the actual data (supplied as an input parameter). It then computes the maximum cluster size in area for that image. Doing this n iterations gives a distribution of maximum cluster sizes that occur for random data of a given smoothness, and taking cluster sizes above a certain percentile rank controls for the FWE at a level equal to that percentile rank (e.g., 95th% controls for FWE = .05). AlphaSim does something similar, although instead of taking maximum cluster sizes
[Freesurfer] ASCII to MGH
Hello- I know how to use mri_convert and mris_convert to obtain ascii files of thickness values that I can read into stats software, but I'm having trouble going the other direction. Is there a good way to convert ascii lists of vertex values into mgh files so I can view them as overlays or utilize commands like mri_surfcluster? Thanks, Jim -- Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota ___ 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.
Re: [Freesurfer] question about clustering simulation
Hello Doug- When using mri_mcsim, is there an option to reduce the iterations of fwhm values? I'd like to create a database of sims within an in-house average subject as well as within different labels, but I have no need for 30 fwhm values. If I could restrict it to just a few choice values, that would be great. Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota On 7/22/64 1:59 PM, Douglas N Greve wrote: use the value in the fwhm.dat. I would always round up to be safe. doug Michael Waskom wrote: Hi Doug, This looks very helpful! Should we use the fwhm size corresponding to the argument of the --fwhm flag when recon-all runs mri_surf2surf (for anatomical stats), or round the measure found in the fwhm.dat of the glmfit dir? Thanks, Mike -- Forwarded message -- From: Douglas N Greve gr...@nmr.mgh.harvard.edu mailto:gr...@nmr.mgh.harvard.edu To: port...@umn.edu mailto:port...@umn.edu Date: Tue, 27 Apr 2010 11:17:24 -0400 Subject: Re: [Freesurfer] question about clustering simulation Yea, that was a bug in the simulation program I used. I did confirm that the simulations were done on the correct hemisphere. Feel free to edit the files. I'll fix the master when I get a chance. doug James Porter wrote: Doug- Let me be the first to say thank you for saving me massive amounts of simulation time. One bug though: the right hemisphere files say they were created using the left hemisphere, and mri_surfcluster rejects them. Would it be verboten to just alter the csd files, or do you have versions that were created off of fsaverage's right hemisphere? matacao:mult-comp-cor porterj$ head fsaverage/rh/cortex/fwhm19/abs/th33/mc-z.csd # simtype null-z # anattype surface fsaverage lh # FixGroupSubjectArea 1 # merged 0 # contrastNA # seed1271355821 # thresh 3.30 # threshsign 0.00 # searchspace 74490.928733 # nullfwhm19.00 Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota On 7/22/64 1:59 PM, Douglas N Greve wrote: 1. Correct on both counts. When I wrote the simulation, I was only trying to replicate the random fields analysis. But with a simulation, you have more freedom that I am not yet exploiting. 2. This is what we are already doing with mc-z 3. I'm working on this as well. It turns out that the random fields approximation works a lot better when using the number of vertices. Also, I've run mc-z simulations under a bunch of thresholding and FWHM conditions for whole-hemisphere cortex labels. These will be integrated in new version of FS, but I've put them here ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mult-comp-cor.tar.gz as well. There's a README file in there. This will make running your own time-consuming simulations unnecessary (when using the cortex mask at least). doug Anthony Dick wrote: Hello all, I am interested in using the mri_glmfit simulation to control for multiple comparisons in data I have run on the surface in AFNI. Before doing this, I have a few questions: 1. What does the simulation with the mc-z flag do, exactly? It claims to be comparable to AFNI's AlphaSim, but it takes a maximum cluster area for each iteration, which is not exactly what AlphaSim does. Here is my guess: Given a surface, a given smoothness of the data, and a given per-vertex threshold, for each iteration the simulation populates that surface with random data taken from a normal distribution, thresholds the data, and applies the smoothness of the actual data (supplied as an input parameter). It then computes the maximum cluster size in area for that image. Doing this n iterations gives a distribution of maximum cluster sizes that occur for random data of a given smoothness, and taking cluster sizes above a certain percentile rank controls for the FWE at a level equal to that percentile rank (e.g., 95th% controls for FWE = .05). AlphaSim does something similar, although instead of taking maximum cluster sizes at each iteration it computes all given cluster sizes. AlphaSim also allows for different cluster connectivity radius, but it seems Freesurfer computes only for neighboring vertices. All in all, if this is correct, it seems like a good implementation. 2. It is my understanding
Re: [Freesurfer] question about clustering simulation
Doug- Let me be the first to say thank you for saving me massive amounts of simulation time. One bug though: the right hemisphere files say they were created using the left hemisphere, and mri_surfcluster rejects them. Would it be verboten to just alter the csd files, or do you have versions that were created off of fsaverage's right hemisphere? matacao:mult-comp-cor porterj$ head fsaverage/rh/cortex/fwhm19/abs/th33/mc-z.csd # simtype null-z # anattype surface fsaverage lh # FixGroupSubjectArea 1 # merged 0 # contrastNA # seed1271355821 # thresh 3.30 # threshsign 0.00 # searchspace 74490.928733 # nullfwhm19.00 Jim Porter, M.A. Graduate Student Clinical Science Psychopathology Research University of Minnesota On 7/22/64 1:59 PM, Douglas N Greve wrote: 1. Correct on both counts. When I wrote the simulation, I was only trying to replicate the random fields analysis. But with a simulation, you have more freedom that I am not yet exploiting. 2. This is what we are already doing with mc-z 3. I'm working on this as well. It turns out that the random fields approximation works a lot better when using the number of vertices. Also, I've run mc-z simulations under a bunch of thresholding and FWHM conditions for whole-hemisphere cortex labels. These will be integrated in new version of FS, but I've put them here ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mult-comp-cor.tar.gz as well. There's a README file in there. This will make running your own time-consuming simulations unnecessary (when using the cortex mask at least). doug Anthony Dick wrote: Hello all, I am interested in using the mri_glmfit simulation to control for multiple comparisons in data I have run on the surface in AFNI. Before doing this, I have a few questions: 1. What does the simulation with the mc-z flag do, exactly? It claims to be comparable to AFNI's AlphaSim, but it takes a maximum cluster area for each iteration, which is not exactly what AlphaSim does. Here is my guess: Given a surface, a given smoothness of the data, and a given per-vertex threshold, for each iteration the simulation populates that surface with random data taken from a normal distribution, thresholds the data, and applies the smoothness of the actual data (supplied as an input parameter). It then computes the maximum cluster size in area for that image. Doing this n iterations gives a distribution of maximum cluster sizes that occur for random data of a given smoothness, and taking cluster sizes above a certain percentile rank controls for the FWE at a level equal to that percentile rank (e.g., 95th% controls for FWE = .05). AlphaSim does something similar, although instead of taking maximum cluster sizes at each iteration it computes all given cluster sizes. AlphaSim also allows for different cluster connectivity radius, but it seems Freesurfer computes only for neighboring vertices. All in all, if this is correct, it seems like a good implementation. 2. It is my understanding that one could bypass running the glm in Freesurfer and only compute the simulation, as the simulation only needs information about the surface, and the smoothness of the data (which are supplied by the user). To do so, you have to fake out Freesurfer to bypass glm, but that turns out to be pretty painless. 3. In a future distribution, is it possible to modify this procedure to also output maximum cluster sizes in terms of number of nodes, rather than area? Can you please let me know if I am mistaken in any of these assumptions? Thanks in advance. Anthony ___ 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.
Re: [Freesurfer] Intersection of labels with other labels or volumes
Hi Nick- I've shortened the run time of the script (attached) by comparing the size of the two labels and restricting the search to only those vertices that exist in the smaller label. My logic is that there can't possibly be any more matching vertices than the size of the smaller label, so I may as well only act upon the smaller search space. If label A has 50,000 vertices and label B has 1,000 vertices, well, then I've saved 49,000 searches. This might not be a big deal for any individual iteration of the script, but it adds up when I'm running the script on 2 hemispheres by 35 aparc labels by 168 subjects! Please let me know if I've missed some fundamental piece of info on the nature of labels and it would be better to stick with the longer version. Thanks again for all of your help! (David Brang- I copied you on this because I think your recent post can be answered by the thread that I have going here with Nick. The attached script could easily be altered to find the intersection of all of the labels you've created.) - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota Nick Schmansky wrote: Jim Ok, one more time, attached is another iteration of the labels_intersection and labels_union scripts. These ignore the x,y,z and stats columns, looking only at the vertex numbers. In the case of identical vertices, the x,y,z,stats column data from the first file arg are included in the output file. Nick On Sun, 2009-08-30 at 19:37 -0500, James Porter wrote: FYI, Nick- It may be something to do with the 'comm' program on Mac OS X (assuming that you wrote the scripts on a UNIX machine), but the labels_intersect file doesn't quite work properly. However, I do get correct intersection results from the labels_union script by simply switching 'uniq -u' to 'uniq -d' and leaving everything else the same. Below you can see that there are identical lines in the two files, 'comm' doesn't find them, and 'uniq -d' does find them. $ grep 42796 TEST.zero.label 42796 -22.144 -40.241 27.868 0.00 142796 -4.945 52.116 -14.802 0.00 $ grep 42796 aparc_labels/lh.postcentral.label 42796 -22.144 -40.241 27.868 0.0 $ labels_intersect TEST.zero.label lh.postcentral.label Int.label $ head Int.label #!ascii label , from subject 17682 vox2ras=TkReg 0 $ labels_intersect_jim TEST.zero.label lh.postcentral.label JimInt.label $ head JimInt.label #!ascii label , from subject 17682 vox2ras=TkReg 1175 42796 -22.144 -40.241 27.868 0.00 43946 -22.166 -39.570 28.120 0.00 43953 -22.313 -39.961 27.481 0.00 45154 -21.927 -37.868 29.306 0.00 45167 -22.067 -38.462 27.645 0.00 45168 -22.290 -38.809 28.096 0.00 45173 -21.669 -38.528 26.871 0.00 45174 -22.199 -39.236 27.196 0.00 Also of note, if the 5th stats column in the label files are different, no union or intersection is correctly found. The labels generated by mri_surfcluster have the cluster pval from the monte carlo simulations in the 5th column, but the labels generated by mri_annotation2label just have zeros. It's easy enough to fix with sed, though. Thanks for the help! - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota Nick Schmansky wrote: Jim, Attached are two scripts for getting the union or intersect of two label files. Nick On Thu, 2009-08-27 at 20:32 -0500, James Porter wrote: Hello- Is there a simple way to obtain the intersection of two labels, output into a third label? Or the intersection of a label and an .mgh file output by mri_surfcluster? For instance, I have a cluster defined by mri_glmfit/mri_surfcluster that spans multiple anatomical regions, and I want to investigate the values from subsections of the cluster. That is to say, I want to run mris_anatomical_stats on only the section of my cluster that covers, say, precentral cortex but not caudal middle frontal or pars opercularis. I've tried several strategies without success. The most promising seemed to be just having mri_surfcluster output an aparc file, and then pass that aparc file into mris_anatomical_stats. However, that aparc just puts the very first region definition to every vertex. The same happens if I run mri_label2aparc on the labels output by mri_surfcluster. This happens no matter which LUT or ctab I use, i.e., with aparc.annot.ctab the whole volume gets labeled bankssts and with FreeSurferColorLUT.txt every vertex in the cluster volume gets labeled Left-Cerebral-Exterior. I guess there are a few issues in this email, but the most important one to me is being able to run mris_anatomical_stats on the union of a cluster file and the individual regions from the standard aparc atlas. Any suggestions? Thanks in advance, - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota
Re: [Freesurfer] Intersection of labels with other labels or volumes
FYI, Nick- It may be something to do with the 'comm' program on Mac OS X (assuming that you wrote the scripts on a UNIX machine), but the labels_intersect file doesn't quite work properly. However, I do get correct intersection results from the labels_union script by simply switching 'uniq -u' to 'uniq -d' and leaving everything else the same. Below you can see that there are identical lines in the two files, 'comm' doesn't find them, and 'uniq -d' does find them. $ grep 42796 TEST.zero.label 42796 -22.144 -40.241 27.868 0.00 142796 -4.945 52.116 -14.802 0.00 $ grep 42796 aparc_labels/lh.postcentral.label 42796 -22.144 -40.241 27.868 0.0 $ labels_intersect TEST.zero.label lh.postcentral.label Int.label $ head Int.label #!ascii label , from subject 17682 vox2ras=TkReg 0 $ labels_intersect_jim TEST.zero.label lh.postcentral.label JimInt.label $ head JimInt.label #!ascii label , from subject 17682 vox2ras=TkReg 1175 42796 -22.144 -40.241 27.868 0.00 43946 -22.166 -39.570 28.120 0.00 43953 -22.313 -39.961 27.481 0.00 45154 -21.927 -37.868 29.306 0.00 45167 -22.067 -38.462 27.645 0.00 45168 -22.290 -38.809 28.096 0.00 45173 -21.669 -38.528 26.871 0.00 45174 -22.199 -39.236 27.196 0.00 Also of note, if the 5th stats column in the label files are different, no union or intersection is correctly found. The labels generated by mri_surfcluster have the cluster pval from the monte carlo simulations in the 5th column, but the labels generated by mri_annotation2label just have zeros. It's easy enough to fix with sed, though. Thanks for the help! - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota Nick Schmansky wrote: Jim, Attached are two scripts for getting the union or intersect of two label files. Nick On Thu, 2009-08-27 at 20:32 -0500, James Porter wrote: Hello- Is there a simple way to obtain the intersection of two labels, output into a third label? Or the intersection of a label and an .mgh file output by mri_surfcluster? For instance, I have a cluster defined by mri_glmfit/mri_surfcluster that spans multiple anatomical regions, and I want to investigate the values from subsections of the cluster. That is to say, I want to run mris_anatomical_stats on only the section of my cluster that covers, say, precentral cortex but not caudal middle frontal or pars opercularis. I've tried several strategies without success. The most promising seemed to be just having mri_surfcluster output an aparc file, and then pass that aparc file into mris_anatomical_stats. However, that aparc just puts the very first region definition to every vertex. The same happens if I run mri_label2aparc on the labels output by mri_surfcluster. This happens no matter which LUT or ctab I use, i.e., with aparc.annot.ctab the whole volume gets labeled bankssts and with FreeSurferColorLUT.txt every vertex in the cluster volume gets labeled Left-Cerebral-Exterior. I guess there are a few issues in this email, but the most important one to me is being able to run mris_anatomical_stats on the union of a cluster file and the individual regions from the standard aparc atlas. Any suggestions? Thanks in advance, - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota ___ 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
[Freesurfer] Intersection of labels with other labels or volumes
Hello- Is there a simple way to obtain the intersection of two labels, output into a third label? Or the intersection of a label and an .mgh file output by mri_surfcluster? For instance, I have a cluster defined by mri_glmfit/mri_surfcluster that spans multiple anatomical regions, and I want to investigate the values from subsections of the cluster. That is to say, I want to run mris_anatomical_stats on only the section of my cluster that covers, say, precentral cortex but not caudal middle frontal or pars opercularis. I've tried several strategies without success. The most promising seemed to be just having mri_surfcluster output an aparc file, and then pass that aparc file into mris_anatomical_stats. However, that aparc just puts the very first region definition to every vertex. The same happens if I run mri_label2aparc on the labels output by mri_surfcluster. This happens no matter which LUT or ctab I use, i.e., with aparc.annot.ctab the whole volume gets labeled bankssts and with FreeSurferColorLUT.txt every vertex in the cluster volume gets labeled Left-Cerebral-Exterior. I guess there are a few issues in this email, but the most important one to me is being able to run mris_anatomical_stats on the union of a cluster file and the individual regions from the standard aparc atlas. Any suggestions? Thanks in advance, - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] Clusterwise correction
I have recently run simulations with and without the FWHM flag, and the results were 100% identical, in both the mgh output and cluster summary files. From what is below, I would think that the results should have changed in at least some way. The original qdec analysis was run with 10mm smoothing, and the sims (mc-full, 10k) were run with and without 10mm smoothing. Is there a certain point at which one would not expect smoothing in the simulations to not matter? - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota Douglas N Greve wrote: div class=moz-text-flowed style=font-family: -moz-fixed1) The smoother the data, the more likely a cluster will be found by chance. When the data are created, they start with some smoothness level. When you smooth them you add more. So you need to match the total level of smoothing when you do the simulations, otherwise your clusters will be way too significant. mri_glmfit creates a fwhm.dat file with an estimate of the total smoothness. 2) Just if they are nearest neighbors. There is no option to tinker with this. 3) Vertices in the maps created by the simulation are thresholded at the level you pass. This is what defines the cluster. doug Dankner, Nathan (NIH/NIMH) [F] wrote: Hello all, I have a couple of questions regarding the way the cluster correction simulation in freesurfer works. I've read the wiki pages on the subject, but if I've missed something and any of this is answered elsewhere please let me know. My technical knowledge of these things is not great so I am just trying to get some background. First of all, how does smoothing the data prior to running the simulation affect the results? I've run corrections on the same data smoothed with a 10mm FWHM, and also on completely unsmoothed data, and the cluster results were different. Secondly, what determines whether vertices are neighbors or not? Is there an option to tinker with this or is it predetermined? Lastly, how do the p values of individual vertices factor into the simulation? Are they taken into account when the determination of the max cluster size under the null hypothesis is performed? Thanks in advance, Nate ___ 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
Re: [Freesurfer] Clusterwise correction
Sorry, I mistyped. To clarify, the original qdec analyses were run on the 10mm smoothed data from qcache, and the sims were then run with and without passing the value from fwhm.dat into the FWHM flag in mri_glmfit. - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota James Porter wrote: I have recently run simulations with and without the FWHM flag, and the results were 100% identical, in both the mgh output and cluster summary files. From what is below, I would think that the results should have changed in at least some way. The original qdec analysis was run with 10mm smoothing, and the sims (mc-full, 10k) were run with and without 10mm smoothing. Is there a certain point at which one would not expect smoothing in the simulations to not matter? - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota Douglas N Greve wrote: div class=moz-text-flowed style=font-family: -moz-fixed1) The smoother the data, the more likely a cluster will be found by chance. When the data are created, they start with some smoothness level. When you smooth them you add more. So you need to match the total level of smoothing when you do the simulations, otherwise your clusters will be way too significant. mri_glmfit creates a fwhm.dat file with an estimate of the total smoothness. 2) Just if they are nearest neighbors. There is no option to tinker with this. 3) Vertices in the maps created by the simulation are thresholded at the level you pass. This is what defines the cluster. doug Dankner, Nathan (NIH/NIMH) [F] wrote: Hello all, I have a couple of questions regarding the way the cluster correction simulation in freesurfer works. I've read the wiki pages on the subject, but if I've missed something and any of this is answered elsewhere please let me know. My technical knowledge of these things is not great so I am just trying to get some background. First of all, how does smoothing the data prior to running the simulation affect the results? I've run corrections on the same data smoothed with a 10mm FWHM, and also on completely unsmoothed data, and the cluster results were different. Secondly, what determines whether vertices are neighbors or not? Is there an option to tinker with this or is it predetermined? Lastly, how do the p values of individual vertices factor into the simulation? Are they taken into account when the determination of the max cluster size under the null hypothesis is performed? Thanks in advance, Nate ___ 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
Re: [Freesurfer] Clusterwise correction
Hi Doug- You can see the full logs a screenshot of the mgh files here: https://netfiles.umn.edu/xythoswfs/webui/_xy-10431983_1-t_4xQ4HIVC Below are the commands (full pathways removed for brevity) that I ran. -Jim # mri glmfit command fwhm listing from original qdec log mri_glmfit --y 168.All.FAS.lh.qdec/y.mgh --fsgd 168.All.FAS.lh.qdec/qdec.fsgd dods --glmdir 168.All.FAS.lh.qdec --surf fsaverage lh --label $SUBJECTS_DIR/fsaverage/label/lh.cortex.label --C 168.All.FAS.lh.qdec/contrasts/lh-Avg-Intercept-thickness.mat --C 168.All.FAS.lh.qdec/contrasts/lh-Avg-thickness-FAS_Tot-Cor.mat ResidualFWHM 16.296576 # an example of the glmfit simulation commands with smoothing cd 168.All.FAS.lh.qdec/ mri_glmfit --y y.mgh --C contrasts/lh-Avg-thickness-FAS_Tot-Cor.mat --mask mask.mgh --sim mc-z 500 1.3 csd/mc-z.abs.p05.sim1 --sim-sign abs --fwhm 16.296576 --fsgd y.fsgd --surf fsaverage lh # command for clustering of the doubly smoothed data # note: if I try to pass fwhm into mri_surfcluster, I get an error that it can't be done with the 'abs' flag mri_surfcluster --hemi lh --subject fsaverage --in lh-Avg-thickness-FAS_Tot-Cor/sig.mgh --sum lh-Avg-thickness-FAS_Tot-Cor/sig.mc-z.p001.sum --cwsig lh-Avg-thickness-FAS_Tot-Cor/sig.mc-z.p001.mgh --annot aparc --thmin 3 --sign abs --csd csd/mc-z.abs.p001.sim10-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim1-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim2-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim3-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim4-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim5-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim6-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim7-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim8-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.abs.p001.sim9-lh-Avg-thickness-FAS_Tot-Cor.csd # command from the no smoothing glmfit sims cd 168.All.FAS.lh.qdec/ mri_glmfit --y y.mgh --C contrasts/lh-Avg-thickness-FAS_Tot-Cor.mat --mask mask.mgh --sim mc-z 500 3 csd/mc-z.nosmooth.abs.p001.sim2 --sim-sign abs --fwhm 0 --fsgd y.fsgd --surf fsaverage lh # no smoothing clustering command mri_surfcluster --hemi lh --subject fsaverage --in lh-Avg-thickness-FAS_Tot-Cor/sig.mgh --sum lh-Avg-thickness-FAS_Tot-Cor/sig.mc-z.nosmooth.p001.sum --cwsig lh-Avg-thickness-FAS_Tot-Cor/sig.mc-z.nosmooth.p001.mgh --annot aparc --thmin 3 --sign abs --olab FAS_168.All.FAS.lh.mc-z.nosmooth.p001 --csd csd/mc-z.nosmooth.abs.p001.sim10-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim1-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim2-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim3-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim4-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim5-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim6-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim7-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim8-lh-Avg-thickness-FAS_Tot-Cor.csd --csd csd/mc-z.nosmooth.abs.p001.sim9-lh-Avg-thickness-FAS_Tot-Cor.csd Douglas N Greve wrote: Can you send your mri_glmfit and mri_surfcluster command-lines? doug James Porter wrote: Sorry, I mistyped. To clarify, the original qdec analyses were run on the 10mm smoothed data from qcache, and the sims were then run with and without passing the value from fwhm.dat into the FWHM flag in mri_glmfit. - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota James Porter wrote: I have recently run simulations with and without the FWHM flag, and the results were 100% identical, in both the mgh output and cluster summary files. From what is below, I would think that the results should have changed in at least some way. The original qdec analysis was run with 10mm smoothing, and the sims (mc-full, 10k) were run with and without 10mm smoothing. Is there a certain point at which one would not expect smoothing in the simulations to not matter? - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota Douglas N Greve wrote: div class=moz-text-flowed style=font-family: -moz-fixed1) The smoother the data, the more likely a cluster will be found by chance. When the data are created, they start with some smoothness level. When you smooth them you add more. So you need to match the total level of smoothing when you do the simulations, otherwise your clusters will be way too significant. mri_glmfit creates a fwhm.dat file with an estimate of the total smoothness. 2) Just if they are nearest neighbors. There is no option to tinker with this. 3) Vertices in the maps created by the simulation are thresholded at the level you pass. This is what
Re: Re: [Freesurfer] Longitudinal analysis with old version
As a tangential follow-up question, will the longitudinal analysis stream be discussed and demonstrated in the upcoming FSL/FreeSurfer course in San Francisco? - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota Nick Schmansky wrote: Leticia, In the interim until the new longitudinal stream is released, you can run all your timepoints through the regular stream (recon-all -all), as this is required in the new stream. Doing so was not required in the existing (old) longitudinal stream (only the first timepoint was required, now all timepoints must be processed). Nick On Tue, 2009-05-12 at 14:09 -0400, Bruce Fischl wrote: Hi Leticia, the recon-all -long stuff is not quite ready yet. Hopefully we'll have something to distribute within a week or so. cheers, Bruce On Tue, 12 May 2009 l.gutier...@ion.ucl.ac.uk wrote: Hi, We have installed the 4.0.1 version and we are starting the longitudinal analysis. I have some problems with -base flag( recon-all -base baseid -base-insubj tp1subjid -base-insubj tp2subjid ... -all). Should 4.0.1 version be one problem in order to do that? Many thanks Leticia ___ 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 ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Making Binary Masks
Hello- Can somebody point me towards the best way to make a thresholded binary mask out of a sig.mgh file that comes out of qdec/mri_glmfit? I'd like to take the sig.mgh file and use all values above threshold as a mask for another mri_glmfit analysis. I'm used to functional data in FSL, and could do this lickety-split with fslmaths or fslroi. Does FreeSurfer have a similar set of utilities to be used in manipulating .mgh files? I've tried to run thresholding within tksurfer, then Save Overlay As but that doesn't cut off the sub-threshold values. I'm sure I could draw on the surface to trace my supra-threshold areas and create a mask that way, but I'd prefer to just do it mathematically if possible. Thanks! -- - Jim Porter Graduate Student Clinical Science Psychopathology Research University of Minnesota ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Turn Off Verbose Output
Howdy- I didn't see any flags in the help files, but are there some 'hidden' commands I could use to attenuate the verbosity of reg-feat2anat and aseg2feat? Thanks, Jim Porter TRiCAM Lab Coordinator Elliott Hall N437 612.624.3892 www.psych.umn.edu/research/tricam http://www.psych.umn.edu/research/tricam ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] White Matter Parcellation
Hello- In September of 2006 there was a post in which you mentioned that white matter parcellations were being fine-tuned but not yet ready. I'm really hoping to take advantage of the 3000 and 4000 level labels shown in FreeSurferColorLUT.txt, but I don't have them in my current parcellations that were created using FreeSurfer v3.0.3. Are there versions of the parcellation schemes available that I can upgrade to in order to obtain these finer white matter parcellations? Thanks, Jim Porter TRiCAM Lab Coordinator Elliott Hall N437 612.624.3892 www.psych.umn.edu/research/tricam ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer