[Freesurfer] mri_surfcluster

2016-07-06 Thread tom parker
Dear Freesurfers,

I ran a comparison between different groups using mri_glmfit.
Now I would like to correct the results in sig.mgh by multiple comparisons
using FDR. I tried using tksurfer but it doesn't work so well on my
computer and I read that freeview does not allow to do that yet.

I'm now trying to use mri_surfcluster to do it. Is this correct?
mri_surfcluster --in sig.mgh --subject fsaverage --surf inflated --hemi lh
--fdr 0.05 --sign pos

After I run it some thresholds appear in the terminal.
Should I use these thresholds to create a FDR corrected sig.mgh map or is
there a direct way of getting this using mri_surfcluster or other command?

Thank you so much!
___
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] Error long_mris_slopes

2016-10-12 Thread tom parker
Dear FreeSurfers,

I've been trying to run a longitudinal cortical thickness analysis in
FreeSurfer but unfortunately, so far, it has not worked.

After preprocessing the data following the instructions from the tutorial,
I tried running:
*long_mris_slopes --qdec /Volumes/WD/Long/qdec/long.qdec.table.dat --meas
thickness --hemi lh --do-avg --do-rate --do-pc1 --do-spc --do-stack
--do-label --time years --qcache fsaverage --sd /Volumes/WD/Long/*

And the following error came out:

*Parsing the qdec table: /Volumes/WD/Long/qdec/long.qdec.table.datERROR:
qdec table /Volumes/WD/Long/qdec/long.qdec.table.dat not found or empty?*

The path is correct and there are no empty lines in the file.

When I ran:
*mris_preproc --debug --qdec-long qdec/long.qdec.table.dat*

This comes out:




























*set echo = 1 ;set debug = 1 ;set debug = 1breakswbreakswendendwhile (
$#argv != 0 )while ( 2 != 0 )set flag = $argv[1] ; shift ;set flag =
--qdec-longshiftswitch ( $flag )switch ( --qdec-long )if ( $#argv == 0 )
goto arg1err ;if ( 1 == 0 ) goto arg1errset fsgdf = $argv[1] ; shift ;set
fsgdf = qdec/long.qdec.table.datshiftif ( ! -e $fsgdf ) thenif ( ! -e
qdec/long.qdec.table.dat ) thenecho "ERROR: cannot find $fsgdf" ;echo
ERROR: cannot find qdec/long.qdec.table.datERROR: cannot find
qdec/long.qdec.table.datexit 1 ;exit 1*

Do you have any idea why this is happening?

Thank you so much!
___
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] question white matter

2016-12-13 Thread tom parker
Dear Freesurfers,

Could anyone tell me what the white.H and white.K measures in Qdec are?

Thank you so much!
___
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] question white matter analysis

2016-12-14 Thread tom parker
Dear FreeSurfers,

Thanks for the previous reply on what the white.K and white.H are.
I would like to make an analysis in Qdec using one of these measures.
However, I didn't find much information online so I would like to ask you 3
final things:

1. Which of the two measures (mean, gaussian) is more suitable for an
analysis of white matter volume/curvature?

2. How can I apply some smoothing to the white.K and white.H files to be
able to make an analysis in Qdec?

3. Should I include ITV as a covariate in these analyses?

Thank you so much!
___
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] Qdec

2016-03-30 Thread tom parker
Hi Freesurfers,

I compared 2 groups, while controlling for 1 covariate in qdec using
freesurfer 5.1.

There were no significant interactions with the covariate so I need to use
DOSS.

I read on several post that DOSS has some bugs related to the generation of
contrasts in qdec and that mri_glmfit should be used to run a DOSS analysis.

However, when I ran my analysis with DOSS in qdec I saw that the C.mat file
looked like this: 1 -1 0, which seems correct to me.

My question is can I use DOSS in qdec in this case? Or are there other bugs
related to using it in qdec?

Thank you so much!
___
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] Qdec DOSS

2016-04-05 Thread tom parker
Hi Freesurfers,

I posted this question a few days ago but didn't get any replies.
Would you mind answering this for me?

I compared 2 groups, while controlling for 1 covariate in qdec using
freesurfer 5.1.

There were no significant interactions with the covariate so I need to use
DOSS.

I read on several post that DOSS has some bugs related to the generation of
contrasts in qdec and that mri_glmfit should be used to run a DOSS analysis.

However, when I ran my analysis with DOSS in qdec I saw that the C.mat file
looked like this: 1 -1 0, which seems correct to me.

My question is can I use DOSS in qdec in this case? Or are there other bugs
related to using it in qdec?

Thank you so much!
___
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] correlation coefficient R

2017-04-03 Thread tom parker
Dear Freesurfers,

I made some correlations between cortical thickness and age in qdec.

Is it possible to get the correlation coefficient value of this analysis?

I just need to put it in a table with the significant results.

Thank you so much!
___
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] correlation coefficient R

2017-04-03 Thread tom parker
Thanks Doug!

I have version 6 and got a pcc.mgh file.

How can I get a correlation R value from this file?

Thanks again

Douglas N Greve
<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N+Greve%22>
Mon,
03 Apr 2017 09:41:41 -0700
<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170403>

if you are using version 6, then it should have produced a file called
pcc.mgh. This the partial pearson correlation coef.



2017-04-03 15:40 GMT+01:00 tom parker :

> Dear Freesurfers,
>
> I made some correlations between cortical thickness and age in qdec.
>
> Is it possible to get the correlation coefficient value of this analysis?
>
> I just need to put it in a table with the significant results.
>
> Thank you so much!
>
___
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] correlation coefficient R

2017-04-04 Thread tom parker
Hi Doug,

Thanks! I realize now I didn't explain myself properly.

I need one single R value for the correlation analysis I made,
similarly to when I correlate two variables with Pearson's R in a
statistical package.

I have a referee asking me to put it on a table with the freesurfer
results. Is there a way to get a single average R value from the
pcc.mgh file?

Thank you so much!


Douglas Greve
<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+Greve%22>
Mon,
03 Apr 2017 18:46:46 -0700
<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170403>
Each vertex is a correlation value.



2017-04-04 1:09 GMT+01:00 tom parker :

> Thanks Doug!
>
> I have version 6 and got a pcc.mgh file.
>
> How can I get a correlation R value from this file?
>
> Thanks again
>
> Douglas N Greve
> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N+Greve%22>
>  Mon,
> 03 Apr 2017 09:41:41 -0700
> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170403>
>
> if you are using version 6, then it should have produced a file called
> pcc.mgh. This the partial pearson correlation coef.
>
>
>
> 2017-04-03 15:40 GMT+01:00 tom parker :
>
>> Dear Freesurfers,
>>
>> I made some correlations between cortical thickness and age in qdec.
>>
>> Is it possible to get the correlation coefficient value of this analysis?
>>
>> I just need to put it in a table with the significant results.
>>
>> Thank you so much!
>>
>
>
___
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] correlation coefficient R

2017-04-07 Thread tom parker
Hi Doug,

Thank you for your answer!

It would be great if you could send me some instructions.

Thanks for the help!

Douglas N Greve
<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N+Greve%22>
Thu,
06 Apr 2017 13:32:07 -0700
<http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170406>

I guess you could average it over space (eg, over a cluster). Let me
know if you want instructions. Otherwise, I'm not sure what to say.



2017-04-04 11:49 GMT+01:00 tom parker :

> Hi Doug,
>
> Thanks! I realize now I didn't explain myself properly.
>
> I need one single R value for the correlation analysis I made, similarly to 
> when I correlate two variables with Pearson's R in a statistical package.
>
> I have a referee asking me to put it on a table with the freesurfer results. 
> Is there a way to get a single average R value from the pcc.mgh file?
>
> Thank you so much!
>
>
> Douglas Greve
> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+Greve%22>
>  Mon,
> 03 Apr 2017 18:46:46 -0700
> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170403>
> Each vertex is a correlation value.
>
>
>
> 2017-04-04 1:09 GMT+01:00 tom parker :
>
>> Thanks Doug!
>>
>> I have version 6 and got a pcc.mgh file.
>>
>> How can I get a correlation R value from this file?
>>
>> Thanks again
>>
>> Douglas N Greve
>> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N+Greve%22>
>>  Mon,
>> 03 Apr 2017 09:41:41 -0700
>> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170403>
>>
>> if you are using version 6, then it should have produced a file called
>> pcc.mgh. This the partial pearson correlation coef.
>>
>>
>>
>> 2017-04-03 15:40 GMT+01:00 tom parker :
>>
>>> Dear Freesurfers,
>>>
>>> I made some correlations between cortical thickness and age in qdec.
>>>
>>> Is it possible to get the correlation coefficient value of this analysis?
>>>
>>> I just need to put it in a table with the significant results.
>>>
>>> Thank you so much!
>>>
>>
>>
>
___
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] correlation coefficient R

2017-04-12 Thread tom parker
Thank you so much Doug!

It worked! I was just wondering which value I should report as the
correlation coefficient of my analysis.

This is the output I got:

# ColHeaders  Index SegId NVoxels Volume_mm3 StructName Mean StdDev Min Max
Range
  1  -4 2037320373.0  Seg-004-0.1596 0.0468-0.3134
-0.1017 0.2117

Should I report the mean (-0.1596) or the min (-0.3134)?

Thanks again

Try something like

mri_segstats --i pcc.mgh --seg cluster.ocn.mgh --excludeid 0 --sum
cluster.pcc.dat



2017-04-08 1:35 GMT+01:00 tom parker :

> Hi Doug,
>
> Thank you for your answer!
>
> It would be great if you could send me some instructions.
>
> Thanks for the help!
>
> Douglas N Greve
> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N+Greve%22>
>  Thu,
> 06 Apr 2017 13:32:07 -0700
> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170406>
>
> I guess you could average it over space (eg, over a cluster). Let me
> know if you want instructions. Otherwise, I'm not sure what to say.
>
>
>
> 2017-04-04 11:49 GMT+01:00 tom parker :
>
>> Hi Doug,
>>
>> Thanks! I realize now I didn't explain myself properly.
>>
>> I need one single R value for the correlation analysis I made, similarly to 
>> when I correlate two variables with Pearson's R in a statistical package.
>>
>> I have a referee asking me to put it on a table with the freesurfer results. 
>> Is there a way to get a single average R value from the pcc.mgh file?
>>
>> Thank you so much!
>>
>>
>> Douglas Greve
>> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+Greve%22>
>>  Mon,
>> 03 Apr 2017 18:46:46 -0700
>> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170403>
>> Each vertex is a correlation value.
>>
>>
>>
>> 2017-04-04 1:09 GMT+01:00 tom parker :
>>
>>> Thanks Doug!
>>>
>>> I have version 6 and got a pcc.mgh file.
>>>
>>> How can I get a correlation R value from this file?
>>>
>>> Thanks again
>>>
>>> Douglas N Greve
>>> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=from:%22Douglas+N+Greve%22>
>>>  Mon,
>>> 03 Apr 2017 09:41:41 -0700
>>> <http://www.mail-archive.com/search?l=freesurfer@nmr.mgh.harvard.edu&q=date:20170403>
>>>
>>> if you are using version 6, then it should have produced a file called
>>> pcc.mgh. This the partial pearson correlation coef.
>>>
>>>
>>>
>>> 2017-04-03 15:40 GMT+01:00 tom parker :
>>>
>>>> Dear Freesurfers,
>>>>
>>>> I made some correlations between cortical thickness and age in qdec.
>>>>
>>>> Is it possible to get the correlation coefficient value of this
>>>> analysis?
>>>>
>>>> I just need to put it in a table with the significant results.
>>>>
>>>> Thank you so much!
>>>>
>>>
>>>
>>
>
___
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] web image preprocessing

2017-06-16 Thread tom parker
Dear Freesurfer experts,

Does anyone know if there is a web portal where i can upload my T1 images
to preprocess them with freesurfer and download the preprocessed files?

Thank you so much!
___
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] FsPalm patch

2018-09-07 Thread Tom Parker
External Email - Use Caution

Dear Freesurfer developers,

I am attempting to download the FsPalm patch 
(https://surfer.nmr.mgh.harvard.edu/fswiki/FsPalm 
) using: the link described 
in the wiki - 
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0-patch/PALM 


However, there appears to be no directory at that location. 

Please can you inform me how to install the FsPalm patch?

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


[Freesurfer] LME - Monte Carlo

2019-07-01 Thread tom parker
External Email - Use Caution

Dear FreeSurfers,

I was reading the wiki documents about how to run LME analyses in
FreeSurfer.
I found that one of the disadvantages is that, at the moment, it only
allows FDR corrections to be applied for multiple comparisons.

I have 2 patient groups that show cortical thinning compared to controls at
baseline when I correct with Monte Carlo but nothing survives with FDR.
Now, I would like to see if these cortical thinning patterns change over
time so I thought I should keep things consistent and use Monte Carlo for
the longitudinal analysis as well.

Is there any way of using Monte Carlo for LME? I read some suggestions in
emails that were sent 2 years ago but I was wondering if there are any
updates or if there is a guide with recommended steps?

Thank you so much!
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] Mass-Univariate LME - help please!

2019-07-21 Thread tom parker
External Email - Use Caution

Dear all,

I am currently running a Mass-Univariate LME analysis in Freesurfer. I have
some doubts about the last steps and I was wondering whether someone could
help me figure them out and also check what I have done so far (sorry for
the long email).

My study has 2 time points (baseline, follow-up), 3 groups (controls,
patients without cognitive problems, patients with cognitive problems) and
2 covariates of no interest (age, sex).
I am interested in looking at the interactions between group and time
(mainly whether the 2 patient groups show more cortical thinning over time
compared to controls).

These are the commands I have ran so far through terminal or in matlab:

1)
mris_preproc --qdec-long long.qdec.table.dat --target fsaverage --hemi lh
--meas thickness --out lh.thickness.mgh
mris_preproc --qdec-long long.qdec.table.dat --target fsaverage --hemi rh
--meas thickness --out rh.thickness.mgh

2)
mri_surf2surf --hemi lh --s fsaverage --sval lh.thickness.mgh --tval
lh.thickness_sm15.mgh --fwhm-trg 15 --cortex  --noreshape
mri_surf2surf --hemi rh --s fsaverage --sval rh.thickness.mgh --tval
rh.thickness_sm15.mgh --fwhm-trg 15 --cortex  --noreshape

3)
[Y,mri] = fs_read_Y('lh.thickness_sm15.mgh');
[Y,mri] = fs_read_Y('rh.thickness_sm15.mgh');

4)
lhsphere = fs_read_surf('fsaverage/surf/lh.sphere')
rhsphere = fs_read_surf('fsaverage/surf/rh.sphere')
lhcortex = fs_read_label('fsaverage/label/lh.cortex.label')
rhcortex = fs_read_label('fsaverage/label/rh.cortex.label')

5) Create X matrix in matlab, here is a sample:
intercept time  group2 group2*time group3 group3*time
age  sex
1 0   0  0  0
  0 41   1
1 2.42  0  0  0
  0 41   1
1 0   1  0  0
  0 53   1
1 2.51  2.5   0
  0 53   1
1 0   0  0  0
0 54   2
1 5.25  0  0  0
  0 54   2

5)
lhstats = lme_mass_fit_vw(X, [1], Y, ni, lhcortex);
rhstats = lme_mass_fit_vw(X, [1], Y, ni, rhcortex);

6)
I entered 3 contrasts separately to check the interaction group*time.
CM.C1 = [0 0 0 1 0 0 0 0]; this contrast will show if group 1 and 2 show a
different cortical thinning pattern over time
CM.C2 = [0 0 0 0 0 1 0 0]; this contrast will show if group 1 and 3 show a
different cortical thinning pattern over time
CM.C3 = [0 0 0 -1 0 1 0 0]; this contrast will show if group 2 and 3 show a
different cortical thinning pattern over time

7)
For each of the previous contrasts, i did the following:

F_lhstats = lme_mass_F(lhstats, CM);
F_rhstats = lme_mass_F(rhstats, CM);
fs_write_fstats(F_lhstats, mri,' sigL.mgh', 'sig');
fs_write_fstats(F_rhstats, mri,' sigR.mgh', 'sig');

mri.volsz(4) = 1
[detvtx,sided_pval,pth] =
lme_mass_FDR2(F_lhstats.pval,F_lhstats.sgn,lhcortex,0.05,0);
[detvtx,sided_pval,pth] =
lme_mass_FDR2(F_rhstats.pval,F_rhstats.sgn,rhcortex,0.05,0);

8)
fs_write_Y(sided_pval,mri,'spval_lh.mgh');
fs_write_Y(sided_pval,mri,'spval_rh.mgh');

mri_surfcluster --subject fsaverage --hemi lh --in spval_lh.mgh
--cwpvalthresh 0.05 --fdr 0.05 --sign pos --o lh_time_cluster  --sum
lh_time_cluster_sum
mri_surfcluster --subject fsaverage --hemi rh --in spval_rh.mgh
--cwpvalthresh 0.05 --fdr 0.05 --sign pos --o rh_time_cluster  --sum
rh_time_cluster_sum


*My questions are:*
- Is the order of the steps (1-8) correct?
- How can I visualize the significant FDR-corrected results?
- Is there any way I can apply a Monte Carlo correction using the generated
files?

Thank you so much!
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Mass-Univariate LME - help please!

2019-07-24 Thread tom parker
External Email - Use Caution

Dear Kersten,

Thank you so much for the quick reply! It was really helpful!!
I still have a couple of doubts regarding the visualization of the results
if you don't mind.

After running the last command *fs_write_Y(sided_pval,mri,'**spval_lh.mgh')*,
I tried to visualize the results with *tksurfer fsaverage lh inflated
-overlay spval_lh.mgh -fthresh 1.3* (1.3 was the pth value that came out
from lme_mass_FDR2) but there were no clusters on the surface.

If I run mri_surfcluster with spval_lh.mgh as input it seems there are 15
clusters, here is a sample of the first clusters that come out:
# ClusterNo  Max   VtxMax   Size(mm^2)  TalX   TalY   TalZNVtxs
WghtVtx
   11.000   8  22284.41 -2.28.6   -3.3  48988
46268.86
   21.000  140211   1542.44 -8.2  -16.7   58.6   3024
2633.36
   31.000   44065   1510.18-16.3  -71.7   -4.6   2078
1810.43
  (...)

Am I doing something wrong?

I also tried the spatiotemporal mass-univariate approach that you suggested
but matlab gets stuck with this command:
[lhRgs,lhRgMeans] = lme_mass_RgGrow(lhsphere,lhRe,lhTh0,lhcortex,2,95);

In the terminal it says:
"Starting region growing algorithm
Computing seeds ..."

Do you have any suggestions on how to solve this?

Thanks again for the help!


Hi Tom,

basically most of it looks OK to me, just a few remarks:

I assume that you deliberately chose the plain mass-univariate approach
instead of the potentially more powerful spatiotemporal mass-univariate
approach.

For the interpretation of the intercepts, if desired, it may be
advantageous to code sex as 0 and 1, and de-mean age. But that's not
strictly necessary.

I suspect that it's just a typo, so just for the sake of completeness: for
contrast estimation, I don't think that using CM.C1, CM.C2, etc. would
work, as the program expects a 'C' substructure. So instead, one would use
CM1.C, CM2.C etc for the different contrasts, if I am not mistaken.

About the mri_surfcluster command: if you want to do the FDR2 inference as
suggested by the LME tutorial, just use the 'pth' value as returned by the
lme_mass_FDR2 script for thresholding. I believe that you are mixing
different kinds of inference (traditional FDR, clusterwise) otherwise.

Finally, if you want to make corrected inferences for the whole cortex,
it's probably better to compute one (FDR2) threshold for both hemispheres
at once (see the very last part of the tutorial) instead of treating them
separately.

And regarding your specific questions:

The order is fine.

You can visualize the 'spval_lh.mgh' by first loading e.g. the
'lh.inflated' surface of the fsaverage template, and then adding
'spval_lh.mgh' as an overlay. Same with e.g. 'rh.inflated' for the
'spval_rh.mgh' file.

About the Monte Carlo correction for this type of analysis others may know
better, sorry.

Best regards,

Kersten

Missatge de tom parker  del dia dg., 21 de jul.
2019 a les 20:50:

> Dear all,
>
> I am currently running a Mass-Univariate LME analysis in Freesurfer. I
> have some doubts about the last steps and I was wondering whether someone
> could help me figure them out and also check what I have done so far (sorry
> for the long email).
>
> My study has 2 time points (baseline, follow-up), 3 groups (controls,
> patients without cognitive problems, patients with cognitive problems) and
> 2 covariates of no interest (age, sex).
> I am interested in looking at the interactions between group and time
> (mainly whether the 2 patient groups show more cortical thinning over time
> compared to controls).
>
> These are the commands I have ran so far through terminal or in matlab:
>
> 1)
> mris_preproc --qdec-long long.qdec.table.dat --target fsaverage --hemi lh
> --meas thickness --out lh.thickness.mgh
> mris_preproc --qdec-long long.qdec.table.dat --target fsaverage --hemi rh
> --meas thickness --out rh.thickness.mgh
>
> 2)
> mri_surf2surf --hemi lh --s fsaverage --sval lh.thickness.mgh --tval
> lh.thickness_sm15.mgh --fwhm-trg 15 --cortex  --noreshape
> mri_surf2surf --hemi rh --s fsaverage --sval rh.thickness.mgh --tval
> rh.thickness_sm15.mgh --fwhm-trg 15 --cortex  --noreshape
>
> 3)
> [Y,mri] = fs_read_Y('lh.thickness_sm15.mgh');
> [Y,mri] = fs_read_Y('rh.thickness_sm15.mgh');
>
> 4)
> lhsphere = fs_read_surf('fsaverage/surf/lh.sphere')
> rhsphere = fs_read_surf('fsaverage/surf/rh.sphere')
> lhcortex = fs_read_label('fsaverage/label/lh.cortex.label')
> rhcortex = fs_read_label('fsaverage/label/rh.cortex.label')
>
> 5) Create X matrix in matlab, here is a sample:
> intercept time  group2 group2*time group3
> group3*time   age  sex
> 1