[Freesurfer] cluster size and FWER rough equivalence?

2020-12-21 Thread Kayle Sawyer
External Email - Use Caution

We are working on a manuscript revision for an fMRI project that was
analyzed with FS-FAST 5.3 years ago. We used mri_glmfit, and then we ran
mri_surfcluster (instead of mri_glmfit-sim) with a vertex-wise threshold of
p<0.001 and a cluster threshold of 100mm^2. We had applied 8 mm smoothing
at the group-level, and the voxel size was 3.125x3.125x5 (resampled to
fsaverage surface and to MNI305).

1. One reviewer asked us to provide a rough estimate of the family-wise
error rate (FWER) that a cluster threshold of 100mm^2 is equivalent to, or
alternatively, to re-analyze everything with mri_glmfit-sim permutation. It
would be simpler to provide the FWER estimate. To get the FWER estimate, we
referred to Woo et al (2014). However, their simulations were for volume
analyses, not surface analyses. What is the FWER (roughly) for a primary
threshold of p<0.001 and cluster threshold of 100mm^2? (Obviously, we are
hoping for a number less than 0.05.)

2. For the volume, we used mri_surfcluster with a primary (voxel-wise)
threshold of 0.001 and a size threshold of 300mm^3. If I’m understanding
correctly, Figure 2 from Woo et al. (2014) suggests a FWER p<0.05 might
roughly correspond to a cluster size threshold of 200 to 985 voxels (1600
to 7880 mm^3), depending on intrinsic smoothness. That would likely put our
threshold of 300mm^3 well above p<0.05. Is this correct?


Thanks,

-Kayle
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Freeview surface annotation outline line thickness

2018-05-04 Thread Kayle Sawyer
External Email - Use Caution

The freeview flag "annot_outline=1" is great for viewing results for
significant clusters from mri_glmfit-sim. Is there a way to make the
outlines thicker?

With the default thickness, the outlines are difficult to make out in a
multipanel figure. (The "edgethickness=" flag specifies the slice
intersection crosshair with the surface, not the annotation outline
thickness.)
Thanks,
-Kayle
___
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] bbregister and FLAIR

2014-05-23 Thread Kayle Sawyer
Hello,We have been examining the pial surface adjustment with FLAIR scans, and the improvement is quite dramatic. There are MANY areas where the pial surface was clearly wrong and has been substantially improved, considerably reducing (often eliminating) the need for manual pial corrections. I suggest everyone who uses FreeSurfer surfaces acquire a FLAIR scan if they can (see attached for the sequence we’re using). However, for most of our participants, we have run into a serious problem with bbregister.We're running recon-all with two input volumes:-i MEMPRAGE_scan -FLAIR FLAIR_scanRecon-all completes successfully, however the results do not look good due to a bad 'bbregister' registration step.The MEMPRAGE and FLAIR runs were acquired within the same scanning session and they're very well registered to begin with. However, the 'bbregister' step seems to not work well, and they end up grossly misaligned.Here is an example (on the Martinos network):[kslays@ficus ~]$source /usr/local/freesurfer/nmr-stable53-env;setenv SUBJECTS_DIR /autofs/space/ficus_004/users/SLOTS_subjects;cd $SUBJECTS_DIR;recon-all -all -subjid SLOTS007 \ -i $SUBJECTS_DIR/SLOTS007/3danat/006/MEMPRAGE_RMS.mgz \ -FLAIR $SUBJECTS_DIR/SLOTS007/flair/007/flair.mgz \ -FLAIRpial -mprage -3T -pctsurfcon -qcache -hippo-subfieldsCheck input volume registration (looks good):tkregister2 --targ SLOTS007/mri/orig/001.mgz \    --mov  SLOTS007/mri/orig/FLAIRraw.mgz \    --reg NULL --regheaderCheck bbregister output (looks bad):tkregister2 --mov SLOTS007/mri/orig/FLAIRraw.mgz \    --reg SLOTS007/mri/transforms/FLAIRraw.dat --surfHow do we correct the bbregister step? Thanks in advance for your input.-KayleP.S. If you would like to see other examples, feel free to look at other recons in the same directory. Here is an example where bbregister worked, and the pial corrections are dramatic:freeview -v SLOTS005/mri/FLAIR.mgz            \-f SLOTS005/surf/lh.white:edgecolor=yellow    \SLOTS005/surf/rh.white:edgecolor=yellow       \SLOTS005/surf/lh.pial:edgecolor=red           \SLOTS005/surf/rh.pial:edgecolor=red           \SLOTS005/surf/lh.woFLAIR.pial:edgecolor=green \SLOTS005/surf/rh.woFLAIR.pial:edgecolor=green \-ras -37 -46 -42 Kayle Sawyer, PhD
Athinoula A. Martinos Center for Biomedical ImagingMGH East Campus, Charlestown Navy YardBuilding 149, South Central 1113 - Seat F149 13th StreetBoston, MA 02129OFFICE:(617) 726-8791Laboratory of NeuropsychologyBoston University School of Medicine L-81572 E. Concord StBoston, MA 02118OFFICE:(617) 638-4803VA Boston Healthcare System Jamaica Plain150 South Huntington Ave 151-A, D11-126Boston, MA 02130OFFICE:(857) 364-4003FAX:   (857) 364-5829

   SIEMENS MAGNETOM ConnectomA syngo MR D11
-
  
\\USER\INVESTIGATORS\Oscar-Berman\SLOTS\t2_spc_da-fl_sag_p2_iso_0.9
  TA:5:47  PAT:2  Voxel size:0.4×0.4×0.9 mm Rel. SNR:1.00   :spcir  
-
Properties
 Prio Recon  Off 
 Before measurement   
 After measurement
 Load to viewer  On 
 Inline movieOff 
 Auto store images   On 
 Load to stamp segments  Off 
 Load images to graphic segments Off 
 Auto open inline displayOff 
 Wait for user to start  Off 
 Start measurements  single 
Routine
 Nr. of slab groups  1 
 Slabs   1 
 PositionL0.0 A4.3 F18.2 mm
 Orientation Sagittal 
 Phase enc. dir. A >> P 
 AutoAlign   Head > Brain 
 Phase oversampling  0 %
 Slice oversampling  0.0 %
 FoV read230 mm
 FoV phase   100.0 %
 Slice thickness 0.90 mm
 TR  5000 ms
 TE  389.0 ms
 Concatenations  1 
 Filter  Raw filter, Normalize 
 Coil elements   BOT;TOP 
Contrast
 MTC Off 
 Magn. preparation   T2 sel. IR 
 TI  1800 ms
 Fat suppr.  None 
 Water suppr.None 
 Restore magn.   Off 
 Measurements1 
 Reconstruction  

Re: [Freesurfer] gammavar.mgh?

2013-12-03 Thread Kayle Sawyer
Hi Doug,

Thanks for confirming how to calculate the 95% confidence interval of the slope 
for all my clusters. I realized that there was a small error in my formula, in 
that I should use the critical values from the t-distribution, not the 
z-distribution (so the SE multiplier will be more like 2.0 instead of 1.96, 
depending on my sample N).

The problem is that mri_segstats trims the output at the 10,000ths place. Here 
is the cluster.summary and the segstats from the two clusters identified as 
significantly associated with age.

mc-z.th1.3.neg.sig.cluster.summary:
# ClusterNo  Max   VtxMax   Size(mm^2)  MNIX   MNIY   MNIZCWPCWPLow
CWPHi   NVtxs   Annot
   1   -5.096   73213   4275.24 50.0   33.2   -7.2  0.00350  0.00280  
0.00430  8455  parstriangularis
   2   -3.802   51616  20825.27  4.9  -26.2   39.2  0.00010  0.0  
0.00020  41094  posteriorcingulate

gamma.mgh:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range  
  1   1  8455 8455.0  Seg0001-0.0089 0.0027-0.0147
-0.0038 0.0109 
  2   2 4109441094.0  Seg0002-0.0069 0.0017-0.0132
-0.0023 0.0108 

gammavar.mgh:
# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max 
Range  
 1   1  8455 8455.0  Seg0001 0. 0. 0. 
0. 0. 
 2   2 4109441094.0  Seg0002 0. 0. 0. 
0. 0. 

So, for the 95% CI of the slope for cluster #1, I would use these formulas 
(N=60, so the t-distribution 95% critical value is 2.0003):
 -0.0089+2.0003*sqrt(0.)
 -0.0089-2.0003*sqrt(0.)

Is there any way to add more significant digits to the mri_segstats output?

Thanks,
-Kayle


On Nov 4, 2013, at 6:31 PM, Douglas N Greve  wrote:

> 
> Yes, that should work.
> doug
> 
> On 10/30/2013 03:35 PM, Kayle Sawyer wrote:
>> Hi all,
>> 
>> I would like to calculate the 95% confidence interval of the slope for a 
>> thickness cluster (vs age in years) produced by mri_glmfit-sim.
>> 
>> I have obtained values for my clusters from gamma.mgh and gammavar.mgh using 
>> these two commands:
>> 
>> mri_segstats --i gamma.mgh
>> --seg mc-z.th1.3.neg.sig.ocn.mgh
>> --excludeid 0
>> --sum mc-z.th1.3.neg.sig.ocn.gamma.segstats
>> 
>> mri_segstats --i gammavar.mgh
>> --seg mc-z.th1.3.neg.sig.ocn.mgh
>> --excludeid 0
>> --sum mc-z.th1.3.neg.sig.ocn.gammavar.segstats
>> 
>> Next, (for each cluster, within each segstats summary file) I would take the 
>> “mean” from gamma, and the “mean” from gammavar, and calculate the 95% CI 
>> thus:
>> gamma + 1.96*sqrt(gammavar)
>> gamma - 1.96*sqrt(gammavar)
>> 
>> Would these two values would give me the 95% confidence interval for the 
>> effect of age on that cluster, in mm/year?
>> 
>> Thanks,
>> -Kayle
>> 
>> 
>> 
>> Yahoo Groups Links
>> 
>> <*> To visit your group on the web, go to:
>> http://groups.yahoo.com/group/martinos-tech/
>> 
>> <*> Your email settings:
>> Individual Email | Traditional
>> 
>> <*> To change settings online go to:
>> http://groups.yahoo.com/group/martinos-tech/join
>> (Yahoo! ID required)
>> 
>> <*> To change settings via email:
>> martinos-tech-dig...@yahoogroups.com
>> martinos-tech-fullfeatu...@yahoogroups.com
>> 
>> <*> To unsubscribe from this group, send an email to:
>> martinos-tech-unsubscr...@yahoogroups.com
>> 
>> <*> Your use of Yahoo Groups is subject to:
>> http://info.yahoo.com/legal/us/yahoo/utos/terms/
>> 
>> 
>> 
> 
> -- 
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> gr...@nmr.mgh.harvard.edu
> Phone Number: 617-724-2358
> Fax: 617-726-7422
> 
> Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
> FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
> www.nmr.mgh.harvard.edu/facility/filedrop/index.html
> Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
> 
> 
> 
> 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


Re: [Freesurfer] sim ocn clusters mean effect size

2013-10-28 Thread Kayle Sawyer
Hi all,

I would like to calculate the 95% confidence interval of the slope for a 
thickness cluster (vs age in years) produced by mri_glmfit-sim. 

I have obtained values for my clusters from gamma.mgh and gammavar.mgh using 
these two commands:

mri_segstats --i gamma.mgh
 --seg mc-z.th1.3.neg.sig.ocn.mgh 
 --excludeid 0 
 --sum mc-z.th1.3.neg.sig.ocn.gamma.segstats

mri_segstats --i gammavar.mgh
 --seg mc-z.th1.3.neg.sig.ocn.mgh 
 --excludeid 0 
 --sum mc-z.th1.3.neg.sig.ocn.gammavar.segstats

Next, (for each cluster, within each segstats summary file) I would take the 
“mean” from gamma, and the “mean” from gammavar, and calculate the positive 95% 
CI thus:
gamma + 1.96*sqrt(gammavar)
gamma - 1.96*sqrt(gammavar)

Would these two values would give me the 95% confidence interval for the effect 
of age on that cluster, in mm/year?

Thanks,
-Kayle
___
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] sim ocn clusters mean effect size

2013-10-09 Thread Kayle Sawyer
Hi,

Using FS 5.3, I ran a group analysis with mri_glmfit-sim to identify clusters 
where my two groups differed (along with many other analyses, e.g. age slope 
for each group). For each cluster, I would like to see what the mean group 
difference is, in mm. So, I used this command:

mri_segstats --i gamma.mgh --sum group_effectsize_clusters.txt --annot 
fsaverage rh ./mc-z.th1.3.pos.sig.ocn.annot

Unfortunately, mri_segstats looks in the wrong place for the annot file, 
prepending "$SUBJECTS_DIR/fsaverage/label/rh." instead of looking in my present 
GLM directory that I typed the command from. 

In comparison, if I manually create a label for one of the clusters from the 
ocn.annot, and use the label, mri_segstats works:

mri_segstats --i gamma.mgh --sum group_effectsize_clusters.txt --slabel 
fsaverage rh ./label.th1.3.neg/rh.cluster-001.label

This time, it doesn't try to look under fsaverage, but uses the present GLM 
directory. Is there a way to override the SUBJECTS_DIR issue with --annot? I 
tried without the "./", and with specifying the absolute path, but it still 
pre-pended the "$SUBJECTS_DIR/fsaverage/label/rh." before the path. Or, should 
I just create labels for each analysis, run mris_segstats for each cluster, and 
then combine them all back together with grep?

Thanks,
-Kayle
___
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] Global thickness calculation

2013-10-07 Thread Kayle Sawyer
If you want the global thickness for all your subjects in a single table, use 
asegstats2table, e.g.

aparcstats2table --subjects bert ernie fred margaret --hemi rh --meas thickness 
--tablefile rh.aparc_stats.txt

The first column will be the rh thickness, which you can average with the lh in 
a spreadsheet. Or, you can use aparcstats2table again with "--meas area", and 
then in your spreadsheet use the equation you described to give additional 
weight to the hemisphere with larger area. 

Because it's in a table, you can then use this as a covariate in your FSGD, but 
I thought I read that some people do not recommend using global thickness as a 
covariate.

-Kayle

> Date: Fri, 04 Oct 2013 19:25:07 -0400
> From: Douglas N Greve 
> Subject: Re: [Freesurfer] Global thickness calculation
> To: freesurfer@nmr.mgh.harvard.edu
> Message-ID: <524f4e53.3020...@nmr.mgh.harvard.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> 
> you can do something like this
> 
> cd $SUBJECTS_DIR/$subject
> 
> mri_segstats --slabel $subject lh label/lh.cortex.label --i 
> surf/lh.thickness --id 1 --sum stats/lh.meanthickness.dat
> 
> 
> On 10/04/2013 05:22 PM, Mollie Bayda wrote:
>> Hi,
>> I am trying to calculate whole-brain mean cortical thickness in each 
>> individual subject for correction of regional mean thicknesses.
>> I see on the wiki that this is recommended to be done by:
>> bh.thickness = (lh.thickness X lh.area) + (rh.thickness X rh.area) / 
>> (lh.area +rh.area)
>> In my table I see lh and rh total area but I do not see lh and rh 
>> thickness. All I see is mean thicknesses for each region. Are the 
>> total rh and lh mean thicknesses supposed to appear in the table?
>> Thanks!


___
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] Working with MEMPRAGE

2013-05-09 Thread Kayle Sawyer
Hi all,

Can the MEMPRAGE be specified in recon-all with the -i flag? We have been using 
the MEMPRAGE RMS scans and discarding the multiecho scans. If we instead 
specify the multiecho scans for recon-all, do we need to give any additional 
parameters (e.g. the number of echoes) for it to utilize the 4 echoes to detect 
dura and refine pial surfaces in mris_make_surfaces, as described below? Or 
would we have to run recon-all with the RMS, then after it finishes re-run 
mris_make_surfaces manually with the -dura flag to refine the pial surface?

Also, I'd like to make sure we are using dcmunpack properly. We take the 
scan.info file and parse it like this: "-run [MEMPRAGE_4e_p2_1mm_iso run 
number] 3danat mgz 001.mgz" so the multi echo scan gets put into one mgz file, 
and the RMS gets put into a separate mgz file.

Thanks,
-Kayle

On May 9, 2013, at 12:00 PM, freesurfer-requ...@nmr.mgh.harvard.edu wrote:
> Message: 35
> Date: Thu, 9 May 2013 10:44:23 -0400 (EDT)
> From: Bruce Fischl 
> Subject: Re: [Freesurfer] Working with MEMPRAGE
> To: Jonathan Holt 
> Cc: freesurfer@nmr.mgh.harvard.edu
> Message-ID:
>   
> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
> 
> it needs to be:
> 
> mris_make_surfaces -dura memprage_echo%d.mgz 4 subjid lh
> 
> note the "4" which tells it how many echoes to read
> 
> On Thu, 9 May 2013, Jonathan Holt wrote:
> 
>> I input:
>> 
>> mris_make_surfaces -dura memprage_echo%d.mgz subjid lh
>> 
>> it returns:
>> 
>> detecting dura using 0 echos from memprage_echo%d.mgz
>> 
>> 
>> Should I execute the command in the same directory as the mgz's? Should they 
>> be set up or placed in a specific directory? I also, as with recon-all, 
>> exported the proper subject directory beforehand.
>> 
>> 
>> On May 9, 2013, at 10:37 AM, Bruce Fischl wrote:
>> 
>>> can you send me the full command line? It should say 4 echoes, not 0
>>> On Thu, 9 May 2013, Jonathan Holt wrote:
>>> 
 Thanks Bruce,
 
 should the hemisphere's be processed separately, or how do I signify lh 
 and rh simultaneously?
 
 Also, should the fact that after running mris_make_surfaces, it says 
 "detecting dura using 0 echos from memprage_echo%d.mgz" be worrisome? I've 
 got 4 different echos, all mgzs in the directory. I have a feeling I'm 
 doing this incorrectly.
 
 jon
 On May 9, 2013, at 8:50 AM, Bruce Fischl wrote:
 
> Hi Jon
> 
> yes, the subject and hemi need to be defined (they are required 
> parameters)
> Bruce
> On Wed, 8 May 2013, Jonathan Holt wrote:
> 
>> Hi all,
>> combed through the mail archives to figure out how to work with multi 
>> echo
>> mprage, found what I need but I wanted to confirm which of these two
>> commands is the appropriate
>> mris_make_surfaces -dura memprage_echo%d.mgz 4 subjid lh/rh
>> mris_make_surfaces -dura memprage_echo%d.mgz do the subjid and 
>> hemispheres need to be specified as per the 1st line?
>> jon
>> 


___
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.