Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Key metabolites (eg, Ins) dropped from LCModel fit with supplied basis #793

Open
alexcraven opened this issue Nov 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@alexcraven
Copy link
Contributor

Describe the bug

Osprey actively excludes basis set elements which don't conform to its naming conventions, even when explicitly asked to include everything (Included Metabolites => Full) in the basis set. This leads to omission of key metabolites from basis sets with alternative/legacy naming conventions -- most prominently, Ins vs mI (both of which are acceptable in the LCModel world, ref table 8.1 of the LCM manual).

To Reproduce
From the Osprey job creation GUI...

  1. Fitting algorithm => LCModel
  2. Included Metabolites => Full
  3. Basis set file => A basis set which dares to label "mI" as "Ins" or "mIns" (eg, this one: problematic.basis.txt)
  4. Load and fit the data
  5. Observe horrifying residuals where mI should be.

Expected behavior
All the metabolites in the basis set are included when "included metabolites" is set to "full".

Additional context
I'm fairly sure the exclusion is happening around Line 378 of osp_fitInitialise.m. Not really sure what an appropriate solution would be; some possible options:

  1. If "included metabolites" is set to full, don't create "chomit" entries for any item which exists in the basis set. This is a good general solution for arbitrary metabolites, but won't actually solve the problem for mI/Ins with the "default" set of included metabolites
  2. Update the list of metabolites (checkboxes) according to the contents of the selected basis set. This is awkward to implement, but nicely generalisable
  3. Implement aliases/renaming for the most common variants. An incomplete, messy solution but addresses the most critical issues.
  4. Just detect and warn users in this scenario so they can update the basis set accordingly
@alexcraven alexcraven added the bug Something isn't working label Nov 6, 2024
@HJZollner HJZollner self-assigned this Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants