Re: [Freesurfer] mri_glmfit will not use mask or label
External Email - Use Caution Thank you, that worked perfectly! Best, Jen On Wed, Jun 26, 2019 at 5:27 PM Greve, Douglas N.,Ph.D. < dgr...@mgh.harvard.edu> wrote: > Try running it without --cortex > > On 6/26/19 4:57 PM, Jennifer Legault wrote: > > > > External Email - Use Caution > > > > Hi Freesurfer experts, > > > > I'm trying to constrain my sMRI analysis to only search for brain > > regions (GMV) that are correlated with a behavioral measure within a > > mask (made from a functional contrast of interest, so that I'm only > > searching for regions that were shown to be active during a language > > localizer task) using mri_glmfit. I've followed recommended steps to > > transforming my fMRI contrast into a surface mask, and then later even > > tried making it into a surface label, however whenever I run the > > analysis, I get the same results regardless of whether I use the > > --mask or --label option, meaning that the summary file > > (cache.th40.pos.sig.cluster.summary) includes regions that are outside > > the mask. How can I ensure that mri_glmfit actually uses the mask? > > I've included below the commands I have run. > > > > I previously ran mri_glmfit to search the whole brain for regions > > significantly correlated with behavioral measures using the following > > command: > > mri_glmfit --y fsgd_VSL_std_age_gender_TIV.volume.00B.mgh --fsgd > > fsgd_VSL_std_age_gender_TIV.txt --C Contrast_VSL_std_a_g_TIV.txt > > --surf fsaverage lh --cortex --glmdir lh.VSL_std_age_gender_TIV.glmdir > > > > Now, when I try to use the mask, I get the same results as above > > (significant result in regions outside of mask), using the following > > command: > > mri_glmfit --y fsgd_VSL_std_age_gender_TIV.volume.00B.mgh --mask > > localizer_mask.mgh --fsgd fsgd_VSL_std_age_gender_TIV.txt --C > > Contrast_VSL_std_a_g_TIV.txt --surf fsaverage lh --cortex --glmdir > > lh.VSL_std_age_gender_TIV_localizer_mask.glmdir > > > > I also converted the mask into a label just in case, and used the > > following command: > > mri_glmfit --y fsgd_VSL_std_age_gender_TIV.volume.00B.mgh --label > > /freesurfer/fsaverage/label/LeftMidAntTemp_surf.label --fsgd > > fsgd_VSL_std_age_gender_TIV.txt --C Contrast_VSL_std_a_g_TIV.txt > > --surf fsaverage lh --cortex --glmdir > > lh.VSL_std_age_gender_TIV_localizer_label.glmdir > > > > Across all these conditions, I always get the same results (even if > > the significant region is outside of the mask). Are there any > > recommendations for steps I should take to make sure I'm only > > searching for regions inside the mask? > > > > Best, > > > > Jen > > -- > > > > Jennifer Legault > > PhD, Neuroscience > > Postdoctoral Scholar > > Language Acquisition and Brain Lab > > University of Delaware > > > > _______ > > 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 -- Jennifer Legault PhD, Neuroscience Postdoctoral Scholar Language Acquisition and Brain Lab University of Delaware ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] mri_glmfit will not use mask or label
External Email - Use Caution Hi Freesurfer experts, I'm trying to constrain my sMRI analysis to only search for brain regions (GMV) that are correlated with a behavioral measure within a mask (made from a functional contrast of interest, so that I'm only searching for regions that were shown to be active during a language localizer task) using mri_glmfit. I've followed recommended steps to transforming my fMRI contrast into a surface mask, and then later even tried making it into a surface label, however whenever I run the analysis, I get the same results regardless of whether I use the --mask or --label option, meaning that the summary file (cache.th40.pos.sig.cluster.summary) includes regions that are outside the mask. How can I ensure that mri_glmfit actually uses the mask? I've included below the commands I have run. I previously ran mri_glmfit to search the whole brain for regions significantly correlated with behavioral measures using the following command: mri_glmfit --y fsgd_VSL_std_age_gender_TIV.volume.00B.mgh --fsgd fsgd_VSL_std_age_gender_TIV.txt --C Contrast_VSL_std_a_g_TIV.txt --surf fsaverage lh --cortex --glmdir lh.VSL_std_age_gender_TIV.glmdir Now, when I try to use the mask, I get the same results as above (significant result in regions outside of mask), using the following command: mri_glmfit --y fsgd_VSL_std_age_gender_TIV.volume.00B.mgh --mask localizer_mask.mgh --fsgd fsgd_VSL_std_age_gender_TIV.txt --C Contrast_VSL_std_a_g_TIV.txt --surf fsaverage lh --cortex --glmdir lh.VSL_std_age_gender_TIV_localizer_mask.glmdir I also converted the mask into a label just in case, and used the following command: mri_glmfit --y fsgd_VSL_std_age_gender_TIV.volume.00B.mgh --label /freesurfer/fsaverage/label/LeftMidAntTemp_surf.label --fsgd fsgd_VSL_std_age_gender_TIV.txt --C Contrast_VSL_std_a_g_TIV.txt --surf fsaverage lh --cortex --glmdir lh.VSL_std_age_gender_TIV_localizer_label.glmdir Across all these conditions, I always get the same results (even if the significant region is outside of the mask). Are there any recommendations for steps I should take to make sure I'm only searching for regions inside the mask? Best, Jen -- Jennifer Legault PhD, Neuroscience Postdoctoral Scholar Language Acquisition and Brain Lab University of Delaware ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] How to convert a functional FSL mask to an anatomical Freesurfer mask
External Email - Use Caution Hi Freesurfer experts, We ran a functional language localizer analysis in FSL and we want to apply the mask from this analysis to our SMRI analyses using the mri_glmfit command with the --mask option. Basically, we want to examine whether GMV within these language localizer regions is correlated with performance on various tasks. I previously used mri_convert to convert the .nii file to .mgh, and tried to run the mri_glmfit --mask command but received an error (ERROR: dimension mismatch 1 between y and mask) which I believe is linked to the fact that the previously run mris_preproc files are 4D, while our functional mask is still only 3D. When I use tksurfer and overlay the 3D mask file, it looks fine. So the question is how can we convert our 3D functional mask into a format that we can use for the mri_glmfit command (Nverteces x 1 x 1 x Nsubjects)? Thanks for all your help! Best, Jen -- Jennifer Legault PhD, Neuroscience Postdoctoral Scholar Language Acquisition and Brain Lab University of Delaware ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Error with FSGD format
External Email - Use Caution Hi Freesurfer experts, I am trying to run the mris_preproc command, however I keep getting the following error: ERROR: format for not recognized. Even when I create files in linux (using vi), TextEdit, or Notepad, and make sure that there are no extra spaces at the end of lines, I still get this error. I am attaching one such file here. Any feedback would be greatly appreciated. Best, Jen -- Jennifer Legault PhD, Neuroscience Postdoctoral Scholar Language Acquisition and Brain Lab University of Delaware GroupDescriptorFile 1 Title fsgd_blast_adult_Flanker_std_age_gender_TIV_3 Class Adult_Male Class Adult_Female Variables Age eTIV Flanker Input sub-blasta001 Adult_Female 20.3 1519375.56 91 Input sub-blasta002 Adult_Female 18.8 1246388.834 96 Input sub-blasta004 Adult_Female 20.11 1611127.753 86 Input sub-blasta005 Adult_Male 19.1 1705967.843 69 Input sub-blasta006 Adult_Male 20.11 1697488.775 64 Input sub-blasta007 Adult_Female 19 1475101.666 80 Input sub-blasta008 Adult_Male 20.9 1710770.518 97 Input sub-blasta010 Adult_Female 20.1 1393388.175 86 Input sub-blasta011 Adult_Male 19.11 1575672.739 102 Input sub-blasta012 Adult_Female 20.5 1383088.75 80 Input sub-blasta013 Adult_Female 19.3 1498737.325 85 Input sub-blasta014 Adult_Female 20.4 1501772.058 86 Input sub-blasta015 Adult_Female 20.9 1376029.551 92 Input sub-blasta017 Adult_Male 20.3 1911914.898 86 Input sub-blasta018 Adult_Female 20 1456518.01 91 Input sub-blasta020 Adult_Female 20.1 1573431.238 91 Input sub-blasta022 Adult_Male 20.6 1489364.138 161 Input sub-blasta024 Adult_Female 21.8 1597088.591 86 Input sub-blasta025 Adult_Female 19.2 1481870.779 64 Input sub-blasta026 Adult_Female 23.7 1526005.006 93___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Is it possible to run a conjunction analysis on longitudinal sMRI data in Freesurfer?
Hi Freesurfer experts, I'm wondering if it's possible to do a conjunction analysis on sMRI data in Freesurfer. I would like to compare longitudinal results from 2 experimental training groups and 1 control, where I can examine: 1) which regions underwent structural changes in both of the experimental groups as compared to the control and 2) experimental condition-specific changes between the groups when accounting for the normal amount of change expected (the controls). Of course, if you know of a better analysis to run to examine these questions, any feedback would be greatly appreciated. I have previously preprocessed the data using Freesurfer's longitudinal pipeline and I've run univariate LMEs using Freesurfer to compare each of the experimental groups to the control group separately. Do you know if I can I use mri_concat with the --conjunct option using the .sig files from the LME analyses, given that these are structural MRI data? I've only ever seen these analyses being done with fMRI data. Thank you for taking the time to read this email. Best, Jennifer Legault -- Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University ___ 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] mri_glmfit error: Matrix is ill-conditioned or badly scaled
Hi Doug, Thank you for your response. The current fsgd file I sent you was with the covariates demeaned x 100, as I saw you recommend that to someone else. We previously tried doing just the demeaned values without multiplying by 100, and that still had the badly scaled error. Do you think we should take the demeaned x 100 covariates and divide them by the standard deviation? Or would it be better to take regular demeaned values and divide them by the standard deviation? Best, Jennifer Legault On Mon, Jul 18, 2016 at 12:43 PM, Douglas N Greve <gr...@nmr.mgh.harvard.edu > wrote: > This is almost surely a problem with scaling as your covariates are > huge. Try subtracting the mean and dividing by the stddev before > entering into the FSGD file. Compute the means and stddevs across all > subjects. > doug > > On 07/11/2016 03:20 PM, Jennifer Legault wrote: > > Hi Freesurfer Experts, > > > > I am trying to run mri_glmfit and while 90% of my files work, some of > > them display the error below. I have tried demeaning, and then tried > > multiplying this value by 100, and I still get the same error. Any > > feedback would be greatly appreciated. > > > > mris_preproc done > > srcsubject = fsaverage > > srcval = rh.mono_EnglishParityRT_age_gender_TIV.volume.00.mgh > > srctype= > > trgsubject = fsaverage > > trgval = rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh > > trgtype= > > srcsurfreg = sphere.reg > > trgsurfreg = sphere.reg > > srchemi= rh > > trghemi= rh > > frame = 0 > > fwhm-in= 0 > > fwhm-out = 0 > > label-src = (null) > > label-trg = (null) > > OKToRevFaceOrder = 1 > > Reading source surface reg > > /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/surf/rh.sphere.reg > > Loading source data > > INFO: trgsubject = srcsubject > > Saving target data > > Saving to rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh > > gdfReadHeader: reading > > > /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd > > INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done. > > Continuous Variable Means (all subjects) > > 0 Age 19.5833 1.32025 > > 1 eTIV 1.61645e+06 145343 > > 2 EnglishParityRT 0.00012207 25139.1 > > Class Means of each Continuous Variable > > 1 Monolingual_male 19.7143 1678946.5893 -4197.2796 > > 2 Monolingual_female 19.4000 1528966.6750 5876.1917 > > INFO: gd2mtx_method is dods > > Reading source surface > > /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/surf/rh.white > > Number of vertices 163842 > > Number of faces327680 > > Total area 65020.765625 > > AvgVtxArea 0.396850 > > AvgVtxDist 0.717994 > > StdVtxDist 0.193566 > > > > $Id: mri_glmfit.c,v 1.196.2.8 2012/11/01 18:51:41 greve Exp $ > > cwd /gpfs/scratch/jtl190/Math_reconstruction > > cmdline mri_glmfit --y > > rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh --fsgd > > > /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd > > --C > > > /gpfs/scratch/jtl190/Contrast_files/Contrast_math_monly_EnglishParityRT_a_g_TIV.txt > > --surf fsaverage rh --cortex --glmdir > > rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir > > sysname Linux > > hostname cyberstar129.hpc.rcc.psu.edu > > <http://cyberstar129.hpc.rcc.psu.edu> > > machine x86_64 > > user jtl190 > > FixVertexAreaFlag = 1 > > UseMaskWithSmoothing 1 > > OneSampleGroupMean 0 > > y > > > /gpfs/scratch/jtl190/Math_reconstruction/rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh > > logyflag 0 > > usedti 0 > > FSGD > > > /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd > > labelmask > > /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/label/rh.cortex.label > > maskinv 0 > > glmdir rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir > > IllCondOK 0 > > ReScaleX 1 > > DoFFx 0 > > Creating output directory > > rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir > > Loading y from > > > /gpfs/scratch/jtl190/Math_reconstruction/rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh > > INFO: gd2mtx_method is dods > > Saving design matrix to > > rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir/Xg.dat > > Normalized matrix condition is 22568.9 > > Design matrix -- > > 1.000 0.000 18.000 0.000 1865790.250 0.000 -8952.208 0.000; > > 0.000 1.000 0.
[Freesurfer] mri_glmfit error: Matrix is ill-conditioned or badly scaled
Hi Freesurfer Experts, I am trying to run mri_glmfit and while 90% of my files work, some of them display the error below. I have tried demeaning, and then tried multiplying this value by 100, and I still get the same error. Any feedback would be greatly appreciated. mris_preproc done srcsubject = fsaverage srcval = rh.mono_EnglishParityRT_age_gender_TIV.volume.00.mgh srctype= trgsubject = fsaverage trgval = rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh trgtype= srcsurfreg = sphere.reg trgsurfreg = sphere.reg srchemi= rh trghemi= rh frame = 0 fwhm-in= 0 fwhm-out = 0 label-src = (null) label-trg = (null) OKToRevFaceOrder = 1 Reading source surface reg /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/surf/rh.sphere.reg Loading source data INFO: trgsubject = srcsubject Saving target data Saving to rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh gdfReadHeader: reading /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done. Continuous Variable Means (all subjects) 0 Age 19.5833 1.32025 1 eTIV 1.61645e+06 145343 2 EnglishParityRT 0.00012207 25139.1 Class Means of each Continuous Variable 1 Monolingual_male 19.7143 1678946.5893 -4197.2796 2 Monolingual_female 19.4000 1528966.6750 5876.1917 INFO: gd2mtx_method is dods Reading source surface /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/surf/rh.white Number of vertices 163842 Number of faces327680 Total area 65020.765625 AvgVtxArea 0.396850 AvgVtxDist 0.717994 StdVtxDist 0.193566 $Id: mri_glmfit.c,v 1.196.2.8 2012/11/01 18:51:41 greve Exp $ cwd /gpfs/scratch/jtl190/Math_reconstruction cmdline mri_glmfit --y rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh --fsgd /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd --C /gpfs/scratch/jtl190/Contrast_files/Contrast_math_monly_EnglishParityRT_a_g_TIV.txt --surf fsaverage rh --cortex --glmdir rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir sysname Linux hostname cyberstar129.hpc.rcc.psu.edu machine x86_64 user jtl190 FixVertexAreaFlag = 1 UseMaskWithSmoothing 1 OneSampleGroupMean 0 y /gpfs/scratch/jtl190/Math_reconstruction/rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh logyflag 0 usedti 0 FSGD /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd labelmask /gpfs/scratch/jtl190/Math_reconstruction/fsaverage/label/rh.cortex.label maskinv 0 glmdir rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir IllCondOK 0 ReScaleX 1 DoFFx 0 Creating output directory rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir Loading y from /gpfs/scratch/jtl190/Math_reconstruction/rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh INFO: gd2mtx_method is dods Saving design matrix to rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir/Xg.dat Normalized matrix condition is 22568.9 Design matrix -- 1.000 0.000 18.000 0.000 1865790.250 0.000 -8952.208 0.000; 0.000 1.000 0.000 19.000 0.000 1520429.625 0.000 -4605.208; 1.000 0.000 19.000 0.000 1749716.750 0.000 -39407.207 0.000; 0.000 1.000 0.000 18.000 0.000 1589109.250 0.000 -17967.209; 1.000 0.000 21.000 0.000 1472295.125 0.000 19531.791 0.000; 1.000 0.000 18.000 0.000 1580381.375 0.000 -17027.209 0.000; 1.000 0.000 20.000 0.000 1813373.500 0.000 16152.792 0.000; 1.000 0.000 21.000 0.000 1638616.500 0.000 -9074.208 0.000; 0.000 1.000 0.000 21.000 0.000 1297920.500 0.000 61860.793; 0.000 1.000 0.000 18.000 0.000 1634762.625 0.000 -22671.209; 0.000 1.000 0.000 21.000 0.000 1602611.375 0.000 12763.792; 1.000 0.000 21.000 0.000 1632452.625 0.000 9395.292 0.000; ERROR: matrix is ill-conditioned or badly scaled, condno = 22568.9 Possible problem with experimental design: Check for duplicate entries and/or lack of range of continuous variables within a class. If you seek help with this problem, make sure to send: 1. Your command line: mri_glmfit --y rh.mono_EnglishParityRT_age_gender_TIV.volume.00B.mgh --fsgd /gpfs/scratch/jtl190/FSGD_files/fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd --C /gpfs/scratch/jtl190/Contrast_files/Contrast_math_monly_EnglishParityRT_a_g_TIV.txt --surf fsaverage rh --cortex --glmdir rh.mono_EnglishParityRT_age_gender_TIV_100.glmdir 2. The FSGD file (if using one) 3. And the design matrix above I am also attaching the FSGD file. Best, Jennifer Legault fsgd_math_mono_EnglishParityRT_age_gender_TIV_demean100.fsgd Description: Binary data ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Re: [Freesurfer] How to view entire brain results in Freeview for LME data
Apologies for likely using the wrong term. I meant to say that I've done the cluster-thresholding for the surface data, using the mri_surfcluster command with annot -aparc as an argument. On Fri, Apr 8, 2016 at 1:03 PM, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote: > This is what I don't understand: "done the cluster-thresholding for the aparc > data" > > The aparc data is an ROI and so you should not have (could not have) > done clusterwise thresholding (?) > > On 04/08/2016 12:57 PM, Jennifer Legault wrote: >> Hi Doug, >> >> I'm currently running the LME mass-univariate analysis (I've >> previously conducted the LME univariate analyses with ROIs with little >> to no problems) and, thanks to your help, have run my data through >> this analysis and done the cluster-thresholding for the aparc data but >> not the aseg data (since I'm not sure how to cluster-threshold the >> segmented data--any advice you have would be greatly appreciated). Is >> there a way to view the significant voxels overlaid on the >> aseg+aparc.mgz in fsaverage for the whole brain? >> >> Best, >> >> Jen >> >> On Fri, Apr 8, 2016 at 12:36 PM, Douglas N Greve >> <gr...@nmr.mgh.harvard.edu> wrote: >>> >>> On 04/01/2016 04:44 PM, Jennifer Legault wrote: >>>> Hi Doug, >>>> >>>> Thanks for your quick response! When running the LME mass univariate >>>> analysis, I am assuming this also includes subcortical structures, >>>> correct? >>> Which processing are you doing? It should be obvious if you are doing >>> surface-based or ROI-based analysis. >>>> From my understanding, subcortical areas are segmented as opposed to >>>> parcellated. The main thing I want to examine all the regions of the >>>> brain that might change over time (as a function of the training task >>>> I've given my participants), so I would look at both the aparc and the >>>> aseg data, right? >>> Yes, you can. >>>> Apologies if I've misunderstood your question. For the aseg data, I >>>> am currently having trouble with figuring out how to cluster threshold >>>> the data (do i use mri_surfcluster with an argument to call the aseg >>>> annotation or do I use mri_volcluster?) I would then want to visualize >>>> the cluster thresholded data for subcortical structures in freeview. >>> If you are doing an ROI analysis then there is no clustering. >>>> Optimally, I would like to find some way to look at the whole brain in >>>> Freeview to see these regions that have changed as a function of my >>>> training task. >>> If you have a value for each ROI (segmentation and/or parcellation), >>> then you can read in aseg+aparc.mgz in fsaverage (apas = >>> MRIread('aparc+aseg.mgz')), then find all the voxels that belong to a >>> given ROI and assign them the value for the ROI, then write it out, then >>> view the output as an overlay on orig.mgz >>> >>>> Best, >>>> >>>> Jen >>>> >>>> On Fri, Apr 1, 2016 at 11:23 AM, Douglas N Greve >>>> <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote: >>>> >>>> You can put surface data back into the volume with mri_surf2vol (which >>>> will also merge left and right into one volume). What do you do >>>> with the >>>> aseg data? >>>> >>>> On 04/01/2016 10:46 AM, Jennifer Legault wrote: >>>> > Dear Freesurfer Experts, >>>> > >>>> > I have run my participants' longitudinal sMRI data through the >>>> > preprocessing longitudinal pipeline, ran the LME multivariate >>>> > analysis, cluster-thresholded the data, and am now trying to >>>> visualize >>>> > those results in Freeview (for some reason tksurfer is very, >>>> very slow >>>> > to run on my computer). I am interested in the Fs volume >>>> > (thickness*area) measure. >>>> > >>>> > I noticed in the FsFast Tutorial >>>> > >>>> >>>> <https://surfer.nmr.mgh.harvard.edu/fswiki/FsFastTutorialV5.1/FsFastGroupLevel>, >>>> > that all the corrected results were able to be merged into one file >>>> > using the vlrmerge command. In the beginning of the tutorial, it >>>> > states that fMRI
Re: [Freesurfer] How to view entire brain results in Freeview for LME data
Hi Doug, I'm currently running the LME mass-univariate analysis (I've previously conducted the LME univariate analyses with ROIs with little to no problems) and, thanks to your help, have run my data through this analysis and done the cluster-thresholding for the aparc data but not the aseg data (since I'm not sure how to cluster-threshold the segmented data--any advice you have would be greatly appreciated). Is there a way to view the significant voxels overlaid on the aseg+aparc.mgz in fsaverage for the whole brain? Best, Jen On Fri, Apr 8, 2016 at 12:36 PM, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote: > > > On 04/01/2016 04:44 PM, Jennifer Legault wrote: >> Hi Doug, >> >> Thanks for your quick response! When running the LME mass univariate >> analysis, I am assuming this also includes subcortical structures, >> correct? > Which processing are you doing? It should be obvious if you are doing > surface-based or ROI-based analysis. >> From my understanding, subcortical areas are segmented as opposed to >> parcellated. The main thing I want to examine all the regions of the >> brain that might change over time (as a function of the training task >> I've given my participants), so I would look at both the aparc and the >> aseg data, right? > Yes, you can. >> Apologies if I've misunderstood your question. For the aseg data, I >> am currently having trouble with figuring out how to cluster threshold >> the data (do i use mri_surfcluster with an argument to call the aseg >> annotation or do I use mri_volcluster?) I would then want to visualize >> the cluster thresholded data for subcortical structures in freeview. > If you are doing an ROI analysis then there is no clustering. >> Optimally, I would like to find some way to look at the whole brain in >> Freeview to see these regions that have changed as a function of my >> training task. > If you have a value for each ROI (segmentation and/or parcellation), > then you can read in aseg+aparc.mgz in fsaverage (apas = > MRIread('aparc+aseg.mgz')), then find all the voxels that belong to a > given ROI and assign them the value for the ROI, then write it out, then > view the output as an overlay on orig.mgz > >> >> Best, >> >> Jen >> >> On Fri, Apr 1, 2016 at 11:23 AM, Douglas N Greve >> <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote: >> >> You can put surface data back into the volume with mri_surf2vol (which >> will also merge left and right into one volume). What do you do >> with the >> aseg data? >> >> On 04/01/2016 10:46 AM, Jennifer Legault wrote: >> > Dear Freesurfer Experts, >> > >> > I have run my participants' longitudinal sMRI data through the >> > preprocessing longitudinal pipeline, ran the LME multivariate >> > analysis, cluster-thresholded the data, and am now trying to >> visualize >> > those results in Freeview (for some reason tksurfer is very, >> very slow >> > to run on my computer). I am interested in the Fs volume >> > (thickness*area) measure. >> > >> > I noticed in the FsFast Tutorial >> > >> >> <https://surfer.nmr.mgh.harvard.edu/fswiki/FsFastTutorialV5.1/FsFastGroupLevel>, >> > that all the corrected results were able to be merged into one file >> > using the vlrmerge command. In the beginning of the tutorial, it >> > states that fMRI and structuraI group analyses run similarly. / >> I was >> > therefore wondering if I can use the vlrmerge command (or some similar >> > command) for my LME data, such that I can view the following >> > information all in one file: both hemispheres, aparc and aseg. >> > / Currently I can only view the aparc results for each of the >> > hemispheres separately (and I haven't found a way to visualize the >> > aseg data). >> > >> > Thank you for taking the time to read this email. >> > >> > Best, >> > >> > Jennifer Legault >> > Ph.D candidate, Neuroscience >> > Brain, Language, and Computation Lab >> > The Pennsylvania State University >> > >> > >> > ___ >> > Freesurfer mailing list >> > Freesurfer@nmr.mgh.harvard.edu >> <mailto:Freesurfer@nmr.mgh.harvard.edu> >> > https://mail.nmr.mgh.harvard.edu/mailman/lis
Re: [Freesurfer] How to view entire brain results in Freeview for LME data
Hi Doug, Thanks for your quick response! When running the LME mass univariate analysis, I am assuming this also includes subcortical structures, correct? From my understanding, subcortical areas are segmented as opposed to parcellated. The main thing I want to examine all the regions of the brain that might change over time (as a function of the training task I've given my participants), so I would look at both the aparc and the aseg data, right? Apologies if I've misunderstood your question. For the aseg data, I am currently having trouble with figuring out how to cluster threshold the data (do i use mri_surfcluster with an argument to call the aseg annotation or do I use mri_volcluster?) I would then want to visualize the cluster thresholded data for subcortical structures in freeview. Optimally, I would like to find some way to look at the whole brain in Freeview to see these regions that have changed as a function of my training task. Best, Jen On Fri, Apr 1, 2016 at 11:23 AM, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote: > You can put surface data back into the volume with mri_surf2vol (which > will also merge left and right into one volume). What do you do with the > aseg data? > > On 04/01/2016 10:46 AM, Jennifer Legault wrote: > > Dear Freesurfer Experts, > > > > I have run my participants' longitudinal sMRI data through the > > preprocessing longitudinal pipeline, ran the LME multivariate > > analysis, cluster-thresholded the data, and am now trying to visualize > > those results in Freeview (for some reason tksurfer is very, very slow > > to run on my computer). I am interested in the Fs volume > > (thickness*area) measure. > > > > I noticed in the FsFast Tutorial > > < > https://surfer.nmr.mgh.harvard.edu/fswiki/FsFastTutorialV5.1/FsFastGroupLevel > >, > > that all the corrected results were able to be merged into one file > > using the vlrmerge command. In the beginning of the tutorial, it > > states that fMRI and structuraI group analyses run similarly. / I was > > therefore wondering if I can use the vlrmerge command (or some similar > > command) for my LME data, such that I can view the following > > information all in one file: both hemispheres, aparc and aseg. > > / Currently I can only view the aparc results for each of the > > hemispheres separately (and I haven't found a way to visualize the > > aseg data). > > > > Thank you for taking the time to read this email. > > > > Best, > > > > Jennifer Legault > > Ph.D candidate, Neuroscience > > Brain, Language, and Computation Lab > > The Pennsylvania State University > > > > > > ___ > > 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.harvard.edu/transfer/outgoing/flat/greve/ > > ___ > 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. > > -- Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University ___ 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 view entire brain results in Freeview for LME data
Dear Freesurfer Experts, I have run my participants' longitudinal sMRI data through the preprocessing longitudinal pipeline, ran the LME multivariate analysis, cluster-thresholded the data, and am now trying to visualize those results in Freeview (for some reason tksurfer is very, very slow to run on my computer). I am interested in the Fs volume (thickness*area) measure. I noticed in the FsFast Tutorial <https://surfer.nmr.mgh.harvard.edu/fswiki/FsFastTutorialV5.1/FsFastGroupLevel>, that all the corrected results were able to be merged into one file using the vlrmerge command. In the beginning of the tutorial, it states that fMRI and structuraI group analyses run similarly. * I was therefore wondering if I can use the vlrmerge command (or some similar command) for my LME data, such that I can view the following information all in one file: both hemispheres, aparc and aseg. * Currently I can only view the aparc results for each of the hemispheres separately (and I haven't found a way to visualize the aseg data). Thank you for taking the time to read this email. Best, Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University ___ 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] Permission denied error with mri_surfcluster command
Hi Douglas, Thank you for all your help. When I say "volume" I do mean the FS thickness*area measure. I ran the mri_glmfit with --osgm and for the FWHM received the value of .925737. Assuming that this rounds up to 1, I then went to $FREESURFER_HOME/average/mult-comp-cor/fsaverage to find the CSD file and I selected the fwhm01 csd file. I then ran the mri_surfcluster command, however, I got the following error: ERROR: you have specified srcsubjid=fsaverage on cmdline, but CSD file was created with fsaverage Any suggestions you have would be appreciated. Best, Jen On Thu, Feb 11, 2016 at 1:32 PM, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote: > by "volume" do you mean a VBM-type analysis or do you mean the volume > that comes out of FS (thickness*area)? If you are going to use a > clusterwise correction, then you have to have a FWHM measurement. You > can try analyzing it in mri_glmfit with --osgm just to get the FWHM out > of it. > > You should be able to output a .mgh file instead of a .w file > > > On 02/11/2016 01:07 PM, Jennifer Legault wrote: > > That's very useful, thank you. In terms of FWHM, I am examining gray > > matter volume, not cortical thickness, and was previously instructed > > by Martin Reuter not to smooth these data. Do you think it would make > > sense then to just use the fwhm01? And in terms of the voxel-wise > > threshold, is there a commonly used value for GM volume data? I am > > still new to freesurfer and I appreciate any feedback. > > > > For visualization, after I run the mri_surfcluster the only outputs > > are a summary file and a .w file, and freeview doesn't accept this > > format. Is it possible to have a cluster-wise corrected map (a > > sig.cluster.mgh file) as they do for the Clusterwise Correction for > > Multiple Comparisons tutorial here > > <https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis>? > > > > > > Best, > > > > Jen > > > > On Thu, Feb 11, 2016 at 11:39 AM, Douglas N Greve > > <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote: > > > > > > > > On 02/11/2016 11:19 AM, Jennifer Legault wrote: > > > Thank you for your response. Do I need to run the glm_fit-sim > > command > > > to make the csd file? I feel this would be inappropriate for my > > data > > > since I already ran the LME model. > > No, look in $FREESURFER_HOME/average/mult-comp-cor/fsaverage. You > will > > need the FWHM though > > > > > > Second, is there an argument to make an output file that can be > > > visualized via freeview? In other words, how can I view my cluster > > > thresholded data? > > You can use freeview, something like > > freeview -f lh.inflated:overlay=sig.mgh > > There are other options for loading annotations and curvature. See > the > > freeview help > > > > > > Your help is greatly appreciated, > > > > > > Jen > > > > > > > > > > > > On Wed, Feb 10, 2016 at 11:04 PM, Douglas Greve > > > <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu> > > <mailto:gr...@nmr.mgh.harvard.edu > > <mailto:gr...@nmr.mgh.harvard.edu>>> wrote: > > > > > > There is a (very long) command line on that page. Mainly you > > need > > > a csd file. To get that you need the FWHM of your analysis, the > > > voxel-wise threshold, and the sign of the contrast (or abs). > > Then > > > the relevant output will be the --sum. You can run it with > > --help > > > to get more info. > > > > > > > > > On 2/10/16 5:11 PM, Jennifer Legault wrote: > > >> Thank you very much for your help! I still received a "cannot > > >> read file type" error when I only added the path to the output > > >> --o part, however when I also added the path to the input > file, > > >> it worked! > > >> > > >> I do have one more question: Which argument can I add so > > that in > > >> my output file I see the clusterwise P value, like it is shown > > >> here > > >> > > < > https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysisClusterSummary > >? > > >> > > >> Best, > > >&
Re: [Freesurfer] Permission denied error with mri_surfcluster command
Thank you for your response. Do I need to run the glm_fit-sim command to make the csd file? I feel this would be inappropriate for my data since I already ran the LME model. Second, is there an argument to make an output file that can be visualized via freeview? In other words, how can I view my cluster thresholded data? Your help is greatly appreciated, Jen On Wed, Feb 10, 2016 at 11:04 PM, Douglas Greve <gr...@nmr.mgh.harvard.edu> wrote: > There is a (very long) command line on that page. Mainly you need a csd > file. To get that you need the FWHM of your analysis, the voxel-wise > threshold, and the sign of the contrast (or abs). Then the relevant output > will be the --sum. You can run it with --help to get more info. > > > On 2/10/16 5:11 PM, Jennifer Legault wrote: > > Thank you very much for your help! I still received a "cannot read file > type" error when I only added the path to the output --o part, however when > I also added the path to the input file, it worked! > > I do have one more question: Which argument can I add so that in my output > file I see the clusterwise P value, like it is shown here > <https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysisClusterSummary> > ? > > Best, > > Jen > > On Wed, Feb 10, 2016 at 1:50 PM, Douglas N Greve < > gr...@nmr.mgh.harvard.edu> wrote: > >> I meant for the output files, so the --o in particular >> >> On 02/10/2016 01:47 PM, Jennifer Legault wrote: >> > Douglas, >> > >> > Thank you for your quick response. When I add --sd [path_location], I >> > get the following error: >> > Loading source values >> > mri_read(): couldn't determine type of file >> [path_location]/rh_time_spval >> > ERROR: could not read rh_time_spval as type >> > >> > Should I use another argument? >> > >> > Best, >> > >> > Jen >> > >> > >> > >> > On Wed, Feb 10, 2016 at 1:41 PM, Douglas N Greve >> > <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote: >> > >> > Try specifying the full path to the output >> > >> > On 02/10/2016 12:59 PM, Jennifer Legault wrote: >> > > Dear experts, >> > > >> > > I am trying to use the cluster thresholding command for my >> > freesurfer >> > > LME outputs as referred to here >> > > >> > <https://surfer.nmr.mgh.harvard.edu/fswiki/LinearMixedEffectsModels >> >. >> > > Any feedback or comments would be greatly appreciated. >> > > >> > > I am aware that there have been permission denied errors when >> using >> > > mri_surfcluster and that applying this patch >> > > >> > < >> ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0-patch/mni152reg >> > >> > > should solve the problem (which I tried), however I am still >> either >> > > receiving errors stating the permission is denied. >> > > >> > > This is the command I am trying to run: >> > > >> > > mri_surfcluster --subject fsaverage --hemi rh --in >> > rh_time_spval.mgh >> > > --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster >> --sum >> > > rh_time_cluster_sum >> > > >> > > >> > > Here is the error log: >> > > >> > > mri_surfcluster --subject fsaverage --hemi rh --in >> rh_time_spval.mgh >> > > --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster >> --sum >> > > rh_time_cluster_sum thsign = pos, id = 1 >> > > version $Id: mri_surfcluster.c,v 1.51.2.3 2012/05/31 22:10:05 >> > greve Exp $ >> > > hemi = rh >> > > srcid = rh_time_spval.mgh >> > > srcsubjid = fsaverage >> > > srcsurf= white >> > > srcframe = 0 >> > > thsign = pos >> > > thmin = -1 >> > > thmax = -1 >> > > fdr= 0.05 >> > > minarea= 0 >> > > xfmfile= talairach.xfm >> > > nth = -1 >> > > outid= rh_time_cluster paint >> > > sumfile = rh_time_cluster_sum >> > > subjectsdir= /gpfs/home/jtl190/work/structurals >> > > FixMNI = 1 >> > > -
Re: [Freesurfer] Permission denied error with mri_surfcluster command
That's very useful, thank you. In terms of FWHM, I am examining gray matter volume, not cortical thickness, and was previously instructed by Martin Reuter not to smooth these data. Do you think it would make sense then to just use the fwhm01? And in terms of the voxel-wise threshold, is there a commonly used value for GM volume data? I am still new to freesurfer and I appreciate any feedback. For visualization, after I run the mri_surfcluster the only outputs are a summary file and a .w file, and freeview doesn't accept this format. Is it possible to have a cluster-wise corrected map (a sig.cluster.mgh file) as they do for the Clusterwise Correction for Multiple Comparisons tutorial here <https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis>? Best, Jen On Thu, Feb 11, 2016 at 11:39 AM, Douglas N Greve <gr...@nmr.mgh.harvard.edu > wrote: > > > On 02/11/2016 11:19 AM, Jennifer Legault wrote: > > Thank you for your response. Do I need to run the glm_fit-sim command > > to make the csd file? I feel this would be inappropriate for my data > > since I already ran the LME model. > No, look in $FREESURFER_HOME/average/mult-comp-cor/fsaverage. You will > need the FWHM though > > > > Second, is there an argument to make an output file that can be > > visualized via freeview? In other words, how can I view my cluster > > thresholded data? > You can use freeview, something like > freeview -f lh.inflated:overlay=sig.mgh > There are other options for loading annotations and curvature. See the > freeview help > > > > Your help is greatly appreciated, > > > > Jen > > > > > > > > On Wed, Feb 10, 2016 at 11:04 PM, Douglas Greve > > <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote: > > > > There is a (very long) command line on that page. Mainly you need > > a csd file. To get that you need the FWHM of your analysis, the > > voxel-wise threshold, and the sign of the contrast (or abs). Then > > the relevant output will be the --sum. You can run it with --help > > to get more info. > > > > > > On 2/10/16 5:11 PM, Jennifer Legault wrote: > >> Thank you very much for your help! I still received a "cannot > >> read file type" error when I only added the path to the output > >> --o part, however when I also added the path to the input file, > >> it worked! > >> > >> I do have one more question: Which argument can I add so that in > >> my output file I see the clusterwise P value, like it is shown > >> here > >> < > https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysisClusterSummary > >? > >> > >> Best, > >> > >> Jen > >> > >> On Wed, Feb 10, 2016 at 1:50 PM, Douglas N Greve > >> <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> > wrote: > >> > >> I meant for the output files, so the --o in particular > >> > >> On 02/10/2016 01:47 PM, Jennifer Legault wrote: > >> > Douglas, > >> > > >> > Thank you for your quick response. When I add --sd > >> [path_location], I > >> > get the following error: > >> > Loading source values > >> > mri_read(): couldn't determine type of file > >> [path_location]/rh_time_spval > >> > ERROR: could not read rh_time_spval as type > >> > > >> > Should I use another argument? > >> > > >> > Best, > >> > > >> > Jen > >> > > >> > > >> > > >> > On Wed, Feb 10, 2016 at 1:41 PM, Douglas N Greve > >> > <gr...@nmr.mgh.harvard.edu > >> <mailto:gr...@nmr.mgh.harvard.edu> > >> <mailto:gr...@nmr.mgh.harvard.edu > >> <mailto:gr...@nmr.mgh.harvard.edu>>> wrote: > >> > > >> > Try specifying the full path to the output > >> > > >> > On 02/10/2016 12:59 PM, Jennifer Legault wrote: > >> > > Dear experts, > >> > > > >> > > I am trying to use the cluster thresholding command > >> for my > >> > freesurfer > >> > > LME outputs as referred to here > >>
[Freesurfer] Permission denied error with mri_surfcluster command
Dear experts, I am trying to use the cluster thresholding command for my freesurfer LME outputs as referred to here <https://surfer.nmr.mgh.harvard.edu/fswiki/LinearMixedEffectsModels>. Any feedback or comments would be greatly appreciated. I am aware that there have been permission denied errors when using mri_surfcluster and that applying this patch <ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0-patch/mni152reg> should solve the problem (which I tried), however I am still either receiving errors stating the permission is denied. This is the command I am trying to run: mri_surfcluster --subject fsaverage --hemi rh --in rh_time_spval.mgh --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster --sum rh_time_cluster_sum Here is the error log: mri_surfcluster --subject fsaverage --hemi rh --in rh_time_spval.mgh --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster --sum rh_time_cluster_sum thsign = pos, id = 1 version $Id: mri_surfcluster.c,v 1.51.2.3 2012/05/31 22:10:05 greve Exp $ hemi = rh srcid = rh_time_spval.mgh srcsubjid = fsaverage srcsurf= white srcframe = 0 thsign = pos thmin = -1 thmax = -1 fdr= 0.05 minarea= 0 xfmfile= talairach.xfm nth = -1 outid= rh_time_cluster paint sumfile = rh_time_cluster_sum subjectsdir= /gpfs/home/jtl190/work/structurals FixMNI = 1 - XFM matrix (RAS2RAS) --- /gpfs/home/jtl190/work/structurals/fsaverage/mri/transforms/talairach.xfm 1.000 0.000 0.000 0.000; 0.000 1.000 0.000 0.000; 0.000 0.000 1.000 0.000; 0.000 0.000 0.000 1.000; Reading source surface /gpfs/home/jtl190/work/structurals/fsaverage/surf/rh.white Done reading source surface Computing metric properties Loading source values number of voxels in search space = 163842 Done loading source values (nvtxs = 163842) overall max = 1 at vertex 27 overall min = 1.52021e-05 at vertex 125620 surface nvertices 163842 surface area 65020.929688 surface area 65020.765625 Setting voxel-wise threshold with FDR = 0.05 Assuming input map is -log10(p) MRISfdr2vwth(): np = 163842, nv = 163842, fdr = 0.05, vwth=1.04576 FDR Voxel-wise threshold is 1.04576 Adjusting threshold for 1-tailed test. If the input is not a -log10(p) volume, re-run with --no-adjust. Searching for Clusters ... thmin=1.045757 (0.744727), thmax=-1.00 (-1), thsignid=1, minarea=0.00 Found 9803 clusters Max cluster size 5993.586426 INFO: fixing MNI talairach coordinates Saving thresholded output to rh_time_cluster Can't create file /gpfs/home/jtl190/work/structurals/fsaverage/surf/rh.rh_time_cluster.w Permission denied Thank you for taking the time to read this email. Sincerely, Jennifer Legault -- Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University ___ 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] Permission denied error with mri_surfcluster command
Douglas, Thank you for your quick response. When I add --sd [path_location], I get the following error: Loading source values mri_read(): couldn't determine type of file [path_location]/rh_time_spval ERROR: could not read rh_time_spval as type Should I use another argument? Best, Jen On Wed, Feb 10, 2016 at 1:41 PM, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote: > Try specifying the full path to the output > > On 02/10/2016 12:59 PM, Jennifer Legault wrote: > > Dear experts, > > > > I am trying to use the cluster thresholding command for my freesurfer > > LME outputs as referred to here > > <https://surfer.nmr.mgh.harvard.edu/fswiki/LinearMixedEffectsModels>. > > Any feedback or comments would be greatly appreciated. > > > > I am aware that there have been permission denied errors when using > > mri_surfcluster and that applying this patch > > < > ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0-patch/mni152reg > > > > should solve the problem (which I tried), however I am still either > > receiving errors stating the permission is denied. > > > > This is the command I am trying to run: > > > > mri_surfcluster --subject fsaverage --hemi rh --in rh_time_spval.mgh > > --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster --sum > > rh_time_cluster_sum > > > > > > Here is the error log: > > > > mri_surfcluster --subject fsaverage --hemi rh --in rh_time_spval.mgh > > --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster --sum > > rh_time_cluster_sum thsign = pos, id = 1 > > version $Id: mri_surfcluster.c,v 1.51.2.3 2012/05/31 22:10:05 greve Exp $ > > hemi = rh > > srcid = rh_time_spval.mgh > > srcsubjid = fsaverage > > srcsurf= white > > srcframe = 0 > > thsign = pos > > thmin = -1 > > thmax = -1 > > fdr= 0.05 > > minarea= 0 > > xfmfile= talairach.xfm > > nth = -1 > > outid= rh_time_cluster paint > > sumfile = rh_time_cluster_sum > > subjectsdir= /gpfs/home/jtl190/work/structurals > > FixMNI = 1 > > - XFM matrix (RAS2RAS) --- > > /gpfs/home/jtl190/work/structurals/fsaverage/mri/transforms/talairach.xfm > > 1.000 0.000 0.000 0.000; > > 0.000 1.000 0.000 0.000; > > 0.000 0.000 1.000 0.000; > > 0.000 0.000 0.000 1.000; > > > > Reading source surface > > /gpfs/home/jtl190/work/structurals/fsaverage/surf/rh.white > > Done reading source surface > > Computing metric properties > > Loading source values > > number of voxels in search space = 163842 > > Done loading source values (nvtxs = 163842) > > overall max = 1 at vertex 27 > > overall min = 1.52021e-05 at vertex 125620 > > surface nvertices 163842 > > surface area 65020.929688 > > surface area 65020.765625 > > Setting voxel-wise threshold with FDR = 0.05 > > Assuming input map is -log10(p) > > MRISfdr2vwth(): np = 163842, nv = 163842, fdr = 0.05, vwth=1.04576 > > FDR Voxel-wise threshold is 1.04576 > > Adjusting threshold for 1-tailed test. > > If the input is not a -log10(p) volume, re-run with --no-adjust. > > Searching for Clusters ... > > thmin=1.045757 (0.744727), thmax=-1.00 (-1), thsignid=1, > > minarea=0.00 > > Found 9803 clusters > > Max cluster size 5993.586426 > > INFO: fixing MNI talairach coordinates > > Saving thresholded output to rh_time_cluster > > Can't create file > > /gpfs/home/jtl190/work/structurals/fsaverage/surf/rh.rh_time_cluster.w > > > > Permission denied > > > > > > > > > > Thank you for taking the time to read this email. > > > > Sincerely, > > > > Jennifer Legault > > > > -- > > Jennifer Legault > > Ph.D candidate, Neuroscience > > Brain, Language, and Computation Lab > > The Pennsylvania State University > > > > > > ___ > > 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.m
Re: [Freesurfer] Permission denied error with mri_surfcluster command
Thank you very much for your help! I still received a "cannot read file type" error when I only added the path to the output --o part, however when I also added the path to the input file, it worked! I do have one more question: Which argument can I add so that in my output file I see the clusterwise P value, like it is shown here <https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysisClusterSummary> ? Best, Jen On Wed, Feb 10, 2016 at 1:50 PM, Douglas N Greve <gr...@nmr.mgh.harvard.edu> wrote: > I meant for the output files, so the --o in particular > > On 02/10/2016 01:47 PM, Jennifer Legault wrote: > > Douglas, > > > > Thank you for your quick response. When I add --sd [path_location], I > > get the following error: > > Loading source values > > mri_read(): couldn't determine type of file [path_location]/rh_time_spval > > ERROR: could not read rh_time_spval as type > > > > Should I use another argument? > > > > Best, > > > > Jen > > > > > > > > On Wed, Feb 10, 2016 at 1:41 PM, Douglas N Greve > > <gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>> wrote: > > > > Try specifying the full path to the output > > > > On 02/10/2016 12:59 PM, Jennifer Legault wrote: > > > Dear experts, > > > > > > I am trying to use the cluster thresholding command for my > > freesurfer > > > LME outputs as referred to here > > > > > <https://surfer.nmr.mgh.harvard.edu/fswiki/LinearMixedEffectsModels > >. > > > Any feedback or comments would be greatly appreciated. > > > > > > I am aware that there have been permission denied errors when using > > > mri_surfcluster and that applying this patch > > > > > < > ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0-patch/mni152reg > > > > > should solve the problem (which I tried), however I am still either > > > receiving errors stating the permission is denied. > > > > > > This is the command I am trying to run: > > > > > > mri_surfcluster --subject fsaverage --hemi rh --in > > rh_time_spval.mgh > > > --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster --sum > > > rh_time_cluster_sum > > > > > > > > > Here is the error log: > > > > > > mri_surfcluster --subject fsaverage --hemi rh --in > rh_time_spval.mgh > > > --cwpvalthresh 0.05 --fdr .05 --sign pos --o rh_time_cluster --sum > > > rh_time_cluster_sum thsign = pos, id = 1 > > > version $Id: mri_surfcluster.c,v 1.51.2.3 2012/05/31 22:10:05 > > greve Exp $ > > > hemi = rh > > > srcid = rh_time_spval.mgh > > > srcsubjid = fsaverage > > > srcsurf= white > > > srcframe = 0 > > > thsign = pos > > > thmin = -1 > > > thmax = -1 > > > fdr= 0.05 > > > minarea= 0 > > > xfmfile= talairach.xfm > > > nth = -1 > > > outid= rh_time_cluster paint > > > sumfile = rh_time_cluster_sum > > > subjectsdir= /gpfs/home/jtl190/work/structurals > > > FixMNI = 1 > > > - XFM matrix (RAS2RAS) --- > > > > > > /gpfs/home/jtl190/work/structurals/fsaverage/mri/transforms/talairach.xfm > > > 1.000 0.000 0.000 0.000; > > > 0.000 1.000 0.000 0.000; > > > 0.000 0.000 1.000 0.000; > > > 0.000 0.000 0.000 1.000; > > > > > > Reading source surface > > > /gpfs/home/jtl190/work/structurals/fsaverage/surf/rh.white > > > Done reading source surface > > > Computing metric properties > > > Loading source values > > > number of voxels in search space = 163842 > > > Done loading source values (nvtxs = 163842) > > > overall max = 1 at vertex 27 > > > overall min = 1.52021e-05 at vertex 125620 > > > surface nvertices 163842 > > > surface area 65020.929688 > > > surface area 65020.765625 > > > Setting voxel-wise threshold with FDR = 0.05 > > > Assuming input map is -log10(p) > > > MRISfdr2vwth(): np = 163842, nv = 163842, fdr = 0.05,
Re: [Freesurfer] Problem with Longitudinal QDEC file and mris_preproc
Hi Martin, Thank you for your help and clarifications. I did run the *_to_table commands and now my LME analyses are running smoothly. Best, Jennifer Legault On Mon, Mar 9, 2015 at 11:35 AM, Martin Reuter mreu...@nmr.mgh.harvard.edu wrote: Hi Jennifer, if you are interested in volumes from the stats file, you need to use aseg_stats_to_table and aparc_stats… to stack those data across subjects and time points into a single table that you then analyze with the LME tools. mris_preproc is only for stacking surface maps. The longitudinal QDEC file can be the same, you only need it to tell aseg_stats_2_table etc how to create the file names for the individual *.long.* directories. So that file only needs 2 columns (fsid, fsid-base ) for that. And maybe you want to pass other covariates (e.g. time from baseline, average age, gender etc) into LME via that same qdec table. The FS stats (e.g. either thickness maps, or stats tables) will be read separately. If you still have difficulties with the long QDEC file, try using space separated instead of tab! You don’t smooth the volume data. Look at the *_to_table commands to generate the tables. Best, Martin On Mar 6, 2015, at 5:09 PM, Jennifer Legault jlegaul...@gmail.com wrote: Hi all, I am new to Freesurfer and have run my participants’ data through the longitudinal preprocessing stream and am now trying to assemble my data so that they can be put into a linear mixed effect model analysis. While the longitudinal tutorial with cortical thickness data is very helpful, I am interested in GM volume (specific ROIs in aseg. + the lh and rh aparc. files) and have run into a few problems. 1) Problem with mris_preproc command/with QDEC file: a) I have made a Longitudinal QDEC file (attached in this comment as an excel file and .dat file) and I made sure to export to my Subjects dir, and then put in the following command: mris_preproc --qdec-long long.qdec.table.dat --target fsaverage --hemi lh --meas volume --out lh.volume.mgh When I run this command, it only runs for my first participant (which it takes from the Longitudinal QDEC file, such that if I take out the first row of the QDEC file, it starts with the next participant) I do not receive any sort of error message or anything, it just doesn’t keep running. Furthermore, I cannot find the output file (lh.volume.mgh) anywhere in my subjects directory. b) I am also wondering whether I need to make separate QDEC files for 1) aseg data 2) lh.aparc and 3) rh.aparc. Right now, my QDEC file has all of the information of interest in one place. c) I made the QDEC file in excel, and saved it as tab delimited (when I try to save it as space delimited (.prn--which I rename as .dat) and re-open it, it loses many of my headers and data). Does it have to be space delimited, and if so, is there another way of formatting it as space delimited? If not, then is there something else wrong with my QDEC format? 2) I do not know whether I am supposed to smooth the volume stack. According to my understanding of the Longitudinal tutorial, we should first run mris_preproc to concatenate our files and resample volume data to a common subject. Next, we should smooth the stacked/concatenated file. Should I use the following command: mri_vol2surf --src input file --hemi hemisphere --fwhm 10 --out outpufile Thank you for taking the time to read this email, I sincerely appreciate it. Best, Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University -- Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University long.qdec.table.xlsxlong.qdec.table.dat___ 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 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. -- Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
[Freesurfer] Problem with Longitudinal QDEC file and mris_preproc
Hi all, I am new to Freesurfer and have run my participants’ data through the longitudinal preprocessing stream and am now trying to assemble my data so that they can be put into a linear mixed effect model analysis. While the longitudinal tutorial with cortical thickness data is very helpful, I am interested in GM volume (specific ROIs in aseg. + the lh and rh aparc. files) and have run into a few problems. 1) Problem with mris_preproc command/with QDEC file: a) I have made a Longitudinal QDEC file (attached in this comment as an excel file and .dat file) and I made sure to export to my Subjects dir, and then put in the following command: mris_preproc --qdec-long long.qdec.table.dat --target fsaverage --hemi lh --meas volume --out lh.volume.mgh When I run this command, it only runs for my first participant (which it takes from the Longitudinal QDEC file, such that if I take out the first row of the QDEC file, it starts with the next participant) I do not receive any sort of error message or anything, it just doesn’t keep running. Furthermore, I cannot find the output file (lh.volume.mgh) anywhere in my subjects directory. b) I am also wondering whether I need to make separate QDEC files for 1) aseg data 2) lh.aparc and 3) rh.aparc. Right now, my QDEC file has all of the information of interest in one place. c) I made the QDEC file in excel, and saved it as tab delimited (when I try to save it as space delimited (.prn--which I rename as .dat) and re-open it, it loses many of my headers and data). Does it have to be space delimited, and if so, is there another way of formatting it as space delimited? If not, then is there something else wrong with my QDEC format? 2) I do not know whether I am supposed to smooth the volume stack. According to my understanding of the Longitudinal tutorial, we should first run mris_preproc to concatenate our files and resample volume data to a common subject. Next, we should smooth the stacked/concatenated file. Should I use the following command: mri_vol2surf --src input file --hemi hemisphere --fwhm 10 --out outpufile Thank you for taking the time to read this email, I sincerely appreciate it. Best, Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University -- Jennifer Legault Ph.D candidate, Neuroscience Brain, Language, and Computation Lab The Pennsylvania State University long.qdec.table.xlsx Description: MS-Excel 2007 spreadsheet long.qdec.table.dat Description: Binary data ___ 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.