How to Automate Scource localization for multiple subjects

Hi,
I need to perform sourced localization for MEG data. I have MRI files for all the subjects and I have created surfaces using freesurfer and set fiducial using brainstorm.
Is there a way or code available to automate source localization for all the subjects.

Hello,

Most actions in Brainstorm can be automated and run in bulk using our pipeline editor. If you just drag and drop your subjects into the process box, you can then add each processes required to do source reconstruction: Sources -> Compute head model, Sources -> Compute noise covariance, and finally Sources -> Compute sources. We strongly recommend you go through our introduction tutorials. Chapter 9 introduces the pipeline editor: https://neuroimage.usc.edu/brainstorm/Tutorials/PipelineEditor

I hope this helps,
Martin

1 Like

If you have already prototyped all your analysis on one or two subjects and want to reproduce the same analysis steps on all the subjects, you can try to write a script that reproduces all your analysis. This will have the advantage of making it reproducible, and easy to modify if you need to change a parameter.
You would also be able to submit the analysis script together with your manuscript when you publish your results, which is a huge plus for any publication.

Start by reading the introduction to Brainstorm scripting:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

Then you may get some inspiration from the analysis scripts we wrote for a recent publication. The first tutorial explains the single-subject analysis, the second one the group analysis, and the corresponding scripts are available for both of them (see at the end of the pages):
https://neuroimage.usc.edu/brainstorm/Tutorials/VisualSingle
https://neuroimage.usc.edu/brainstorm/Tutorials/VisualGroup