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.:
BIDS\sub-001\ses-01\anat\sub-001_T1w.nii
BIDS\sub-001\ses-01\mrs\sub-001_echo-1_nuc-1H_voi-ACC_ref
BIDS\sub-001\ses-01\mrs\sub-001_echo-1_nuc-1H_voi-ACC_svs
BIDS\sub-001\ses-01\mrs\sub-001_echo-1_nuc-1H_voi-PCC_ref
BIDS\sub-001\ses-01\mrs\sub-001_echo-1_nuc-1H_voi-PCC_svs
etc. etc.

Looking at the /FilesSPM output, Osprey appears to treat the voxels as different subjects:
sub-001_ses-01_sub-001_T1w_seg8.mat
sub-002_ses-01_sub-001_T1w_seg8.mat

Grateful for any suggestions…

Thanks,
Michael

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.

Best,
Helge

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.

Best,
Michael

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.

Michael

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)

Helge

1 Like