schorschinho / osprey

All-in-one toolbox for processing of magnetic resonance spectroscopy data.
https://schorschinho.github.io/osprey
MIT License
52 stars 41 forks source link

[BUG] - peculiar defaults for MEGA-editing with non-GABA targets #723

Closed alexcraven closed 2 months ago

alexcraven commented 2 months ago

For MEGA editing scenarios with non-GABA targets, the user interface forces a default MM3co model of 3to2MM, which is probably not meaningful in those scenarios but cannot be changed from the user interface.

To Reproduce Steps to reproduce the behavior:

  1. Create Job (interactive jobfile generator)
  2. Sequence Type MEGA, Editing Target GSH
  3. MM3co model cannot be changed from 3to2MM
  4. OspreyFit subsequently fails if MM09 is not in the basis set, due to corresponding check in osp_addDiffMMPeaks

Expected behavior "none" may be a more appropriate default for non-GABA editing targets? Perhaps osp_addDiffMMPeaks should not be called at all in such a scenario?

Suggested Fix

CreateOspreyJob_app.m around line 521, add

app.MM3coDropDown.Value = 'none';

Relatedly... Whilst looking into this issue, I noticed that the included metabolites for LCModel fitting are probably unsuitable for use with a Lactate editing target: osp_fitInitialise.m line 354

HJZollner commented 2 months ago

Hi @alexcraven,

thank you for reporting this. I'll take a look.

About the LCModel MEGA-PRESS wrapper. It is currently meant for GABA-edited MP but could be easily changed according to the target metabolite.

Helge

HJZollner commented 2 months ago

Hi @alexcraven,

GUI job creator is fixed here (#724).

And I have also changed fitInitialise to assume GABA-editing as a special case of editing. For any other target metabolites, the full basis set is included, and the co-edited MMs are not added to the model. Should also be straight forward now to add a special case for GSH-editing if needed (#725).

Helge

alexcraven commented 2 months ago

Great; thanks! #724 looks fine in my testing.