It does not create a file with a single voxel. Below, prv.mgz is meant 
to represent the file that has all the voxels/vertices. Once you know 
the vertex no you are interested in, you extract it with the pvrvtx line.

On 12/5/19 12:47 PM, Barletta, Valeria wrote:
> I did what you suggested in your previous email:
>
> > That does not have the pvr in it. You can extract the pvr for that
> > vertex and add it as a column to the X matrix with
> > pvr = fast_vol2mat(MRIread('pvr.mgz'));
> > pvrvtx = pvr(:,vertexno+1);
>
> Which file shall I look like for the single voxel?
>
>
> ------------------------------------------------------------------------
> *From:* Greve, Douglas N.,Ph.D. <dgr...@mgh.harvard.edu>
> *Sent:* Thursday, December 5, 2019 12:40 PM
> *To:* Barletta, Valeria <vbarle...@mgh.harvard.edu>; Freesurfer 
> support list <freesurfer@nmr.mgh.harvard.edu>
> *Subject:* Re: [Freesurfer] Question on GLM - correlation
>
>
> On 12/4/19 11:51 AM, Barletta, Valeria wrote:
> > Ok I did it and did not get any .mgh file as a result.
> Did what?
> >
> > At this point I wonder, what is the best model to check for
> > correlation between my continuous outcome CME.mgh and the continuous
> > variable ficvf.mgh?
> > Shall I include ficvf.mgh as a regressor (pvr) and use the Contrast  1
> > 0 0   or shall I use a completely different method?
> >
> > Thanks, sorry for the long interaction...
> > ------------------------------------------------------------------------
> > *From:* Greve, Douglas N.,Ph.D. <dgr...@mgh.harvard.edu>
> > *Sent:* Tuesday, December 3, 2019 3:18 PM
> > *To:* Barletta, Valeria <vbarle...@mgh.harvard.edu>; Freesurfer
> > support list <freesurfer@nmr.mgh.harvard.edu>
> > *Subject:* Re: [Freesurfer] Question on GLM - correlation
> > That does not have the pvr in it. You can extract the pvr for that
> > vertex and add it as a column to the X matrix with
> > pvr = fast_vol2mat(MRIread('pvr.mgz'));
> > pvrvtx = pvr(:,vertexno+1);
> >
> > ps. Please remember to post to the list
> >
> > On 12/3/2019 1:29 PM, Barletta, Valeria wrote:
> >> Ok done. This is the Xg.mat
> >> 1    29
> >>      1    44
> >>      1    38
> >>      1    47
> >>      1    34
> >>      1    25
> >>      1    30
> >>      1    22
> >>      1    52
> >>      1    31
> >>      1    37
> >>      1    42
> >>      1    28
> >>      1    39
> >>      1    44
> >>      1    44
> >>      1    32
> >>      1    32
> >>      1    36
> >>      1    47
> >>      1    52
> >> And the cond(Xg'*Xg) is again: 3.0555e+04
> >> Looks like there is no extra column for the pvr in the Xg.mat
> >>
> >>
> >> 
> ------------------------------------------------------------------------
> >> *From:* Greve, Douglas N.,Ph.D. <dgr...@mgh.harvard.edu>
> >> <mailto:dgr...@mgh.harvard.edu>
> >> *Sent:* Tuesday, December 3, 2019 11:03 AM
> >> *To:* Barletta, Valeria <vbarle...@mgh.harvard.edu>
> >> <mailto:vbarle...@mgh.harvard.edu>; Freesurfer support list
> >> <freesurfer@nmr.mgh.harvard.edu> 
> <mailto:freesurfer@nmr.mgh.harvard.edu>
> >> *Subject:* Re: [Freesurfer] Question on GLM - correlation
> >> I'm not sure those condition numbers include the pvr. Try loading the
> >> Xg.mat into matlab and computing
> >> cond(Xg'*Xg)
> >> Make sure Xg has the extra column for the pvr
> >>
> >> On 12/3/2019 10:42 AM, Barletta, Valeria wrote:
> >>> Ok it worked.
> >>> So I tried with a non-zero vertex and I got:
> >>> Normalized matrix condition is 81.1382
> >>> Matrix condition is 30558.5
> >>> Found 149926 points in label.
> >>> Found 149926 voxels in mask
> >>> Saving mask to
> >>> 
> /autofs/space/lipari_001/users/valeria/NODDI/GLM//GLM_CME_ficvf_doug/rh_contrast-MS_CME_all_FIS_ICA1/mask.mgh
> >>> Reshaping mriglm->mask...
> >>> search space = 74490.928733
> >>> DOF = 18
> >>> Dumping voxel 1024 0 0 to
> >>> 
> /autofs/space/lipari_001/users/valeria/NODDI/GLM//GLM_CME_ficvf_doug/rh_contrast-MS_CME_all_FIS_ICA1/voxdump-1024-0-0
> >>>
> >>> ...and with a zero vertex and got:
> >>> Normalized matrix condition is 81.1382
> >>> Matrix condition is 30558.5
> >>> Found 149926 points in label.
> >>> Found 149926 voxels in mask
> >>> Saving mask to
> >>> 
> /autofs/space/lipari_001/users/valeria/NODDI/GLM//GLM_CME_ficvf_doug2/rh_contrast-MS_CME_all_FIS_ICA1/mask.mgh
> >>> Reshaping mriglm->mask...
> >>> search space = 74490.928733
> >>> DOF = 18
> >>> Dumping voxel 150252 0 0 to
> >>> 
> /autofs/space/lipari_001/users/valeria/NODDI/GLM//GLM_CME_ficvf_doug2/rh_contrast-MS_CME_all_FIS_ICA1/voxdump-150252-0-0
> >>>
> >>>
> >>>
> >>> 
> ------------------------------------------------------------------------
> >>> *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> >>> <mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
> >>> <freesurfer-boun...@nmr.mgh.harvard.edu>
> >>> <mailto:freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Greve,
> >>> Douglas N.,Ph.D. <dgr...@mgh.harvard.edu>
> >>> <mailto:dgr...@mgh.harvard.edu>
> >>> *Sent:* Monday, December 2, 2019 2:56 PM
> >>> *To:* freesurfer@nmr.mgh.harvard.edu
> >>> <mailto:freesurfer@nmr.mgh.harvard.edu>
> >>> <freesurfer@nmr.mgh.harvard.edu> 
> <mailto:freesurfer@nmr.mgh.harvard.edu>
> >>> *Subject:* Re: [Freesurfer] Question on GLM - correlation
> >>> oh, sorry, did not see the pvr. It could very well be the pvr that
> >>> is causing the patchiness. Unfortunately, you have to debug it
> >>> vertex by vertex. I would choose a few vertices (one with signal, on
> >>> without) and run mri_glmfit with --voxdump vertexno 0 0 This will
> >>> create a subfolder with the GLM for that vertex. I'm not sure what
> >>> to tell you to look for, but I would at least check the condition
> >>> numbers in each vertex. What is the nature of ficvf?
> >>>
> >>> On 12/2/2019 1:22 PM, Barletta, Valeria wrote:
> >>>> My other continuous variable is --pvr ${hemi}.ficvf.mgh
> >>>> Not sure about --no-prune, I found it in my script as a default...
> >>>> Shall I remove it?
> >>>> 
> ------------------------------------------------------------------------
> >>>> *From:* freesurfer-boun...@nmr.mgh.harvard.edu
> >>>> <mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
> >>>> <freesurfer-boun...@nmr.mgh.harvard.edu>
> >>>> <mailto:freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of
> >>>> Barletta, Valeria <vbarle...@mgh.harvard.edu>
> >>>> <mailto:vbarle...@mgh.harvard.edu>
> >>>> *Sent:* Friday, November 29, 2019 3:08 PM
> >>>> *To:* Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
> >>>> <mailto:freesurfer@nmr.mgh.harvard.edu>
> >>>> *Subject:* [Freesurfer] Question on GLM - correlation
> >>>> Dear Freesurfers,
> >>>> I am running glmfit to assess for correlation between y and another
> >>>> continue variable across the cortex (ficvf), correcting for the
> >>>> effect of age, using the command:
> >>>>
> >>>> mri_glmfit \
> >>>>   --y {surfname_cme}.mgh \
> >>>>   --fsgd {contrast}.fsgd \
> >>>>   --C {contrast}.mat \
> >>>>   --pvr ${hemi}.ficvf.mgh" \
> >>>>   --surf fsaverage $hemi \
> >>>>   --glmdir ${glm_dir}/${hemi}_contrast-${contrast}_${surfname_cme} \
> >>>>   --no-prune
> >>>>
> >>>> This is my matrix:
> >>>> 1 0 0
> >>>>
> >>>> And my fsgd file:
> >>>>
> >>>> Title CME
> >>>> Class MS
> >>>> Variable age
> >>>> Input MS069_R01_01  MS  29
> >>>> Input MS070_R01_02_R1year  MS  44
> >>>> Input MS072_R01_04  MS  38
> >>>> Input MS073_R01_05 MS 47
> >>>> Input MS075_R01_07_R1year MS 34
> >>>> Input MS076_R01_08 MS 25
> >>>> Input MS077_R01_09 MS 30
> >>>> Input MS078_R01_10 MS 22
> >>>> Input MS080_R01_12 MS 52
> >>>> Input MS081_R01_13 MS 31
> >>>> Input MS082_R01_14 MS 37
> >>>> Input MS084_R01_16 MS 42
> >>>> Input MS086_R01_18 MS 28
> >>>> Input MS087_R01_19_R1year MS 39
> >>>> Input MS088_R01_20 MS 44
> >>>> Input MS089_R01_29 MS 44
> >>>> Input MS090_R01_21 MS 32
> >>>> Input MS091_R01_22 MS 32
> >>>> Input MS092_R01_23 MS 36
> >>>> Input MS094_R01_25 MS 47
> >>>> Input MS104_R01_36 MS 52
> >>>>
> >>>>
> >>>> This is the result:
> >>>>
> >>>>
> >>>> Am I proceeding correctly?
> >>>>
> >>>> Thank you,
> >>>> Valeria
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Freesurfer mailing list
> >>>> Freesurfer@nmr.mgh.harvard.edu  
> <mailto: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

Reply via email to