Re: [Freesurfer] FSFAST mkcontrast-sess with spmhrf 2 question

2016-03-13 Thread Joseph Dien
After a long break, back to this…

My goal is still to get the betas for the first and maybe second spm hrf so I 
can calculate a Calhoun derivative boost measure.

As a first step I ran:

mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh -fwhm 5 
-event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 1 -TR 2 
-refeventdur .25 -polyfit 2 -per-run -force -nuisreg nuisreg.dat 6 -tpexclude 
tpexclude.dat -b0dc

to use the SPM HRF with one derivative.

Then:

selxavg3-sess -sf sessidlistALL.dat -analysis RPA.sm05.lh

I got the following error:

ERROR: flac_evconw(): conVinc, Condition01 evrw dim mismatch
This condition has 2 regressors, but evrm has 1
Struct contents reference from a non-struct array object.

Error in flac_conmat (line 37)
if(nthcon > length(flac.con))

Error in flac_customize (line 369)
  flacnew = flac_conmat(flacnew,nthcon);

Error in fast_selxavg3 (line 65)
flac0 = flac_customize(flac0);
 
>> --
ERROR: fast_selxavg3() failed\n

This ran fine with spmhrf 0

based on your prior response below that:

"This is what happens. If you want to use the derivatives, 
then you need to spec -setwdelay. When you run the command, it will prompt you
for 3 values to use. If you spec 1 0 0, then it will be the same as the
default. If you want to test only the first derivative, then you would spec 0 1 
0. Note that the 3rd regressor is the 2nd derivative wrt time, not the first 
derivative wrt the dispersion parameter. You
cannot get the Calhoun 2004 value using a contrast (it is non-linear).”

I tried:

mkanalysis-sess -fsd bold -analysis RPA.sm05.lh -surface fsaverage lh -fwhm 5 
-event-related  -paradigm RPA1fix.par -nconditions 12 -spmhrf 1 -TR 2 
-refeventdur .25 -polyfit 2 -per-run -force -nuisreg nuisreg.dat 6 -tpexclude 
tpexclude.dat -b0dc -setwdelay

but I just got the error:

ERROR: Flag -setwdelay unrecognized.

I also tried using the flag when setting up the contrasts but that didn’t work 
either.

so not quite sure what I’m doing wrong.  I had understood from your response 
below that the contrast weights didn’t need to be changed from the spmhrf 0 
case but perhaps I misunderstood?

any help would be welcome!

Joe

> On Jul 10, 2013, at 13:58, Douglas N Greve  wrote:
> 
> 
> I was just thinking you could load the beta into matlab, make the 
> Calhoun computations on each condition, then compute the contrasts, then 
> write out the new volume
> 
> 
> On 07/10/2013 01:40 PM, Joseph Dien wrote:
>> Sounds good!
>> 
>> Regarding creating a new volume and computing contrasts from it, what 
>> do you mean?  I didn't follow that.
>> 
>> Thanks!
>> 
>> Joe
>> 
>> 
>> On Jul 10, 2013, at 1:33 PM, Douglas N Greve 
>> mailto:gr...@nmr.mgh.harvard.edu> 
>> >> wrote:
>> 
>>> 
>>> On 07/10/2013 01:29 PM, Joseph Dien wrote:
 Sorry, not following what you are suggesting?
 
 I want the second derivative for calculating the Calhoun et al 2004
 derivative boost measure.
 My understanding is that to the extent that the BOLD signal deviates
 from the canonical hrf, the amplitude of the primary regressor will be
 attenuated and the variance will instead end up in the first and
 second derivatives (to the extent that they are able to accommodate
 the divergence).  By using a Calhoun measure that incorporates both
 the first and second derivatives, in principle I'll have a BOLD
 measure that is more robust to deviations from the canonical hrf.
>>> Sorry, it had been a while since I read that paper. I did not know that
>>> they had a formulation that included the 2nd derivative.
 
 However, if the way FSFAST is calculating the second derivative
 regressor is resulting in loss of statistical power due to shared
 variance with the primary regressor, then it would be best to just not
 include it at all in the estimation step.
>>> I don't know how much it will hurt the power. You'd have to look at the
>>> efficiency.
>>> doug
>>> 
 
 
 On Jul 10, 2013, at 1:21 PM, Douglas N Greve
 mailto:gr...@nmr.mgh.harvard.edu> 
 > 
 >> 
 wrote:
 
> 
> Why not just create a new volume and then compute contrasts from 
> the new
> volume? What you are suggesting will work I think, but it leaves me a
> little nervous. The p-values will be meaningless.
> 
> 
> As for the 2nd derivative, I think it must be a numerical issue (it is
> not computed analytically). Why do you need the 2nd derivative?
> 
> doug
> 
> 
> 
> On 07/10/2013 12:47 PM, Joseph Dien wrote:
>> I'm thinking of generating a modified beta.nii.gz file where the
>> primary betas have been replaced with the Calhoun et al (2004)
>> derivative boost m

[Freesurfer] mri_glmfit-sim

2016-03-13 Thread John Anderson
Hi experts,

I am trying to correct the results of groups analysis using mri_glmfit-sim

the command is :

mri_glmfit-sim --glmdir lh_10mm --cache 3 pos --cwpvalthresh .0166

I receive the follwoing error :

 

ERROR: cannot find /usr/local/freesurfer/stable6/average/mult-comp-cor/fsaverage/lh/cortex/fwhm35/pos/th30/mc-z.csd

 

Thanks you for any suggestion!

 

 

Bests,
John 
___
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] labels

2016-03-13 Thread Bruce Fischl

Hi Trisanna

1. the .thresh labels have been thresholded with a p-value threshold that 
is "best" on our training set of manually/architectonically defined labels.


2. Hmmm, not sure, but we have stopped development on tksurfer. Can you try 
this on freeview? I can't remember if freeview allows changing thresholds 
in labels, but if not Ruopeng can add it to his list of feature requests


cheers
Bruce



On Sat, 12 Mar 2016, Trisanna Sprung-Much 
wrote:



Hi there
I have two questions regarding using the labels with tksurfer:

1. What exactly has been done to change the .label (e.g. lh BA44.label) to
.thresh.label (e.g. lh BA44.thresh.label?

2. The instructions on this page 

https://surfer.nmr.mgh.harvard.edu/fswiki/BrodmannAreaMaps

to overlay the labels and set the Min and Max do not seem to work for me - I
cannot seem to alter the Min from 2 and the Max from 5. Any thoughts as to
why?

thanks very much!

Trisanna


--
Ph.D. CandidateMcGill University
Integrated Program in Neuroscience
Psychology



___
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] General diffusion workflow questions: QC and extracting FA from subcortical structures

2016-03-13 Thread Elijah Mak
Dear Freesurfer Community,

1) I am just starting out on some diffusion analyses and I'd like to use
the dt_recon for this. Is there any information about a general workflow
for quality control for the outputs from dt_recon? From the tutorials, I
only see information about checking the registration.  In particular, I
would like to know how dt_recon cope with the occasional flipping/swapping
of some components of the diffusion gradient directions?

2) Another aim of mine is to quantify DTI indices in subcortical regions
segmented from the ASEG pipeline. How does Freesurfer handle partial
volumning via seg-erode in "mri_vol2vol"?

I have pasted my workflow below and I'd like to check if this is correct,
thanks!

1) After processing the scans on recon-all and dt_recon , i resample the
structural data to diffusion space

mri_vol2vol --mov subjectname/dtrecon/lowb.nii.gz
--targ subjectname/mri/aparc+aseg.mgz --inv --interp nearest
--o subjectname/mri/aparc+aseg2diff.mgz  --reg
subjectname/dtrecon/register.dat --no-save-reg

Should I use ASEG instead of APARC+ASEG or WMPARC (which also has labels
for the subcortical regions?)

2) Then, I mask the FA/MD maps with

mri_mask subjectname/dtrecon/fa.nii.gz  subjectname/mri/aparc+aseg2diff.mgz
subjectname/dtrecon/fa-masked_aparcaseg.mgz; done

3) Finally, I collect the FA in the regions with

mri_segstats --seg subjectname/mri/aparc+aseg2diff.mgz --ctab
$FREESURFER_HOME/FreeSurferColorLUT.txt
--i subjectname/dtrecon/fa-masked_aparcaseg.mgz --seg-erode 1
--sum subjectname/stats/fa_aparc+aseg2diff_segerode_1;done

Thanks a lot for your time and help!

Best Wishes,
Elijah

-- 

Elijah Mak

PhD Candidate *|* Psychiatry

University of Cambridge

Trinity College, Cambridge, CB2 1TQ
___
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.