Segmentation with multiple MRS acquisitions

Hi all,

I’m using Osprey to process a dataset of 25 subjects, 2 sessions and 4 PRESS acquisitions per session in different anatomical locations.
I can fit the MRS data without problems but Osprey repeats the SPM segmentation for each voxel. It doesn’t seem to recognise when the segmentation has already been performed.

I have tried to follow the guidance for organising data, e.g.:
etc. etc.

Looking at the /FilesSPM output, Osprey appears to treat the voxels as different subjects:

Grateful for any suggestions…


Hi @mjt320,

Thanks for reaching out and using Osprey! The BIDS structure looks right to me.

Could you attach your job file here? I was wondering if you are trying to analyze both voxels in one job file. I would recommend creating one jobfile per voxel. Afterward you run the complete analysis for one of the regions. In the second job file you add the segmentation outputs (c1…, c2…, c3…) as files_seg cell array (see …/osprey/exampledata/sdat/UnEdited/jobSDAT.m) to reload the already performed segmentation for the other voxel.

Let me know if you have any further questions about this.


1 Like

job.m (10.2 KB)
Hi @Helge,

I was indeed trying to process all of the voxels in a single job file (attached).
If separating them is recommended then I will try that.
Thank you so much for the quick reply.


1 Like

Running voxel 2 separately, pointing files_seg to the segmentations in voxel 1’s FilesSPM folder seems to work.
I’m still keen to script the analysis…perhaps a makejobfile file is the answer!
Thanks again.


Hi @mjt320,

great to hear that it is working now.

You can indeed script the analysis and I agree that this is not optimally documented (we are currently working on overhauling the documentation).

There is a [MRSCont] = RunOspreyJob(jobFilePath) function that runs all analysis steps based on the supplied files. You can also take a look at this function to see the function names for each module. As you have used BIDS standard to organize your data you should be able to use the automated generation of the jobfile (see for example osprey/exampledata/sdat/jobSDAT.m)


1 Like