Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 2.33 KB

README.md

File metadata and controls

61 lines (42 loc) · 2.33 KB

plotLCMBasis

This is a little MATLAB function to quickly plot LCModel basis sets (.basis).

To generate a figure with staggered plots of basis functions in the basis set, simply run

out = plotLCMBasis('yourBasisSet.basis');

Example basis set plot

The amount of stagger is determined automatically, but can be overridden with an additional input argument (see below).

Text overlap is not controlled for, so you'll probably need to resize the figure a little.

Usage

out = plotLCMBasis(basisSetFile, stagFlag, metsToPlot, zf, ppmmin, ppmmax, xlab, ylab, figTitle)

Inputs

basisSetFile    = LCModel basis set in .basis format (required)
stagFlag        = flag to decide whether basis functions should be plotted
                    vertically staggered or simply over one another (optional.
                    Default: 1 = staggered; 0 = not staggered)
metsToPlot      = cell array with the names of the metabolites to be plotted
                    (optional. Default: 'all' = all metabolites will be plotted)
zf              = Zero-filling factor for smoother plotting (optional. Default 1, i.e., no zero-fill)
ppmmin          = lower limit of ppm scale to plot (optional.  Default = 0.2 ppm).
ppmmax          = upper limit of ppm scale to plot (optional.  Default = 5.2 ppm).
xlab            = Label for the x-axis (optional.  Default = 'Chemical shift (ppm)');
ylab            = label for the y-axis (optional.  Default = '');
figTitle        = label for the title of the plot (optional.  Default = '');

Features

  • Staggered and non-staggered plots of basis functions.
  • Option to plot a subset of basis functions (provided in the argument metsToPlot).
  • Supports encrypted LCModel basis sets (as available on the LCModel website - not that anyone should use those)

System requirements

This should run on any MATLAB version without toolboxes (but has not been systematically tested).

Contact, Feedback, Suggestions, Feature Requests

Please open a GitHub issue.

Acknowledgements

This work has been supported by NIH grants R00 AG062230 and R21 EB033516.

The LCModel basis set reading code features contributions from the following individuals:

  • Jamie Near (Sunnybrook Institute, Toronto)
  • Helge J. Zöllner (Johns Hopkins University)
  • Alexander R. Craven (University Bergen)