Re: [Freesurfer] group analysis

2016-10-12 Thread charles laidi
Dear Douglas and Trisanna,

Thank you very much for your explanations.

I just would like to be sure of what I am doing since there is no example
on the wiki as complex as mine.

If I have the following classes :

Diagnosis : Patient or Control
Gender : Male or Female
Site : Site1 or Site2 or Site3

NregressorsDODS = Nclasses*(Nvariables+1) = 6*(0+1) = 2*2*3*(1+1) = 24
Regressor1: ones for PatientMaleSite1 subjects, 0 otherwise. Codes
intercept for Group 1
Regressor2: ones for PatientMaleSite2 subjects, 0 otherwise. Codes
intercept for Group 2
Regressor2: ones for PatientMaleSite3 subjects, 0 otherwise. Codes
intercept for Group 3

Regressor12: ones for ControlFemaleSite3 subjects, 0 otherwise. Codes
intercept for Group 12
Regressor13: age for PatientMaleSite1 subjects, 0 otherwise. Codes age
slope for Group 1
Regressor14: age for PatientMaleSite2 subjects, 0 otherwise. Codes age
slope for Group 2
...
Regressor24: age for ControlFemaleSite3 subjects, 0 otherwise. Codes age
slope for Group 12

*I assume my FSGDF file should look like : *

GroupDescriptorFile 1
Title analysis
Class PatientMaleSite1
Class PatientMaleSite2
Class PatientMaleSite3
Class PatientFemaleSite1
Class PatientFemaleSite2
Class PatientFemaleSite3
Class ControlMaleSite1
Class ControlMaleSite2
Class ControlMaleSite3
Class ControlFemaleSite1
Class ControlFemaleSite2
Class ControlFemaleSite3
Variables Age
Input subject1 PatientMaleSite1 30
Input subject2 PatientFemaleSite2 45
Input subject3 PatientFemaleSite3 85
Input subject4 PatientFemaleSite4 75
...

As for the contrast analysis :

If my question is : *is there a difference between Patient and Controls age
slope regressing out the effects of gender and site? *

*Contrast1 patient-control.slope.mtx*

0 0 0 0 0 0 0 0 0 0 0 0 0.5 0.5 0.5 0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 -0.5
-0.5

with all regressor1 to regressor12 equal to *0*
with regressor13 to 18 equal to *0.5  *(regressor with Patient in it)
with regressor19 to 24 equal to *- 0.5* (regressor with Controls in it)

If my question is :* is there a difference between cortical thickness in
patients and controls, regressing out the effects of age, gender and site ?
*

*Contrast2 patient-controls.mtx*

0.5 0.5 0.5 0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0 0 0 0 0 0 0 0 0 0 0
0

with all regressor1 to regressor6 equal to
*0.5*with all regressor7 to regressor12 equal to -*0.5*
with all regressor13 to regressor24 equal to *0*

Thank you very much in advance for your help and sorry for taking your
time.

Best,

Charles










2016-10-05 17:44 GMT+02:00 Douglas N Greve <gr...@nmr.mgh.harvard.edu>:

> This is a straightforward extension to the FSGD examples. You have 3
> discrete factors (2 diagnosis, 2 gender, 6 centers), this yields
> 2*2*6=24 classes. With one covariate, you would have 24 covariate
> regressors (one for each class) for a total of 48. You would then need
> to create a contrast matrix that tests for an interaction between
> diagnosis and age which is also a straight-forward extension to the
> examples.
>
> Having said that, I think that 48 regressors is a lot unless you have
> about 500 subjects. It is also possible to have a less agressive model
> and just have two regressors, one for each diagnosis. But you'd have to
> create the design matrix yourself as this is outside of the FSGD
> specification.
>
>
> On 10/05/2016 09:22 AM, charles laidi wrote:
> > Dear FreeSurfers,
> >
> > I would like to study the interaction between age and cortical
> > thickness in patients and controls.
> > My hypothesis is that there is an interaction and that cortical
> > thickness is decreasing faster with age in patients than in controls.
> > I have both Male and Female included in 6 different centers.
> > I would like to consider also Gender and Site (6 centers) as confounds.
> >
> > My understanding is that I should perform a surface based group
> > analysis with freesurfer.
> >
> > I am not able to find an example for my problem in the documentation
> > https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf2G0V
> >
> > Would anyone had some tips to build the Fsgd file and the contrast file ?
> >
> > Thank you very much in advance.
> >
> > Best,
> >
> > Charles
> >
> >
> >
> > ___
> > Freesurfer mailing list
> > Freesurfer@nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
> --
> 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.harva

[Freesurfer] group analysis

2016-10-05 Thread charles laidi
Dear FreeSurfers,

I would like to study the interaction between age and cortical thickness in
patients and controls.
My hypothesis is that there is an interaction and that cortical thickness
is decreasing faster with age in patients than in controls.
I have both Male and Female included in 6 different centers.
I would like to consider also Gender and Site (6 centers) as confounds.

My understanding is that I should perform a surface based group analysis
with freesurfer.

I am not able to find an example for my problem in the documentation
https://surfer.nmr.mgh.harvard.edu/fswiki/Fsgdf2G0V

Would anyone had some tips to build the Fsgd file and the contrast file ?

Thank you very much in advance.

Best,

Charles
___
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] How to create a figure for a scientific article

2014-03-03 Thread charles laidi
Dear Freesurfers,

I have just performed cerebellar segmentation with freesurfer. I checked
the segmentation was correct using freeview :
freeview -v t1_xxx/mri/aseg.mgz:colormap=lut:opacity=0.2

I would like to create a figure for my article. However, I'm not able to
find a way to highlight only cerebellar cortex /  white matter with
freeview, instead of having every label of other subcortical structures in
different colors.
I would like to have only the cerebellum colored. Could this be done with
freeview ?

Thanks a lot,

Charles
___
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] Fwd: --sum option in mri_segstats

2013-08-15 Thread charles laidi
Dear Freesurfers,

I have a problem using the mri_segstats function. I'm trying to get Intra
cranial volumes (ICV) from images that I have previously segmented. As I
have lots of images, I'm using this script :


foreach filename (*_conv)
mri_segstats --subject $(filename) --etiv-only --sum summaryfile
end


The script is working very well except for the -sum option :
I'm not able to find the summary file in my directory : the ICV are printed
in my Terminal but I don't get all the ICV in a summary file. My ultimate
goal is to import the ICV in an excel sheet...

My question is :
where can I find the summary file ? Should I specify after the -sum option
an existing text file ? I don't understand how the -sum option works.
Is there a function, like in asegstats2table, that allows to directly get
all the output of mri_segstats in a table ?

I wasn't able to find an answer to my question in freesurfer wiki or in the
mailing list messages.

Thanks a lot for your attention,

Best regards,

Charles
___
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] Cerebellar parcellation

2013-07-30 Thread charles laidi
Dear Freesurfers,

I would like to perform cerebellar parcellation on structural mri with
freesurfer. I asked if this was possible 6 months ago (see message below,
saying that this feature wasn't available for now).
I checked on freesurfer wiki the release notes about Freesurfer version
5.2.0 saying that new cortical parcellations and label were available.

Cortical, Cerebellar, Striatum Parcellation in MNI152 space found in
average/Yeo_JNeurophysiol11_MNI152,
average/Buckner_JNeurophysiol11_MNI152 and
average/Choi_JNeurophysiol12_MNI152. See README file in each directory
for more details. Note that these README files will be updated to reflect
minor improvements in parcellations beyond the publication wikipages.

My understanding is that cerebellar parcellation on structural mri is still
not available, could you tell me if I'm right ?
When I'm checking the link on the release notes it doesn't seems to concern
structural imaging.

Thanks a lot for your attention, sorry if my question seems obvious but I'm
not very familiar with freesurfer.

Charles


PS :
-answer :
Hi Charles,
that is true at the moment, although we are working on something that
should be ready relatively soon.

cheers
Bruce

-question :
Dear freesurfer,
I'm trying to perform parcellation on the cerebellum. After reading
closely freesurfer wiki and the questions related to this topic on the
mailing list, my understanding is that there is no way to perform fully
automted cerebellar parcellation on structural mri with freesurfer.
Could you tell me if I'm right ?

Thanks a lot for your attention

Charles
___
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] QA tools outliers, use of -gen-asegLUT

2013-01-18 Thread charles laidi
Dear freesurfers,

After reading the documentation on freesurfer web site and searching in the
mail archive I wasn't able to find an answer to my question.
I'm trying to perform cerebellar segmentation on 100 subjects.
The recon-all step went well : every t1 image finished without error when
I checked the recon-all log.
I checked the segmentation result with tmedit and tksurfer (following the
recommendation of freesurfer website). I wasn't able to find any problem.
After that I use the QA tool. Again, after looking at the snapshots the
result appeared correct to me. But for each t1 image, there were between 36
and 45 outliers. So I used the -gen-asegLUT option as suggested in the mail
archive (Please find the result below for a t1 image called as100351_conv),
but wasn't able to understand the result.
The questions I would like to ask you are :

1)What should I do to correct the outliers ?

2) I don't understand this message :
ERROR: Actual file order disagrees with common file order for subject
as100351_conv
and this command doesn't work recon-all -make all -subjid as100351_conv

3) I don't understand this message :
checking subcortical label: Left-Cerebellum-White-Matter, . +/- .
as100351_conv Left-Cerebellum-White-Matter value 1.209679200 is an
outlier (avg = . +/- .)...
The value that appears to be an outliers doesn't match with the value that
I found in Asegstats for Left-Cerebellum-White-Matter.

Thanks a lot for your help, have a nice weekend.

Charles Laidi. (medcharleslaidi (a t) gmail.com)

-
Running recon_checker on:
mercredi 16 janvier 2013, 22:47:04 (UTC+0100)
-
Most recent FreeSurfer version used to process this subject:
/i2bm/local/freesurfer/bin/recon-all
-
All FreeSurfer versions used to process this subject:
/i2bm/local/freesurfer/bin/recon-all
-
Checking all output files exist...
 Running command:
/home/charles/Bureau/QAtools_v1.1/recon_all_output_file_checker -subjid
as100351_conv -slog
/home/charles/Bureau/group_complique//as100351_conv/scripts/recon_checker.log
-sumlog
/home/charles/Bureau/group_complique//QA/recon_checker.ALL.summary.log
-outputfileorderfile /home/charles/Bureau/QAtools_v1.1/default_FOF_FSv5.1
 mri/rawavg.mgz last modified 2012-12-14 05:50:00.0 +0100
 mri/orig.mgz last modified 2012-12-14 05:50:06.0 +0100

 ERROR: Actual file order disagrees with common file order for subject
as100351_conv

 At least one step in the recon-all stream has been skipped or
 rerun out of order.  Run the following command to rerun any steps
 which were skipped or for which the output has been modified.

  recon-all -make all -subjid as100351_conv

 Alternatively, examine the ReconAllTable for your version of FreeSurfer
 to identify the recon-all step where the discrepancy is occuring and
rerun
 every recon-all step from that point forward.  This subject may have
been
 processed with a different version of FreeSurfer other than the version
 used to create the common file order file (based on v5.1 by default if
not
 specified by the user).  Consider generating an output file order file
for
 your specific dataset using the 'genoutputorderfile' flag.
 See the '-help' flag for details.

 actual order    common order:
 ..    .
 mri/rawavg.mgz    mri/rawavg.mgz
 mri/orig.mgz    mri/orig.mgz
 mri/transforms/talairach.xfm    mri/transforms/talairach.auto.xfm
 mri/transforms/talairach.auto.xfm    mri/transforms/talairach.xfm
 mri/nu.mgz    mri/nu.mgz
 mri/T1.mgz    mri/T1.mgz
 mri/brainmask.mgz    mri/brainmask.auto.mgz
 ..    .
-
Checking status log output...
Running command:
/home/charles/Bureau/QAtools_v1.1/recon_all_status_log_checker -subjid
as100351_conv -details -slog
/home/charles/Bureau/group_complique//as100351_conv/scripts/recon_checker.log
-sumlog
/home/charles/Bureau/group_complique//QA/recon_checker.ALL.summary.log
Using status log:
/home/charles/Bureau/QAtools_v1.1/default_status_log_FSv5.1.log

as100351_conv COMPLETE
-
Checking asegs for outliers...
Using asegLUT: test4
Running command:
/home/charles/Bureau/QAtools_v1.1/recon_all_aseg_outlier_checker -subjid
as100351_conv -LookupMeansFromFile test4 -slog
/home/charles/Bureau/group_complique//as100351_conv/scripts/recon_checker.log
-sumlog
/home/charles/Bureau/group_complique//QA/recon_checker.ALL.summary.log
checking subcortical label: Left-Cerebral-Exterior, 0 +/-
checking subcortical label: Left-Cerebral-White-Matter, . +/- .
checking subcortical label: Left-Cerebral-Cortex, . +/- .
checking subcortical label: Left-Lateral-Ventricle, . +/- .
as100351_conv Left-Lateral-Ventricle value .541890500 is an outlier
(avg = . +/- .)...
checking subcortical label: Left-Inf-Lat-Vent, . +/- .
as100351_conv Left-Inf-Lat-Vent value .025678500 is an outlier (avg = .
+/- .)...
checking subcortical label: Left

[Freesurfer] Checking cerebellar segmentations

2013-01-07 Thread charles laidi
Dear freesurfers,

I just finished cerebellar segmentation on almost 100 subjects. I have
read the usual checking procedure that should be performed on
freesurfer website. However I wasn't able to find if there is a
specific checking workflow that can be performed when freesurfer is
used for 100 / a lot of subjects.
For example FSL provides a tool called slicesdir that allows to check
segmentation faster.
Is there such a feature with freesurfer ?
What kind of checking would you recommend for cerebellar segmentation
on 100 subjects ?

Thank you very much and happy new year !

Charles
___
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] Parcellation of cerebellum.

2012-12-10 Thread charles laidi
Dear freesurfer,

I'm trying to perform parcellation on the cerebellum. After reading closely
freesurfer wiki and the questions related to this topic on the mailing
list, my understanding is that there is no way to perform fully automted
cerebellar parcellation on structural mri with freesurfer.
Could you tell me if I'm right ?

Thanks a lot for your attention

Charles
___
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] aseg.stats

2012-12-03 Thread charles laidi
Dear freesurfers.

I'm using freesurfer for two weeks. I'm currently trying to make a script
to get asegstats resultats for 100 patients.

I did this script in tcsh :

foreach filename (t1_)
asegstats2table --subjects ${filename} \
  --segno 12 18 14\
  --tablefile asegstats.txt
end

The problem is that at each loop, the n+1 subject replace the n subject, so
at the end I only have the asegstats for the last subject.

When I am replacing t1_ (it's a wild card) by t1_63537193
t1_18394856 the result is fine

so the question is : how to make a loop without over writing the n result
by the n+1 result

Thanks very much for you help

Sincerely yours,

Charles Laidi
___
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] selection of a restricted structure, easy question ?

2012-11-21 Thread charles laidi
Dear Freesurfers,

I already have some experiment in segmentation : I just used FSL to perform
cerebellar segmentation.
I wanted to know if it's possible to run segmentation on a restricted
structure (i.e cerebellum) instead of performing segmentation on the whole
brain. It ll be easier for me and eventually faster since I have a lot of
MRI. I know it's possible in FSL so my question is : can I do the same in
freesurfer ?

Thanks a lot,

Charles (Paris)
___
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.