you can use mri_concat to concatenate all the ces.nii.gz files for a single subject into a single file, then run your glm
On 1/25/20 12:15 PM, Rami Hamati wrote:
External Email - Use Caution
Sorry if my question was unclear. We would like to analyze each run separately to observe if there is any habituation between runs of our task. Is there a way to concatenate each run separately?
Message: 15 Date: Fri, 24 Jan 2020 15:36:36 +0000 From: "Greve, Douglas N.,Ph.D." <DGREVE@mgh.harvard.edumailto:DGREVE@mgh.harvard.edu> Subject: Re: [Freesurfer] help: fs-fast group level analysis per run To: "freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu> Message-ID: <a30ff7c6-3179-7c73-54f1-636ff15d8bf0@mgh.harvard.edumailto:a30ff7c6-3179-7c73-54f1-636ff15d8bf0@mgh.harvard.edu> Content-Type: text/plain; charset="utf-8"
The run-wise functionality was added after selxavg was written as a way to help debug. If you want all the runs in your group analysis, why not turn off the run-wise flag?
On 1/22/2020 4:40 PM, Rami Hamati wrote:
External Email - Use Caution
Hello freesurfers,
I'm attempting to run second-level analysis on separate runs of a brain scan, that were generated by selxavg3-sess -run-wise (pr001, pr002, pr003, pr004) as described in selxavg3-sess --help.
But, when attempting to concatenate the data using isxconcat-sess, (as described here: https://surfer.nmr.mgh.harvard.edu/fswiki/FsFastTutorialV5.1/FsFastGroupLeve... ) there is no similar -run-wise function. I've searched the list and no similar errors have been reported.. I am wondering if there is a command or workaround for this. Thank you very much!
-- Rami Hamati, MSc. Royal's Institute of Mental Health Research Molecular Imaging Laboratory (MIL) 1145 Carling Ave, Ottawa, ON K1Z 7K4
Rami.Hamati@theroyal.camailto:Rami.Hamati@theroyal.ca<mailto:Rami.Hamati@theroyal.camailto:Rami.Hamati@theroyal.ca> rhama036@uottawa.camailto:rhama036@uottawa.ca<mailto:rhama036@uottawa.camailto:rhama036@uottawa.ca>
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20200124/aa...
------------------------------
Message: 16 Date: Fri, 24 Jan 2020 11:11:55 -0500 From: Graduate Imaging <graduate.imaging@gmail.commailto:graduate.imaging@gmail.com> Subject: Re: [Freesurfer] FreeSurfer analyses in MatLab To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu> Message-ID: <CA+yW3sTU_czHRNnQSJ8Pe3JAAC481n2Ck=1XbnOcAPBRzgmWPA@mail.gmail.commailto:1XbnOcAPBRzgmWPA@mail.gmail.com> Content-Type: text/plain; charset="utf-8"
External Email - Use Caution
On Fri, Jan 24, 2020 at 10:32 AM Greve, Douglas N.,Ph.D. < DGREVE@mgh.harvard.edumailto:DGREVE@mgh.harvard.edu> wrote:
On 1/22/2020 2:13 PM, Graduate Imaging wrote:
External Email - Use CautionOn Tue, Jan 21, 2020 at 10:40 AM Greve, Douglas N.,Ph.D. < DGREVE@mgh.harvard.edumailto:DGREVE@mgh.harvard.edu> wrote:
On 1/17/2020 10:39 AM, Graduate Imaging wrote:
External Email - Use CautionHello,
I recently ran a vertex wise analysis on two different projects the first had three groups with three co-variates that looked at if group membership was associated with brain volume. The second project had two groups with three co-variates looking at psychiatric x BMI interaction effect on brain volume. I'm interested in running ROI analyses in matlab to ensure the same matrices were used.
To run the ROI analyses I'm going to important the design matrix from the vertex wise analysis and use the fast_glmfit and fast_fratio commands as shown below: X = load('Xg.dat'); C = load('C.dat'); y = load('ROI.dat'); text file containing participant ROI values from the DKT atlas. [beta rvar] = fast_glmfit(y,X); [F pvalues] = fast_fratio(beta,X,rvar,C
My first question is the beta values that are calculated from fast_glmfit are unstandardized is there anyway way to have it compute standardized values?
I think this is how you would compute that betastddev = sqrt(rvar*diag(inv(X'*X))); betastandard = beta./betastddev;
When I try running this in Matlab I get the Error using *** incorrect dimensions for matrix multiplication message.
That means that the number of items in y (ie, number of subjects in ROI.dat) is different than the number of rows in X (number of subjects in the fsgd). What are the sizes of y and X?
That's what I suspected as well however, X = 102x12 and Y= 102x5. I ran [betastddev = sqrt(rvar*diag(inv(X'*X))); betastandard = beta./betastddev] after running successfully running [[beta rvar] = fast_glmfit(Y,X); [F pvalues] = fast_fratio(beta,X,rvar,C)] so its odd that the the dimensions wouldn't be matching.
Also when using fast_glmfit and fast_fratio via Matlab for ROI analyses what are the appropriate papers to cite? In the Matlab files in fsfast there is reference to Worsley, K.J. and Friston, K.J. Analysis of fMRI Time-Series Revisited - Again. Neuroimage 2, 173-181, 1995. Would this be the correct citation?
The GLM is so old I would not know what to cite. If you feel you need to cite something, that Worsley paper is fine.
Thanks. For DODS looking at an interaction term for the previously mentioned 2 group 4 co-variate analysis it produces the beta weights for each of the 10 regressors. Am I correct is assuming the way the analysis works is that it creates interaction terms for the class with each of the co-variates? If so the analysis could be summarized by Y = B0 + B1*X1 + B2*X2 + B3*X3 + B4X4 + B5X5 + B6*X1*X2 + B7*X1*X3 + B8*X1*X4 + B9*X1*X5 + e. Where X1= Class, X2= BMI, X3=ICV, X4= Age and X5=sex (I've since incorporated this to be apart of class but want to continue with this example). If that is the case to get an overall interaction term I should be able to manually create these interaction terms and put them into a matrix then for the contrast just regress out all of the effects except for the BMI*class (B6*X1*X2). However, when I do this the p value is not the same (far more significant) than using the DODS analysis with the 0 0 1 -1 0 0... contrast.
My second question is when I ran the ROI analyses looking at the diagnosis x BMI interaction effect it outputs an array of beta values for each regressor. In addition to each groups beta value (for BMI) I'm interested in the beta value of the interaction (ie diagnosis x BMI). I was wondering how do i go about obtaining this? Would I have to create a new matrix with the interaction term included in it?
If so would the analysis essentially be one group with the diagnosis x BMI interaction term plus the three co-variates?
If you are using an FSGD file and have used DODS, then you can create an interaction contrast. Send me your fsgd file if you want further help
Yes I was using DODS approach for this analysis, I've attached my FSGD file to this email.
You have 2 groups and 4 coviariates so 10 regressors. The dx BMI interaction would need a contrast matrix 0 0 1 -1 0 0 ... the rest 0s BTW, sex should not be a covariate. You really need to have four groups, P-male, P-female, HC-male, and HC-female (which would change the contrast above) Also, I would normalize the age and ICV
Thanks for the correction I'll update my matrix accordingly to four
groups and normalize the variables! The contrast matrix I ran was actually the same you suggested however it pastes an array of beta values for each 10 regressors. However, I was interested in obtaining a beta value that represents the interaction.
Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mailto:listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurferhttp://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mailto:listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurferhttp://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mailto:listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurferhttp://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20200124/e1...
------------------------------
Message: 17 Date: Fri, 24 Jan 2020 15:39:10 +0000 From: "Greve, Douglas N.,Ph.D." <DGREVE@mgh.harvard.edumailto:DGREVE@mgh.harvard.edu> Subject: Re: [Freesurfer] Troubleshooting FLAIR Images To: "freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu> Message-ID: <d5de92ae-1c9d-1c44-6478-cc4e986b1815@mgh.harvard.edumailto:d5de92ae-1c9d-1c44-6478-cc4e986b1815@mgh.harvard.edu> Content-Type: text/plain; charset="windows-1252"
The error that you have there is probably an incorrectly fixed defect and should be fixed by editing the wm.mgz (ie, probably not control points for now). There are no edits specifically for FLAIR (which will only affect the pial surface -- here the white surface is off)
On 1/23/2020 2:34 PM, Swanson,Clayton wrote:
External Email - Use Caution
Hi FreeSurfer Developers, After looking through the archives my question still remains. I am wondering if the same rules apply for editing/correcting FLAIR images as it does for T1 images. For example, can I add control points to the WM.mgz then re-run recon-all using the command recon-all - s <subject> -autorecon2-cp -autorecon3. For visualization I have attached a screenshot of what I am attempting to correct. Thank you for your help, Clayton
[cid:part1.0BA3DA89.784C1BE9@mgh.harvard.edumailto:cid%3Apart1.0BA3DA89.784C1BE9@mgh.harvard.edu]
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20200124/75... -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-01-23 at 12.31.58 PM.png Type: image/png Size: 1150706 bytes Desc: Screen Shot 2020-01-23 at 12.31.58 PM.png Url : http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20200124/75...
------------------------------
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
End of Freesurfer Digest, Vol 191, Issue 36 *******************************************
-- Rami Hamati, MSc. Royal's Institute of Mental Health Research Molecular Imaging Laboratory (MIL) 1145 Carling Ave, Ottawa, ON K1Z 7K4
Rami.Hamati@theroyal.camailto:Rami.Hamati@theroyal.ca rhama036@uottawa.camailto:rhama036@uottawa.ca
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer