Closed carolfs closed 4 years ago
I found the problem. The mask file created by SPM mask.nii
was being automatically deleted.
Hello, could I know how did you fixed it ?
@munoztd0: Did you get the exact same error message as the one above? If yes, as indicated by @carolfs comment, the mask.nii
in the GLM folder might be missing (and preventing your pipeline from deleting it should help). If no, could you post your entire error message, so that I know coming from where spm_slice_vol
threw an error?
@JoramSoch Thanks for you quick response. I found what was the bug but it wasn't because of the mask so I'm all good now! (for posteriority the spm.mat files where done on a server and it took the absolute path on the server instead of my computer's and since spm_slice_vol is the first command that run by your script it raises an error on the unfound masks)
@munoztd0: OK, cool! Thanks for letting me know. You might consider using spm_changepath
:
https://en.wikibooks.org/wiki/SPM/How-to#How_to_change_file_paths_in_a_batch_file_or_SPM.mat?
https://github.com/spm/spm12/blob/master/spm_changepath.m
Hi, I also have a problem during goodness of fit, but with a different error message, any suggestion? Thanks a lot!
SPM12: spm_spm (v7738) 11:58:02 - 28/05/2024
========================================================================
Chunk 1/1 : ...done
Spatial non-sphericity (over scans) : ...done
Saving SPM.mat : ...done
Completed : 11:58:07 - 28/05/2024
Done
28-May-2024 11:58:07 - Done 'Model estimation'
28-May-2024 11:58:07 - Running 'MA: inspect goodness of fit'
28-May-2024 11:58:09 - Failed 'MA: inspect goodness of fit'
Index exceeds the number of array elements (0).
In file "/crnldata/psyr2/Anna/SchizEmo_Project/fMRI_analysis/Schizemo_BIDSpm/code/lib/bidspm/lib/MACS/MA_inspect_GoF.m" (???), function "MA_inspect_GoF" at line 283.
In file "/crnldata/psyr2/Anna/SchizEmo_Project/fMRI_analysis/Schizemo_BIDSpm/code/lib/bidspm/lib/MACS/MA_inspect_GoF.m" (???), function "MA_inspect_GoF" at line 155.
In file "/crnldata/psyr2/Anna/SchizEmo_Project/fMRI_analysis/Schizemo_BIDSpm/code/lib/spm12/toolbox/MACS/batch_MA_inspect_GoF.m" (???), function "run_module" at line 66.
Dear @FioritoAnna, apologies for the late reply! I cannot fully work out what went wrong here. Line 155 of MA_inspect_GoF
calls the function for loading the dataset of the GLM. Line 283 of MA_inspect_GoF
is a comment (% Calculate GoF as overlay
). Possibly, you have edited the script MA_inspect_GoF.m
? Could you tell me which line of code threw the error and what the exact error message from MATLAB was? I suspect it could have been line 285?
Hi @JoramSoch, thank you for your response! I've managed to resolve the issue, and upon reflection, I realized that the problem was not related to the MACS toolbox. Instead, it stemmed from an error in constructing my design matrix. Specifically, due to a typo in my json model I had failed to include all the experimental conditions convolved with the hemodynamic response function.
For posterity: I lately also run into the Error using spm_slice_vol Cant open image file
and could solved it with spm_changepath!
I'm new to this toolbox and cannot get it to work. The error I get is the following:
Am I doing anything wrong?