Quantification error following segmentation in Osprey

Dear Osprey developers,

Firstly, thank you so much for all the help you have provided so far. Osprey is lovely and I am looking forward to using it for my analysis. I have almost ironed out all issues I’ve come across but there is one final error that pops up when I try running the quantification step:

Timestamp September 24, 2021 11:37:57 Osprey 1.1.0  OspreyQuantify

Quantifying dataset   1 out of   1 total datasets...
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 0-by-1.

Error in OspreyQuantify>quantAlpha (line 775)
    AlphaCorrWaterScaled(2,:) = ConcIU_TissCorr_Harris ./ (fGM + alpha*fWM);

Error in OspreyQuantify (line 298)
        [AlphaCorrWaterScaled, AlphaCorrWaterScaledGroupNormed] = quantAlpha(metsName,amplMets, amplWater,getResults, metsTR, waterTR, metsTE, waterTE, fGM, fWM,
        fCSF, meanfGM, meanfWM,MRSCont.opts.fit.coMM3,Bo);

Error in osp_onQuant (line 33)
    MRSCont = OspreyQuantify(MRSCont);
Error while evaluating UIControl Callback.

NB. If I run quantification without segmentation first (but doing all other steps), I do not get this error message.

I have been in touch with @admin about earlier issues so I have shared the data in the same OneDrive location (in a folder called “Osprey_query_CM/Quantification_error”). please let me know if you need me to add permissions for another user.

Thanks so much for all the help you have provided so far - I really appreciate it.

Carolyn McNabb

Hi Carolyn,

Happy to hear that you are finding your way around in Osprey!

Could you give me access to the folder as well or resend the link (hzoelln2@jh.edu - at least I think I don’t have access yet). The folder should also contain your jobFile for reference.

This error only appears when you have run the Segmentation module because it requires tissue segmentation to be included. Otherwise, it will skip this quantification method. However, it’s still unclear how this is happening. I’ll try to figure this out with your data.


1 Like

Thank you @Helge!
I have added you to the folder - all the files (including the jobfile) are in the Quantification_error folder.
Please let me know if you need anything else.

Best wishes,

1 Like

Hi Carolyn,

I think I’ve solved this issue:

The problem was that we have changed the name of the coedited MM model without announcing that somewhere or making sure that everything is backward compatible. The current model names are.

% How do you want to model the co-edited macromolecules at 3 ppm for GABA-edited MRS?                                                
opts.fit.coMM3              = '3to2MM';         % OPTIONS:    - {'3to2MM'} (default) 
                                                %             - {'3to2MMsoft'}
                                                %             - {'1to1GABA'} 
                                                %             - {'1to1GABAsoft'} 
                                                %             - {'freeGauss'} 
                                                %             - {'fixedGauss'}
                                                %             - {'none'} 

(Copied from the jobSdat_MEGA example file).

You just have to change your 3to2MMhard to 3to2MM and everything should work as expected.


1 Like

Thank you @Helge!

That worked like a charm. So glad it was an easy fix.

Many thanks for your help. I hope you have a lovely week.


1 Like