Hi everyone,
I have reconstructed my nirs data using cMEM, then I want to do GLM on the cMEM output (NIRS > GLM > GLM - 1st level design and fit), as shown in the fig below:
All above steps were analized using my macos (m4 pro), but I got error report like this:
** Error: Line 235: Cannot get signals from surface data
**
** Call stack:
** >process_nst_glm_fit.m>Run at 235
** >process_nst_glm_fit.m at 34
** >process_nst_glm_fit1.m>Run at 58
** >process_nst_glm_fit1.m at 34
** >bst_process.m>Run at 203
** >bst_process.m at 38
** >panel_process1.m>RunProcess at 138
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 781
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 301
**
** Error: [process_nst_glm_fit1] NIRS > GLM > GLM - 1st level design and fit
** Line 365: Unrecognized function or variable 'n_voxel'.
**
** Call stack:
** >process_nst_glm_fit.m>Run at 365
** >process_nst_glm_fit.m at 34
** >process_nst_glm_fit1.m>Run at 58
** >process_nst_glm_fit1.m at 34
** >bst_process.m>Run at 203
** >bst_process.m at 38
** >panel_process1.m>RunProcess at 138
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 781
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 301
**
**
** File: B001/B001_dOD/results_NIRS_cMEM___timewindow__227.967_to_418.0378s___smooth=0.6____HbR_251213_1730.mat
**
I also ran all same processing steps on my windows desktop using the same raw data, evething goes well. Could anyone help me with this problem?
Hello,
Could you export the subject as zip and post it here so i could do some test ?
Regards
Edouard
Hello,
I pushed a fix here: [Glm] load data when ImageGridAmp is a cell by Edouard2laire · Pull Request #297 · Nirstorm/nirstorm · GitHub Please update nirstorm and try again.
@Raymundo.Cassani there is a slight bug when openning the constrast results map:
The file looks like this in the database
This is now fixed on commit: 38b609a
@woshibeauty, please try after updating NIRSTORM and Brainstorm to their latest versions.
1 Like
Hi @edelaire ,
Thank you for your previous assistance. I have completed all individual GLM (1st level) analyses for my subjects. Currently, I am aiming to conduct the GLM at the group level (2-level), but I am uncertain about the procedure in NIRSTORM. Could you please advise me on which file (highlighted in the attached image) I should project to the template anatomy? Additionally, should I utilize the 'MFX group t-test' function or another function? Your guidance would be greatly appreciated as I have been unable to locate tutorials specifically addressing GLM.
Thank you.
Hello,
Thanks a lot for using nirstorm. It’s true that the GLM is probably the least documented part of the software (I should really write some tutorials for it…).
yes. You have to provide the contrast file, as if you were runniung the single-subject t-test, but providing one contrast map per subject.Note you will have to run the process twice: once for HbO, and once for HbR.
Edit: i re-read the question. so adding details:
>> I should project to the template anatomy?
You should project the contrast. A slighly better way would be to project all your cMEM and run the GLM on the template. so all the model and contrast are on the template. (its slighly wrong to project standard deviation but its not very different).
>> Additionally, should I utilize the 'MFX group t-test' function or another function?
yes. this is the correct function applying a mixed-effect model for the group analysis.
Thank you for your response.
I have a follow-up question: I projected my 'cMEM | (0.00s,634.80s) | smooth=0.6| HbO/HbR' file onto the template and obtained a 'S013/Raw (0.00s,634.80s) | OD' file on the template. However, I encountered difficulties running the GLM using this file. An error occurred when I attempted to execute 'GLM 1st level design and fit'. Despite reloading the protocol, the issue persists.
** Error: [process_nst_glm_fit1] NIRS > GLM > GLM - 1st level design and fit
** Line 39: error in_bst_channel
** Channel file was not found:
** Please reload this protocol (right-click > reload).
**
** Call stack:
** >in_bst_channel.m at 39
** >process_nst_glm_fit.m>Run at 196
** >process_nst_glm_fit.m at 34
** >process_nst_glm_fit1.m>Run at 58
** >process_nst_glm_fit1.m at 34
** >bst_process.m>Run at 203
** >bst_process.m at 38
** >panel_process1.m>RunProcess at 138
** >panel_process1.m at 26
** >gui_brainstorm.m>CreateWindow/ProcessRun_Callback at 781
** >bst_call.m at 28
** >gui_brainstorm.m>@(h,ev)bst_call(@ProcessRun_Callback) at 301
**
**
** File: Group_analysis/S013_dOD/results_NIRS_cMEM___timewindow__0_to_634.7981s___smooth=0.6____HbR_260113_1605_S013.mat
**
Thanks for the report. I guess the line nirstorm/bst_plugin/GLM/process_nst_glm_fit.m at master · Nirstorm/nirstorm · GitHub shouldn’t be executed when dealing with a source map.
I’ll try to push a fix this weekend; otherwise, you can comment the line and it should work.
Hello,
i merged a fix here: [glm] Don't load channelmat for source map by Edouard2laire · Pull Request #299 · Nirstorm/nirstorm · GitHub . This should work after updating nirstorm.
Thanks again for reporting the issue.
Edouard