Re: [Freesurfer] PALM Analysis

2019-09-19 Thread Nasiriavanaki, Zahra
Hi Doug

I wanted to follow up this email and ask you a question. I see in the fspalm 
page, it says "You can use fspalm with both volume- and surface-based analyses; 
it will figure everything out".
Considering your reply to the below email, I'm wondering if we can use fspalm 
for subcortical analysis or not?

I appreciate very much any comments on it.

Thanks
Mona



From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Greve, Douglas N.,Ph.D. 

Sent: Monday, September 2, 2019 10:32 PM
To: freesurfer@nmr.mgh.harvard.edu 
Subject: Re: [Freesurfer] PALM Analysis

Sorry, fsplam is only for surfaces.

On 9/2/2019 7:46 PM, Harikumar, Amritha wrote:
> Hi there,
>
> I am trying to run a Permutation Analysis of Linear Models (PALM) for 
> analyzing subcortical areas in the nucleus accumbens, caudate, and putamen. 
> Upon trying to run the script after reading the Freesurfer wiki, I am not 
> sure what it is referring to regarding applying fsPalm in MATLAB. My 
> questions are - do we a.) copy paste the existing fspalm command in Matlab 
> and run it after setting the two Freesurfer paths listed in the wiki, or what 
> is the correct procedure to run it? I tried running it in terminal as well, 
> but didn’t have any luck. My existing Matlab script has set up the two 
> Freesurfer paths, and is trying to run the fsPalm command for each 
> subcortical area of the three ROIs mentioned above, but that isn’t working 
> either. Any help in running fsPalm would be greatly appreciated!
>
> Thanks,
> Amritha
>
> Amritha Harikumar
> Clinical Research Coordinator
> Holt Emotion and Social Neuroscience Lab
> Department of Psychiatric Neuroimaging
> Martinos Center for Biomedical Imaging
> Massachusetts General Hospital
> ___
> 149 13th Street, Rm 2620A
> Charlestown, MA 02129
> Phone: 617-724-3283
>
>
>
>
> ___
> 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

Re: [Freesurfer] Obtaining MNI Coordinates for HCP annotations

2019-09-19 Thread Glasser, Matthew
External Email - Use Caution

I'll note that we don't recommend trying to represent cortical areas in general 
as single coordinates. We describe the issues with MNI space group average 
volume alignment in this publication, which illustrates what happens to the 
HCP's cortical areas using different alignment methods:

https://www.pnas.org/content/115/27/E6356.short

Matt.

On 9/19/19, 10:09 AM, "freesurfer-boun...@nmr.mgh.harvard.edu on behalf of 
Greve, Douglas N.,Ph.D."  wrote:

What space are they in? Typically, I tell people to run recon-all on the
mni152 volume, then map labels into that subject, then compute coords

On 9/13/19 3:00 PM, Dev vasu wrote:
>
> External Email - Use Caution
>
> Dear all,
>
> I would like to obtain MNI coordinates for HCP annotations , i have
> annotation files for both lh and rh ( which are attached ) , i would
> like to obtain MNI coordinates for them .
>
> I was going through the post
> 
https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2015-November/042446.html
> , but i could not get a better understanding on how to generate MNI
> values for each label in annot files , that i would like to use for
> graphical analysis.
>
>
> Thanks
> Vasudev
>
> ___
> 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



The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

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

Re: [Freesurfer] Recon-all on a cluster error

2019-09-19 Thread Greve, Douglas N.,Ph.D.
I don't really know myself. This part  runs a program from a 3rd party 
--  the MNI (n3 bias field correction); we did not write it so it  is 
hard for us to debug. We often have problems with this program, so 
unfortunately, it does not surprise me

On 9/19/19 12:42 PM, Lauricella, Michael wrote:
>  External Email - Use Caution
>
> Hi Doug,
>
> Ok I'll verify the creation of the symlink today. Thank you for following-up.
>
> Could you also maybe give me some details about what this termination status 
> means? : nu_correct: crashed while running nu_estimate_np_and_em (termination 
> status=256)
>
> Perhaps I can try to debug if I knew a little more. Sorry if this information 
> is easily available. I couldn't find what the termination status means.
>
> Best,
> Michael
>
> -Original Message-
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>  On Behalf Of Greve, Douglas N.,Ph.D.
> Sent: Thursday, September 19, 2019 7:41 AM
> To: freesurfer@nmr.mgh.harvard.edu; Dicamillo, Robert 
> 
> Subject: Re: [Freesurfer] Recon-all on a cluster error
>
> Not sure then. I've seen cases where the creation of symbolic links was not 
> possible on a cluster. It does not look like this is the problem, but it 
> could be doing something behind the scenes. Can you verify that you can 
> create a symlink from a program on the cluster? I've cc'ed Rob D who can help 
> debug this problem if it persists.
> doug
>
>
> On 9/17/19 1:57 PM, Lauricella, Michael wrote:
>>   External Email - Use Caution
>>
>> Hi Douglas,
>>
>> Yes it does fine. On the cluster, this same error happens for all subjects.
>>
>> Thank you for your help!
>>
>> Best,
>> Michael
>>
>> -Original Message-
>> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>>  On Behalf Of Greve, Douglas N.,Ph.D.
>> Sent: Tuesday, September 17, 2019 10:50 AM
>> To: freesurfer@nmr.mgh.harvard.edu
>> Subject: Re: [Freesurfer] Recon-all on a cluster error
>>
>> Does it run properly off the cluster for this data set?
>>
>> On 9/17/19 1:45 PM, Lauricella, Michael wrote:
>>>   External Email - Use Caution
>>>
>>> Dear Freesurfer Experts,
>>>
>>> I have a an error when running recon-all on a computing cluster. I've
>>> checked the environment and so have some of my more knowledgeable
>>> colleagues but we can't see anything wrong with the environment. I
>>> was wondering if anyone else has experienced difficulties like the
>>> one below when trying to run recon-all on a computing cluster and
>>> might have some advice. Error of my run is below and the full log
>>> file is attached. Thank you in advance for your help!
>>>
>>> "Iteration 1 Wed Aug  7 13:53:08 PDT 2019
>>>
>>> nu_correct -clobber ./tmp.mri_nu_correct.mni.18980/nu0.mnc
>>> ./tmp.mri_nu_correct.mni.18980/nu1.mnc -tmpdir
>>> ./tmp.mri_nu_correct.mni.18980/0/ -iterations 1000 -distance 50
>>>
>>> [mlauricella@qb3-id115:/mnt/freesurfer_subjs/SUBJECT_ID/mri/]
>>> [2019-08-07 13:53:08] running:
>>>
>>> /mnt/neuroimaging/FreeSurfer/V6.0.0/mni/bin/nu_estimate_np_and_em
>>> -parzen -log -sharpen 0.15 0.01 -iterations 1000 -stop 0.001 -shrink
>>> 4 -auto_mask -nonotify -b_spline 1.0e-7 -distance 50 -quiet -execute
>>> -clobber -nokeeptmp -tmpdir ./tmp.mri_nu_correct.mni.18980/0/
>>> ./tmp.mri_nu_correct.mni.18980/nu0.mnc
>>> ./tmp.mri_nu_correct.mni.18980/nu1.imp
>>>
>>> Assertion failed at line 742 in file templates/CachedArray.cc
>>>
>>> nu_estimate_np_and_em: crashed while running volume_stats
>>> (termination
>>> status=256)
>>>
>>> nu_correct: crashed while running nu_estimate_np_and_em (termination
>>> status=256)
>>>
>>> ERROR: nu_correct
>>>
>>> Linux qb3-id115 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19
>>> UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> recon-all -s SUBJECT_ID exited with ERRORS at Wed Aug  7 13:53:09 PDT
>>> 2019
>>>
>>> To report a problem, see
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__surfer.nmr.mgh.ha
>>> r
>>> vard.edu_fswiki_BugReporting=DwIF-g=iORugZls2LlYyCAZRB3XLg=LfvX
>>> l
>>> A0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWBOFxCVZA
>>> 3 8xYpWHKJOqIVGU=hZ8c1_TEb9oDCsFUiTaioaVn7pRCbIkq9BrlyHA-jps=
>>> >>  >"
>>>
>>> Best,
>>>
>>> Michael
>>>
>>>
>>> ___
>>> Freesurfer mailing list
>>> Freesurfer@nmr.mgh.harvard.edu
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.har
>>> v
>>> ard.edu_mailman_listinfo_freesurfer=DwIF-g=iORugZls2LlYyCAZRB3XLg
>>> &
>>> r=LfvXlA0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWB
>>> O
>>> FxCVZA38xYpWHKJOqIVGU=RJ3pNp6iSv3KoImUDqKyKKlfJax1r3VtjF-gcSU_E60
>>> =
>> ___
>> Freesurfer mailing list
>> 

Re: [Freesurfer] Recon-all on a cluster error

2019-09-19 Thread Lauricella, Michael
External Email - Use Caution

Hi Doug,

Ok I'll verify the creation of the symlink today. Thank you for following-up.

Could you also maybe give me some details about what this termination status 
means? : nu_correct: crashed while running nu_estimate_np_and_em (termination 
status=256)

Perhaps I can try to debug if I knew a little more. Sorry if this information 
is easily available. I couldn't find what the termination status means.

Best,
Michael

-Original Message-
From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Greve, Douglas N.,Ph.D.
Sent: Thursday, September 19, 2019 7:41 AM
To: freesurfer@nmr.mgh.harvard.edu; Dicamillo, Robert 

Subject: Re: [Freesurfer] Recon-all on a cluster error

Not sure then. I've seen cases where the creation of symbolic links was not 
possible on a cluster. It does not look like this is the problem, but it could 
be doing something behind the scenes. Can you verify that you can create a 
symlink from a program on the cluster? I've cc'ed Rob D who can help debug this 
problem if it persists.
doug


On 9/17/19 1:57 PM, Lauricella, Michael wrote:
>  External Email - Use Caution
>
> Hi Douglas,
>
> Yes it does fine. On the cluster, this same error happens for all subjects.
>
> Thank you for your help!
>
> Best,
> Michael
>
> -Original Message-
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>  On Behalf Of Greve, Douglas N.,Ph.D.
> Sent: Tuesday, September 17, 2019 10:50 AM
> To: freesurfer@nmr.mgh.harvard.edu
> Subject: Re: [Freesurfer] Recon-all on a cluster error
>
> Does it run properly off the cluster for this data set?
>
> On 9/17/19 1:45 PM, Lauricella, Michael wrote:
>>  External Email - Use Caution
>>
>> Dear Freesurfer Experts,
>>
>> I have a an error when running recon-all on a computing cluster. I've 
>> checked the environment and so have some of my more knowledgeable 
>> colleagues but we can't see anything wrong with the environment. I 
>> was wondering if anyone else has experienced difficulties like the 
>> one below when trying to run recon-all on a computing cluster and 
>> might have some advice. Error of my run is below and the full log 
>> file is attached. Thank you in advance for your help!
>>
>> "Iteration 1 Wed Aug  7 13:53:08 PDT 2019
>>
>> nu_correct -clobber ./tmp.mri_nu_correct.mni.18980/nu0.mnc
>> ./tmp.mri_nu_correct.mni.18980/nu1.mnc -tmpdir 
>> ./tmp.mri_nu_correct.mni.18980/0/ -iterations 1000 -distance 50
>>
>> [mlauricella@qb3-id115:/mnt/freesurfer_subjs/SUBJECT_ID/mri/]
>> [2019-08-07 13:53:08] running:
>>
>> /mnt/neuroimaging/FreeSurfer/V6.0.0/mni/bin/nu_estimate_np_and_em
>> -parzen -log -sharpen 0.15 0.01 -iterations 1000 -stop 0.001 -shrink 
>> 4 -auto_mask -nonotify -b_spline 1.0e-7 -distance 50 -quiet -execute 
>> -clobber -nokeeptmp -tmpdir ./tmp.mri_nu_correct.mni.18980/0/ 
>> ./tmp.mri_nu_correct.mni.18980/nu0.mnc
>> ./tmp.mri_nu_correct.mni.18980/nu1.imp
>>
>> Assertion failed at line 742 in file templates/CachedArray.cc
>>
>> nu_estimate_np_and_em: crashed while running volume_stats 
>> (termination
>> status=256)
>>
>> nu_correct: crashed while running nu_estimate_np_and_em (termination
>> status=256)
>>
>> ERROR: nu_correct
>>
>> Linux qb3-id115 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 
>> UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>>
>> recon-all -s SUBJECT_ID exited with ERRORS at Wed Aug  7 13:53:09 PDT
>> 2019
>>
>> To report a problem, see
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__surfer.nmr.mgh.ha
>> r 
>> vard.edu_fswiki_BugReporting=DwIF-g=iORugZls2LlYyCAZRB3XLg=LfvX
>> l
>> A0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWBOFxCVZA
>> 3 8xYpWHKJOqIVGU=hZ8c1_TEb9oDCsFUiTaioaVn7pRCbIkq9BrlyHA-jps=
>> >  >"
>>
>> Best,
>>
>> Michael
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.har
>> v 
>> ard.edu_mailman_listinfo_freesurfer=DwIF-g=iORugZls2LlYyCAZRB3XLg
>> & 
>> r=LfvXlA0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWB
>> O 
>> FxCVZA38xYpWHKJOqIVGU=RJ3pNp6iSv3KoImUDqKyKKlfJax1r3VtjF-gcSU_E60
>> =
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harv
> ard.edu_mailman_listinfo_freesurfer=DwIF-g=iORugZls2LlYyCAZRB3XLg&
> r=LfvXlA0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWBO
> FxCVZA38xYpWHKJOqIVGU=RJ3pNp6iSv3KoImUDqKyKKlfJax1r3VtjF-gcSU_E60=
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> 

[Freesurfer] fsPALM - Path Issue?

2019-09-19 Thread Harikumar, Amritha
Hello,

I had emailed the Freesurfer Forum a few weeks back about trying the PALM 
analysis for permutation testing. I recently tried fsPalm again on running some 
of our subcortical analyses for the caudate, putamen, and nucleus accumbens, 
and we performed the following steps:


  *   Set our respective ROIs (e.g. caudate, putamen, nucleus accumbens)
  *   Set the paths for fsPalm to run for each of the ROIs
  *   Ran mri_glmfit as noted in the Freesurfer Help documentation for fsPalm 
for the three ROIs

We ran into several issues. When we looked in the ‘run_palm.m’ output file 
under the subfolder for our first ROI that we tried to run PALM analysis for, 
it mentions ‘error in run_palm: zthresh = fast_p2z(pthresh)'. We are not sure 
where this function fast_p2z is supposed to be called from, as it is not 
located in any of the Matlab scripts when downloading the package for fsPalm 
(e.g. the palm-alpha115 file from Freesurfer). My question is - are we missing 
a path, or several paths that we have to put into the Matlab script, or does 
fsPalm no longer work for running such analyses? fsPalm has worked in the past 
for one of my colleagues using the palm-alpha112 file, but we are now having 
trouble running this using the palm-alpha115 file version. Any help would be 
greatly appreciated.

Thanks,
Amritha


Amritha Harikumar
Clinical Research Coordinator
Holt Emotion and Social Neuroscience Lab
Department of Psychiatric Neuroimaging
Martinos Center for Biomedical Imaging
Massachusetts General Hospital
___
149 13th Street, Rm 2620A
Charlestown, MA 02129
Phone: 617-724-3283



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

Re: [Freesurfer] Obtaining MNI Coordinates for HCP annotations

2019-09-19 Thread Greve, Douglas N.,Ph.D.
What space are they in? Typically, I tell people to run recon-all on the 
mni152 volume, then map labels into that subject, then compute coords

On 9/13/19 3:00 PM, Dev vasu wrote:
>
> External Email - Use Caution
>
> Dear all,
>
> I would like to obtain MNI coordinates for HCP annotations , i have 
> annotation files for both lh and rh ( which are attached ) , i would 
> like to obtain MNI coordinates for them .
>
> I was going through the post 
> https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2015-November/042446.html
>  
> , but i could not get a better understanding on how to generate MNI 
> values for each label in annot files , that i would like to use for 
> graphical analysis.
>
>
> Thanks
> Vasudev
>
> ___
> 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] issue with lesions

2019-09-19 Thread Greve, Douglas N.,Ph.D.
There is  not an easy way to do this. FS expects an intact whole brain, 
and it tries to fit such into every brain, ie, it is trying to force a 
whole cerebellum where there is none. What some people do is to fill the 
lesion with "reasonable" intensities, eg, from the contralateral side. 
Eg, you could left-right reverse the subject:
mri_convert orig.mgz --left-right-reverse-pix orig.lrrev.mgz
mri_coreg --mov orig.lrrev.mgz --targ orig.mgz --reg lrrev.lta
mri_vol2vol --mov orig.lrrev.mgz --targ orig.mgz --reg lrrev.lta --o 
orig.lrrev-in-orig.mgz
Then replace the voxels in the lesion in orig.mgz with voxels from 
orig.lrrev-in-orig.mgz and re-run
Let me know how it goes

On 9/18/19 6:52 PM, Sam W wrote:
>
> External Email - Use Caution
>
> Thanks Doug. The problem is that for some patients the lesion affects 
> the segmentation dramatically. For example I have one patient with a 
> large lesion in the right cerebellum which is partly in GM and partly 
> in WM. If I load the aseg file I see that a portion of the right 
> cerebellar hemisphere is assigned to the left cerebellar hemisphere 
> (the right white matter is also being assigned to the left hemisphere) 
> and the whole cerebellum looks distorted. I suppose there is no way to 
> inform freesurfer about the lesion during recon-all?
> I followed the steps in the FsTutorials for the cerebral cortex, but 
> how can I do the same for the cerebellum patient? What is the 
> recommended way to fix a bad segmentation due to cerebellum lesions? 
> Control points, white matter edits, or something else?
> Sam
>
> On Fri, Sep 6, 2019 at 4:28 PM Greve, Douglas N.,Ph.D. 
> mailto:dgr...@mgh.harvard.edu>> wrote:
>
> You can get the volume from the aseg.stats file. Unfortunately, we
> do not separate the lesions into left and right. You could do
> something like
> mri_binarize --i aseg.mgz --match 77 --o wmlesions.mgz
> mri_volcluster --i wmlesions.mgz --sum lesions.sum.dat --thmin 0.5
> --regheader subject
> This will output a list of lesions clusters in lesions.sum.dat and
> their coordinates. you can see which ones are left and with ones
> are right.
>
>
>
> On 9/3/2019 5:17 PM, Sam W wrote:
>>
>> External Email - Use Caution
>>
>> Hello,
>> I have run recon-all on T1 scans of patients with WM lesions. I
>> noticed however that for some patients the lesion is excluded
>> from aparc.a2009s+aseg.mgz but for other patients it is included
>> (and labelled as non-lesion).
>> Ultimately I'd like to extract a) volume information in WM and b)
>> volume information of the WM lesion. I think I can get the the WM
>> volume from the wmparc.stats file. For the lesion volume I think
>> I can take the WM-hypointensities from the aseg file right?
>> However I noticed that if a lesion is on the right hemisphere,
>> the Right-WM-hypointensities shows 0s in all columns, which
>> cannot be right.
>> I have a mask of the lesion (1s where lesion occurs, 0s
>> elsewhere) in anatomical space, can I use this mask somehow in FS
>> to inform recon-all where the lesion occurs?
>> Thanks in advance!
>> Sam
>>
>> ___
>> 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 mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Cortical thickness (spc) extraction

2019-09-19 Thread Greve, Douglas N.,Ph.D.
You can run corrections for multiple comparisons (mri_glmfit-sim) to get 
clusters of significant effects, then compute the mean over those clusters.

On 9/19/19 8:08 AM, AKUDJEDU, THEOPHILUS wrote:
>
> External Email - Use Caution
>
>
> Dear FreeSurfer,
>
> I used QDEC for the longitudinal two‐stage model analyses, where 
> temporal data within each subject was reduced to a symmetrised percent 
> rate of change (spc) maps using the/long_mris_slopes/function for data 
> acquired at two time-point. I observed an abnormal region with 
> different spc in patients relative to controls over time. *How do I 
> extract the spc for this region in each individual? What scripts do I 
> use?*
> Thanks
> Theo
>
>
>
> ___
> 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] qdec contrast and data extraction

2019-09-19 Thread Greve, Douglas N.,Ph.D.
If you are getting negative values, it probably means that your model 
(instantiated by the X matrix) is not proper in some ranges. The formula 
below extrapolates the effects of the covariates in order to subtract 
them off of a subject's value. If the model is not quite right, then the 
extrapolation will not be quite right, and you can get uninterpretable 
numbers. I don't have a solution for it.

On 9/18/19 11:56 AM, Maximo, Jose Omar wrote:
>
> External Email - Use Caution
>
> Hi,
>
> I tried that and it seemed to work. My averages between the 2 groups 
> look different now instead of almost identical. Thanks!
>
> I have another similar question. I have a cluster that shows a 
> significant difference between the groups when looking at volume. When 
> I look at the y.ocn.dat file, the values are in the 0.74188 - 2.16321 
> range, which are pretty low for volume. I found a post where it says 
> that you can multiply those values with the cluster size(mm^2) from 
> the summary file to convert them to volume. Then, I tried using the 
> formula you provided below (beta, res, yhat), but then I get some 
> negative values. Negative volumetric values do not make sense, so I 
> was thinking if using the absolute value would correct for that.
>
> Any thoughts?
>
> Thanks for all the help so far.
>
> >If you say y = ocn.dat, then
>
> >beta = (X'*X)*X'*y;
>
> >res = y - X*beta;
>
> >yhat = X(:,1:2)*beta(1:2) + res;
>
> >yhat will be a score for each subject with the nuisance variables removed.
>
> >
>
> >On 9/11/19 2:40 PM, Maximo, Jose Omar wrote:
>
> >
>
> >    External Email - Use Caution
>
> >
>
> >Hi,
> >
> >I plotted the data from the *.y.ocn.dat file and the graph still shows 
> no apparent significant difference between the groups (see attached 
> pic). Then I >found a post with the following:
> >
> /the ocn.dat files have data that is uncorrected in that sense and 
> might need to nuisance factors removed before plotting./
> /There is a design matrix in there (Xg.dat). You can load that into 
> matlab along with the ocn.dat, compute beta = inv(X'*X)*(X'*ocn)/
> /to get the betas. You can then compute yhat = X2*beta2 where X2 has 
> nuisance columns removed and beta2 has the same nuisance coefficients 
> removed, then treat yhat as your data to be plotted./
> >
> >I tried that since I have 2 nuisance factors (age and TICV) and want 
> to plot my significant cluster w/o any nuisance effects. This is what 
> I get
> >
>    1.8973
>    1.8973
>    1.8973
>    …
>    3.4728
>    3.4728
>    3.4728
>    …
> >Are these the mean averages for each group (cortical thickness). If so, is 
> there a way to get a score for each subject?
> >
> >Best,
> >Omar
>   >
> >Look  in the *.y.ocn.dat file.
> > 
> > From mri_glmfit-sim --help
> > 
> >csdbase.y.ocn.dat - this is a summary of the input (y) over each
> >cluster. It has a column for each cluster. Each row is a subject. The
> >value is the average of the input (y) in each cluster. This is a
> >simple text file.
> > 
> > 
> > 
> >On 9/3/2019 5:16 PM, Maximo, Jose Omar wrote:
> >/  External Email - Use Caution/
> >//
> >/Hi,/
> >//
> >/Which specific file should I load? I see cluster.mgh, 
> cluster.summary, sign.ocn.annot, sig.ocn.mgh, sig.vertex.mgh, and 
> pdf.dat./
> >//
> >/How can I extract the values from fsaverage space?/
> >//
> >/Basically, what is the correct way to extract values from these 
> significant clusters?/
> >//
> >/Many thanks,/
> >/Omar/
> >//
> >/  Date: Tue, 3 Sep 2019 15:15:02 +/
> >/  From: "Greve, Douglas N.,Ph.D."  >/
> >/  Subject: Re: [Freesurfer] qdec contrast and data extraction/
> >/  To: "freesurfer at nmr.mgh.harvard.edu 
> " 
>  >/
> >/  Message-ID: <2286f9bf-37a4-1be9-2252-0bccc833a218 at 
> mgh.harvard.edu 
> >/
> >/  Content-Type: text/plain; charset="utf-8"/
> >//
> >/      You might have done something wrong along the way. When you run 
> the montecarlo correction, it will create a file with the thickness 
> values in it for each cluster. the first thing to do is to load that 
> and see if you see the expected differences. The other thing is to not 
> go back into native space to extract the numbers. There are several 
> operations that happen as it moves into fsaverage space and in 
> preparation for group analysis (interpolation, and smoothing); 
> sometimes these make a big difference. if the ROI is small, it may not 
> map accurately back into the native space (and you should not need to 
> draw it in the first place)/
> >//
> >/  On 8/30/2019 11:36 AM, Maximo, Jose Omar wrote:/
> >//
> >/  External Email - Use Caution/
> >/  Hi,/
> >//
> >/  I have a question:/
> >//
> 

Re: [Freesurfer] Recon-all on a cluster error

2019-09-19 Thread Greve, Douglas N.,Ph.D.
Not sure then. I've seen cases where the creation of symbolic links was 
not possible on a cluster. It does not look like this is the problem, 
but it could be doing something behind the scenes. Can you verify that 
you can create a symlink from a program on the cluster? I've cc'ed Rob D 
who can help debug this problem if it persists.
doug


On 9/17/19 1:57 PM, Lauricella, Michael wrote:
>  External Email - Use Caution
>
> Hi Douglas,
>
> Yes it does fine. On the cluster, this same error happens for all subjects.
>
> Thank you for your help!
>
> Best,
> Michael
>
> -Original Message-
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>  On Behalf Of Greve, Douglas N.,Ph.D.
> Sent: Tuesday, September 17, 2019 10:50 AM
> To: freesurfer@nmr.mgh.harvard.edu
> Subject: Re: [Freesurfer] Recon-all on a cluster error
>
> Does it run properly off the cluster for this data set?
>
> On 9/17/19 1:45 PM, Lauricella, Michael wrote:
>>  External Email - Use Caution
>>
>> Dear Freesurfer Experts,
>>
>> I have a an error when running recon-all on a computing cluster. I've
>> checked the environment and so have some of my more knowledgeable
>> colleagues but we can't see anything wrong with the environment. I was
>> wondering if anyone else has experienced difficulties like the one
>> below when trying to run recon-all on a computing cluster and might
>> have some advice. Error of my run is below and the full log file is
>> attached. Thank you in advance for your help!
>>
>> "Iteration 1 Wed Aug  7 13:53:08 PDT 2019
>>
>> nu_correct -clobber ./tmp.mri_nu_correct.mni.18980/nu0.mnc
>> ./tmp.mri_nu_correct.mni.18980/nu1.mnc -tmpdir
>> ./tmp.mri_nu_correct.mni.18980/0/ -iterations 1000 -distance 50
>>
>> [mlauricella@qb3-id115:/mnt/freesurfer_subjs/SUBJECT_ID/mri/]
>> [2019-08-07 13:53:08] running:
>>
>> /mnt/neuroimaging/FreeSurfer/V6.0.0/mni/bin/nu_estimate_np_and_em
>> -parzen -log -sharpen 0.15 0.01 -iterations 1000 -stop 0.001 -shrink 4
>> -auto_mask -nonotify -b_spline 1.0e-7 -distance 50 -quiet -execute
>> -clobber -nokeeptmp -tmpdir ./tmp.mri_nu_correct.mni.18980/0/
>> ./tmp.mri_nu_correct.mni.18980/nu0.mnc
>> ./tmp.mri_nu_correct.mni.18980/nu1.imp
>>
>> Assertion failed at line 742 in file templates/CachedArray.cc
>>
>> nu_estimate_np_and_em: crashed while running volume_stats (termination
>> status=256)
>>
>> nu_correct: crashed while running nu_estimate_np_and_em (termination
>> status=256)
>>
>> ERROR: nu_correct
>>
>> Linux qb3-id115 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19
>> UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>>
>> recon-all -s SUBJECT_ID exited with ERRORS at Wed Aug  7 13:53:09 PDT
>> 2019
>>
>> To report a problem, see
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__surfer.nmr.mgh.har
>> vard.edu_fswiki_BugReporting=DwIF-g=iORugZls2LlYyCAZRB3XLg=LfvXl
>> A0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWBOFxCVZA3
>> 8xYpWHKJOqIVGU=hZ8c1_TEb9oDCsFUiTaioaVn7pRCbIkq9BrlyHA-jps=
>> >  >"
>>
>> Best,
>>
>> Michael
>>
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harv
>> ard.edu_mailman_listinfo_freesurfer=DwIF-g=iORugZls2LlYyCAZRB3XLg&
>> r=LfvXlA0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWBO
>> FxCVZA38xYpWHKJOqIVGU=RJ3pNp6iSv3KoImUDqKyKKlfJax1r3VtjF-gcSU_E60=
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_freesurfer=DwIF-g=iORugZls2LlYyCAZRB3XLg=LfvXlA0kIui4WmLLCYdWlZdLsYFY_HKuPRMZoERJi_o=lOOasQKo-5smKR_WagoWBOFxCVZA38xYpWHKJOqIVGU=RJ3pNp6iSv3KoImUDqKyKKlfJax1r3VtjF-gcSU_E60=
>
>
> ___
> 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] Cortical thickness (spc) extraction

2019-09-19 Thread AKUDJEDU, THEOPHILUS
External Email - Use Caution

Dear FreeSurfer,

I used QDEC for the longitudinal two‐stage model analyses, where temporal data 
within each subject was reduced to a symmetrised percent rate of change (spc) 
maps using the long_mris_slopes function for data acquired at two time-point. I 
observed an abnormal region with different spc in patients relative to controls 
over time. How do I extract the spc for this region in each individual? What 
scripts do I use?
Thanks
Theo

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