In vivo magnetic resonance spectroscopy (MRS) is a powerful tool for biomedical research and clinical diagnostics, allowing for non-invasive measurement and analysis of small molecules from living tissues. However, currently available MRS processing and analytical software tools are limited in their potential for in-depth quality management, access to details of the processing stream, and user friendliness. Moreover, available MRS software focuses on selected aspects of MRS such as simulation, signal processing or analysis, necessitating the use of multiple packages and interfacing among them for biomedical applications. The freeware INSPECTOR comprises enhanced MRS data processing, simulation and analytical capabilities in a one-stop-shop solution for a wide range of biomedical research and diagnostic applications. Extensive data handling, quality management and visualization options are built in, enabling the assessment of every step of the processing chain with maximum transparency. The parameters of the processing can be flexibly chosen and tailored for the specific research problem, and extended confidence information is provided with the analysis. The INSPECTOR software stands out in its user-friendly workflow and potential for automation. In addition to convenience, the functionalities of INSPECTOR ensure rigorous and consistent data processing throughout multi-experiment and multi-center studies.
In vivo magnetic resonance spectroscopy (MRS) enables the noninvasive measurement of small molecules from localized regions in living tissue, thereby providing a powerful tool to assess tissue metabolism and function. The repertoire of measurable chemical compounds makes MRS a versatile tool for researching living systems (Supplementary Material, S1) and characterizing clinical conditions, especially for longitudinal studies requiring repeated experimentation. For instance, proton (1H) MRS is applied to many central nervous system disorders, ranging from multiple sclerosis to cancer, that involve significant metabolic alterations in the concentrations of small molecules1. Despite the strong potential of MRS for cutting-edge biomedical research and clinical applications, deviations from optimal data quality, processing strategy or quantification pipeline reduces the metabolic information that can be extracted. Resulting systematic errors have been suspected to be the key contributing factors for limited multi-site reproducibility2.
Concentrations of metabolites measured with in vivo MRS are typically in the millimolar range (< 12 mmol/L or mM)3,4. The concentration of tissue or free water signal (e.g. cerebrospinal fluid), by comparison, is in the molar range (40–55 M)5. Due to the low overall Boltzmann spin magnetization, MRS is a low-sensitivity method, and a single measurement of metabolites suffers from low signal-to-noise ratio (SNR)6. MRS benefits from a magnetic resonance (MR) scanner with a strong and homogeneous static magnetic field (B0)7, a relatively large volume of interest (VOI), and signal averaging, to name a few.
MRS software provided by MR scanner vendors is generally limited in scope and function, potentially resulting in inconsistent quantification accuracy and non-standardized study outcomes8,9. Data of high experimental quality should therefore be complemented by efficient and state-of-the-art data processing and analysis routines9. Robust and precise signal processing and analysis MRS are of the utmost importance because retaining every possible bit of information from start to finish is vital for accurate analysis of the final result. Similarly, potential erroneous and artificial signal contributions need to be identified and corrected or excluded from further analysis to avoid degradation or falsification of the derived metabolic information.
MRS experiments capture complex multi-dimensional data that are recorded as complex signal amplitudes over time in free induction decays (FID). An FID dataset can be defined as: NR × NRec × NFID, where NR is number of repetitions, NRec is number of receivers or coil channels, and NFID is number of complex points in the FID. The FID signal recorded over the time domain (in msec) contains the sum of responses from all nuclei (spins) and needs to be transformed to the frequency domain (in Hz) with discrete Fast Fourier Transform (FFT) to constitute a spectrum. Although the frequency spectrum is the desirable form for interpretability, inspecting both time and frequency domains is beneficial for data processing.
Linear combination modeling (LCM) is the most popular method of quantifying the small-molecule metabolite concentrations expressed by in vivo MR spectra9. This method depends on high-quality basis functions considering the MRS experiment at hand and need to be measured or simulated for each metabolite. Novel MRS simulation algorithms are precise and fast10, and in combination with modern desktop workstations, simulation of the collection of basis functions (basis set) has become the preferred method over measurement in most laboratories. After analyzing all the information from the spectra, MRS signals from each compound in the sample can be quantified in arbitrary, institutional or absolute units (commonly in mM)11.
The typical MRS data processing stream often requires the scripted combination of several software packages, which are rarely computer platform-independent. An unmet need therefore exists for a comprehensive software tool offering integrated MRS signal processing, simulation and analysis.
The MRS software INSPECTOR was developed as a user-friendly and free package with all tools necessary for the many steps involved in translating raw FIDs from MRS experiments into physically interpretable metabolite concentrations. These include visualizing numerous aspects of the raw experimental data, processing the averaged spectrum, simulating the basis set used for linear combination modeling, and finally analyzing the processed spectrum with the basis set and LCM parameters of choice. The program is designed to enable the user to visualize, deeply inspect and manipulate each step of the workflow in a one-stop-shop interface. This paper highlights INSPECTOR’s key features most used in MRS research.
Platform-independent freeware tool
INSPECTOR was developed in MATLAB (MathWorks, Natick, MA) as a stand-alone user-friendly software with powerful analytic capabilities for applying magnetic resonance spectroscopy data to biomedical research and ultimately clinical applications12. INSPECTOR is freeware for non-commercial applications and requires neither MATLAB nor other software dependencies13. INSPECTOR is available for Microsoft Windows, Apple MacOS and Linux, making it platform-independent and functional on all commonly used operating systems. The only requirement is installation of the MATLAB Runtime environment available for download from the MathWorks website free of charge and without a license14.
Interface and data management
INSPECTOR is organized into ‘pages’, each offering a set of functions related to specific aspects of MRS signal manipulation, like data handling, processing, simulation, and quantification. INSPECTOR is controlled entirely through a graphical user interface (GUI) (Fig. 1). The application pages are sorted in a menu bar from left to right according to a typical workflow. Additional information is either printed as a summary or in detail (“Verbose” mode) in an information window. Loaded data can be transferred from one page to another. The data can be accessed and visualized in either time or frequency domain on any page.
A typical processing workflow of brain MRS data in INSPECTOR comprises several steps, which can be further differentiated according to regular, J-difference editing (JDE) or other spectroscopy experiment types15 (Fig. 2). Experimentally acquired raw data are loaded and averaged on the Data page. Spectra can be further improved on the Processing page using standard signal processing methods. Basis sets for metabolite quantification can be simulated on the Synthesis or MARSS page and used for spectral analysis on the LCM page. An overview of each page follows below.
Pages and applications
Each page, named for its corresponding step in the MRS data handling pipeline, contains various associated functions for data processing and visualization. Users can view function hints via mouseover. An overview of these functions is available in Supplementary Material (S2).
Examples from our and other laboratories are given below demonstrating particular functionalities available on each page of INSPECTOR. Examples from published studies are cited in the text; acquisition details can be found in Supplementary Material (S3).
The Data page contains methods for loading and saving protocol files, loading data, quality assessment (QA), and spectral alignment for averaging individual traces into a single spectrum used in further processing and analysis.
Protocol files enable saving a complete image of all parameter selections and the INSPECTOR workflow. One file can store all adjustments and paths used for loading data, processing, simulation and quantification. Protocol files were designed to facilitate consistency and reproducibility of data processing, especially in case of data from longitudinal, multi-center, or otherwise large studies.
Data can be sorted according to MRS experiment type. A simple MRS experiment can be loaded as “Regular MRS”, whereas JDE experiments with two or three conditions can be loaded as “JDE”. INSPECTOR supports the following data formats:
Siemens: .dat, .rda, .IMA, .dcm
General Electric: .7
Philips: .raw, .sdat
Bruker: fid, rawdata.job0
DICOM16: .dcm, .IMA
All MRS-relevant header information, such as echo time (TE), repetition time (TR), NR, spectral width, Larmor frequency, volume of interest (VOI) and more, are displayed on the Data page after the data are loaded. The Data page allows inspection of acquired receive channel-specific signals, which can be visualized as FIDs in the time domain or as spectra in the frequency domain. In vivo MRS experiments are susceptible to system B0 drifts, which have consequences for data quality as they may affect the efficiency of frequency-selective RF pulses for water suppression or editing, and cause spectral line broadening when MRS signals are combined. It is therefore desirable to break down long MRS scans into smaller parts to allow intermittent experimental frequency adjustments that mitigate such effects. INSPECTOR supports the handling and concatenation of such scan series in addition to basic single-scan data formats. Water references support the calculation of channel-specific scaling factors and phases for sensitivity-weighted channel combination of FID traces. Phase correction is based either on Klose’s method (used also for eddy-current correction, ECC)17, which is recommended, or on taking only the first FID point as a phase reference. Similar to the metabolite data, the header information is displayed as well.
In vivo MRS also commonly suffers from oscillatory frequency and phase variations due to magnetic susceptibility-induced B0 variations across the subjects’ respiratory cycles18. Before further treatment of signal repetitions, data can be inspected by the QA tool. The QA tool provides simple and fast data visualization and quality management for assessing frequency drift, hardware instability, subject motion, and other effects that can cause variability across scan repetitions. Visualization of the spectra in the QA tool enables the analysis and display of the signal (1) minimum, (2) maximum, (3) mean, (4) median, (5) standard deviation (SD) and (6) integral over the selected spectral frequency window. Erroneous data, e.g. due to technical malfunction of individual receivers or excessive motion, can be thereby identified and discarded. The QA tool can be applied before and after potential frequency, phase and amplitude corrections for optimal quality management and a side-by-side comparison of the effects of data manipulation and correction.
Frequency, phase or amplitude corrections are fully automated and based on an arbitrary number of concomitantly considered frequency windows (e.g. 0…2.1 ppm, 3.3…4.1 ppm and 7.1…9.1 ppm) and tailored spectral preprocessing such as line broadening, apodization (cut) and zero-filling. Frequency, phase and amplitude alignment rely on the comparison of a MRS trace with a reference, and a customized amplitude-weighted cross-correlation algorithm is applied to minimize the deviation of the two. The reference FID signal can be either a specific trace or a combination of traces (for improved SNR). Additional parameters include variation range and resolution in Hz for frequency alignment, phase step in degrees for phase alignment and polynomial order for amplitude alignment.
MR spectra pertaining to different JDE conditions, i.e. with editing radiofrequency (RF) pulses ON vs. OFF, are inherently distinct in content and thus also shape. INSPECTOR applies all corrections in an editing condition-specific fashion, before MRS traces are combined into two averaged spectra representing the ON and OFF conditions.
Example: loading and pre-processing of brain MRS data
INSPECTOR can visualize and selectively analyze data from each coil channel and repetition, or any combinations thereof. This enables inspection of all recorded signals in time or frequency domain for consistency and identification of signals that might be corrupted and therefore should be omitted from the final averaged spectrum. The signals can be visualized individually, as a superposition or as an array (Fig. 3a).
The QA tool and the Align tool work together to support data visualization both before and after the potential corrections of frequency, phase and amplitude. The example shows amplitude (Series mode) as well as phase and frequency (Superposition mode) of the real-valued N-acetylaspartate (NAA) peak measured in the human brain at 7 T before and after frequency and phase alignment with the Align tool. The data can be inspected in series or as a superposition of traces over a user-defined frequency range (Fig. 3b) as well as a spectral array (not shown).
INSPECTOR allows various steps to be involved in the signal processing, from simple averaging of all signals to more refined handling of all signals, which consist of RF receive channel-specific, i.e. relative, phase correction, weighting of receivers and phase and frequency alignment of the resultant spectra (Fig. 3c). As can be seen in the example, the highest SNR and lowest full width at half maximum (FWHM) of the methyl group of total creatine (tCr, 3.03 ppm) signal were measured in a spectrum processed with receiver-specific relative phase correction and sensitivity-weighted averaging, and phase and frequency alignment of the resultant sequence repetitions. Combination of these methods is recommended9.
The Processing page contains methods for loading, visualizing, calibrating, filtering, baseline-correcting, and otherwise post-processing spectra.
The data can be transferred from the Data page (resulting from the pre-processed and averaged set of experimental spectra), Synthesis page, or LCM page or directly loaded as INSPECTOR’s native (.mat) data format, the combination of text (.txt) and parameter (.par) files used by the NMRWizard software19; data (.raw), parameter (.coord) and basis set (.basis) formats used by LCModel software20 and jMRUi’s (.mrui) data format21, enabling side-by-side software comparison and interfacing. INSPECTOR uses established methods for signal processing in MRS: Lorentzian and Gaussian line-broadening filters, zero-filling, zero- and first-order phasing, amplitude scaling, frequency shifting, and baseline offsets as described in the literature22.
MRS spectra with non-flat baselines can be corrected with the Baseline handling tool. For example, non-flat spectral baselines can originate from solids (e.g., plastics) in the RF coil housing23, especially when the data are measured with pulse-acquire methods. The Baseline handling tool allows baseline manipulation using polynomial interpolation over specific frequency ranges. It also allows removing unwanted signals (e.g., water in case of insufficient water suppression) using the Hankel singular value decomposition method24.
Standard processing approaches are extended by unique functionalities and algorithms specifically developed for in vivo MRS. For instance, the alignment of two spectra, representing, for example, the condition-specific averages of the JDE spectra ON and OFF, can be achieved by nonlinear least squares optimization considering up to 8 different aspects of spectral processing such as relative frequency shifting, exponential line broadening, polynomial baseline, and others. This advanced spectral alignment can be applied for arbitrary selections of specific frequency ranges over which signals are expected to remain unaffected and can therefore support spectral alignment between different JDE conditions. All these functionalities can be conveniently selected and combined through the GUI.
Analysis of SNR, FWHM and peak integral can be performed over any user-defined target frequency range. Noise for SNR measurement is similarly calculated over a user-defined frequency range.
Example: J-difference editing on GABA at 3 T
In this example dataset, showing processing of two spectra for measuring glutamate and glutamine (Glx) and gamma-aminobutyric acid (GABA) in a healthy adult (44 years, male) in the auditory cortex, the frequency alignment between averaged JDE ON and OFF spectra concomitantly considering the frequency ranges 0…0.5 ppm, 3.15…3.50 ppm and 3.87…4.20 ppm resulted in visually overlapping and aligned spectral peaks (Fig. 4a,b). Yet the difference between the two conditions exhibited notable subtraction artifacts in spectral areas comprising strong singlet peaks from tCr and choline (Cho) (Fig. 4c, blue). While the subtraction error at 3.20 ppm from Cho is likely irrelevant for quantification, the corresponding tCr-related artifact at 3.03 ppm overlaps with the targeted GABA signal and is thus expected to induce systematic errors in the quantification of GABA. The additional consideration of line broadening, (minute) amplitude scaling, offset and zero-order phase correction, in addition to frequency alignment, not only improves the apparent overlap of spectral ON and OFF conditions (Fig. 4b), but, more importantly, also enables difference signals void of apparent subtraction artifacts (Fig. 4c, red) as a prerequisite for meaningful quantification of GABA from these spectral data.
The Synthesis page contains methods for simulating and processing singlet arrays and brain spectra with varying spectral quality and baseline effects.
Basis functions consisting of singlets are useful for LCM analysis of water, lipids, macromolecules or X-nuclei (non-1H nuclei) MR spectra. One or more singlets can be simulated according to Larmor frequency (the scanner B0 field), bandwidth, calibration of synthesizer frequency in ppm and number of complex points. Every singlet can be individually characterized by frequency in ppm units, amplitude in arbitrary units and linewidth in hertz units, in the MATLAB syntax: [frequency amplitude linewidth]. In addition, complex Gaussian noise and polynomial baselines can be added to the simulated spectrum in the frequency domain in a flexible and well-defined fashion. Signals can be further processed with the same methods as on the Processing page, such as cut, zero filling, Lorentzian and Gaussian line broadening, and corrections to phase, scale, shift, and offset. These functionalities can be used to illustrate and quantify the impact of spectral quality including line shape, baseline and SNR on the accuracy of spectral fitting and linear combination modeling (compare Monte-Carlo functionality on LCM page).
In certain situations, a high-quality brain spectrum can be useful, for example, for SNR simulations, the explorations of the effects of signal processing or for teaching purposes. In this case, a 1H MR spectrum can be synthesized on the Synthesis page. This spectrum includes all relevant metabolite signals at (average) concentrations taken from the literature6.
Example: Synthesis page
The Synthesis page allows the generation of singlet and other spectral signals (Fig. 5a), which can be employed as basis functions (or part thereof) for quantification of MRS signals. Adding varying levels of well-defined noise to these signals can be useful for studying the impact of noise for analysis (Fig. 5b). The Synthesis page also enables simulation of singlet arrays (Fig. 5c) and a 1H brain spectrum using already simulated basis functions (Fig. 5d), resembling realistic use cases.
The Magnetic Resonance Spectrum Simulator (MARSS) page contains methods for simulating the signals of arbitrary MRS metabolites, i.e., spin systems, based on the quantum mechanical density-matrix formalism providing a complete theoretical description of any nuclear magnetic resonance experiment25.
MARSS has been shown to provide experimentally realistic spectra for the commonly employed MRS sequences STEAM26, PRESS27, semi-LASER28, LASER29, and SPECIAL30. LCM for quantification employing simulated basis functions relies on the assumption that the calculated spectra resemble physical reality. MARSS has been incorporated into INSPECTOR for the automated simulation of full metabolite basis sets comprising realistic sequence- and vendor-specific spectral shapes for metabolite quantification free of systematic errors based on the selection of scanner vendor, MRS sequence type, and basic acquisition parameters such as B0 field strength or TE. It has been previously demonstrated that the basis functions expected for even the same sequence by different vendors can differ significantly10; as such, the ability to easily generate vendor-specific basis sets, for instance, for Siemens, General Electric and Philips, is of great importance to the MR spectroscopy field.
MARSS is able to simulate even complicated nuclear spin systems more quickly than other available simulation packages10 by employing the so-called T-matrix algorithm31, which reduces the computational complexity of the task. The current implementation is capable of simulating a full basis set for a three-pulse sequence comprising 23 standard brain metabolites including glucose, GABA and other coupled spin systems with 1283 spatial points in 26 min on a personal desktop computer. The theoretical background for MARSS and further performance metrics are described in more detail in the literature10.
Example: simulation of lactate and the superposition of glutamate and glutamine at 3 T
Varying MRS sequence parameters like TE or mixing time (TM), and, as mentioned, even vendor-specific implementations of the identical MRS sequence and parameters, have been shown to yield markedly different MRS signal shapes10. This can be illustrated using the lactate 1H spectrum, which exhibits multiplet resonances from spin-coupled nuclei. Since vendors use different excitation and, more importantly, refocusing RF pulse shapes with different bandwidths, the resultant spectral patterns obtained experimentally will differ depending on these conditions (Fig. 6a). Variations between spectra are small at short TE (30 ms), but they become clearly visible at long TE (144 ms). Such differences can be propagated over a larger basis set of brain metabolites and will inevitably lead to systematic errors in LCM fits and ultimately inaccurate metabolite concentration estimates.
Spectral shapes rely in a complex fashion on MR sequence parameters and details of the spin system such as chemical shift and J-coupling. The optimization of spectral shapes for SNR and quantification accuracy as a result of spectral distinctiveness through variation of experimental parameters (e.g., TE) is therefore a very time-consuming, cumbersome and costly task when approached experimentally. If the characteristics of the spin system are well known, simulations provide an easy and fast way to observe resolution and potential for separation at various B0 field strengths. For example, a well-known problem of effective spectral resolution of glutamate (Glu) and glutamine (Gln) signals at 3 T can be approached by simulating the molecules’ J-modulation across various echo times (Fig. 6b).
The linear combination modeling (LCM) page contains methods for loading and processing averaged spectra, creating and managing basis sets, adjusting and running LCM analysis, and exporting results for further data or statistical analysis.
Data for LCM analysis can be retrieved from the Data page, Processing page, or Synthesis page; it can also be directly imported from file in INSPECTOR’s native format (.mat), as text (.txt) and parameter (.par) formats used by NMRWizard software19, in the (.raw) data format used by used by LCModel software20, and the jMRUI data format (.mrui)21.
A Basis Tool is provided to import, visualize, annotate and manage basis functions and create basis sets. Any number of spectral signals can be converted into a basis set, including those generated on the Synthesis page, simulated with MARSS or provided by external software tools such as NMRWizard (.txt, .part), LCModel (.raw) or jMRUI (.mrui).
INSPECTOR’s LCM functionality treats the quantification problem as a nonlinear least squares problem with user-defined tolerance functions, maximum iterations, and maximum function evaluations. It hereby provides access to all parameters and boundary conditions for maximal transparency, i.e. no black box, and flexible user-defined tailoring of the quantification algorithm. LCM can perform quantification of real- or complex-valued spectral shapes including Lorentzian and Gaussian line shaping or combination thereof (Voigt model). The spectral baseline can be handled under full user control including polynomials up to 10th order, b-splines of customizable knot interval and smoothing weight32, experimentally measured macromolecule signal(s), broad synthesized signals, or various combinations thereof.
INSPECTOR’s LCM functionality provides Cramér–Rao lower bounds (CRLB)33 errors for all optimization parameters including amplitudes (or concentrations), various forms of line broadening, and frequency shifts as well as polynomial and spline baseline shapes, i.e. not only for metabolite concentrations. In addition, CRLB can be calculated for arbitrary metabolite combinations including, but not limited to NAA + N-acetylaspartylglutamate (NAAG), Glu + Gln or choline + phosphocholine + glycerophosphorylcholine (Cho + PCho + GPC). In addition, extended confidence metrics including Monte-Carlo simulations and Hessian error estimates of the least-squares optimization are available for a more complete picture. The full correlation matrix entailing all parameters and calculation of CRLB for any desired metabolite combination (= summation) is supported through flexible adaptation of the prior-knowledge matrix P33. In general, INSPECTOR can analyze spectra from any nuclei, B0 strength or tissue type, if provided a suitable basis set.
Example 1: LCM in the brain
The quantification of brain metabolites can be streamlined with LCM in INSPECTOR employing basis sets generated in MARSS. Short-TE brain spectra (20–30 ms) measured at 3 T contain several overlapping and J-coupled signals; therefore, the basis functions of all metabolites and macromolecules need to be simulated with precision or measured using the same sequence as the in vivo data to which the model is being fit. In current practice8, the basis functions of metabolites are simulated and the basis function or background signals of macromolecules is measured when applicable. LCM finds appropriate line broadening parameters, frequency shifts, scaling amplitudes, and other applicable transformations for each basis function. The fit with all basis functions, baseline and residual signals can be visualized after the LCM analysis3 (Fig. 7a), transferred to other INSPECTOR pages for further analysis or exported as complex FIDs as needed.
Measured macromolecule spectra can not only inform models for quantification of brain metabolites but can also themselves serve as targets for quantification. Analysis of macromolecules can provide insight into metabolism of proteins in brain tissue34,35. Since “macromolecules” in MRS parlance comprise what can be large and complex polypeptides with highly complex coupling networks35, it is currently not feasible to simulate their spectral shapes from the density matrix formalism like metabolites. It is more common to employ, rather, a basis set consisting of singlets representing groups of known macromolecular signals at specific chemical shifts36 (Fig. 7b).
The in vivo detection and measurement of GABA37, the major inhibitory neurotransmitter in the mammalian brain, is of particular interest in psychiatry and neuroscience38,39. Because signals from GABA overlap with signals of higher-concentration molecules (e.g., tCr at 3.03 ppm), the JDE technique is routinely used for its isolation and detection. However, due to an imperfect profile of editing pulses and similar J-coupling constants, GABA is often co-edited with macromolecules (GABA+). Since the editing conditions in the sequence are known, the basis set can be used for analysis of the edited spectrum containing GABA+ , glutamate + glutamine (Glx) and total N-acetylaspartate (tNAA) (Fig. 7c).
Glutathione (GSH) is an endogenous antioxidant implicated in several biological processes, including those associated with multiple sclerosis40. Its detection, similarly to GABA, is performed with JDE experiments, which results in an edited spectrum containing GSH and tNAA signals41 (Fig. 7d). It has been shown previously that processing and quantification of GSH with INSPECTOR was accurate and reproducible41,42.
Example 2: LCM in preclinical research and X-nuclei MRS
Applications of MRS in preclinical oncology research are driven by the detection of chemical compounds associated with cancer biology, for instance choline-containing compounds or total choline (tCho), with a distinctive peak at 3.2 ppm. tCho contains choline, phosphocholine (PC), and glycerophosphocholine (GPC) contributions; however, due to their close chemical shifts, they cannot be resolved from each other using in vivo 1H MRS. A spectrum measured from a 0.027 mL volume of interest (VOI) in a murine pancreatic tumor at 9.4 T employed a basis set created in MARSS for LCM quantification of tCho, lipids and taurine (Tau) (Fig. 8a).
The use of short 10 ms TE minimizes signal losses due to T2 relaxation effects and increases the contributions of coupled spin systems such as glutamate (Glu) and glutamine (Gln). An analyzed spectrum from a 0.125-mL brain VOI in an anesthetized macaque measured at short TE using a vertical 7 T MR system36 showed well resolved Glu and Gln signals at 2.35 ppm and 2.45 ppm, respectively (Fig. 8b).
A prominent disadvantage of 1H MRS is the relatively large spectral overlap of metabolites. For example, as mentioned before, the contributions in tCho cannot be well resolved with 1H MRS. However, other nuclei, like phosphorus (31P), can detect several choline compounds with larger spread in their respective chemical shifts. 31P MRS is also often used for investigations into energy metabolism due to relatively easy detection of adenosine triphosphate (ATP)45. A 31P spectrum measured in the human liver at 7 T was analyzed in LCM with a basis set created on the Synthesis page (Fig. 8c). Note the clear separation of PC and GPC.
Carbon (13C) MRS can provide measurements of neuroenergetics and neurotransmitter cycling in the human brain46. Thanks to a large spread of chemical shifts, molecules like GABA, Gln and Glu can be detected directly, without strong overlaps (Fig. 8d). Similar to the 31P MRS liver example, the basis set in Fig. 8d was created using the Synthesis page.
This paper has provided an overview of the INSPECTOR software and its functionalities, which offer the tools necessary for inspecting, processing and analyzing spectroscopy data in a unitary software solution.
INSPECTOR is intended for users ranging from novices to experts. It is GUI-based and platform-independent, able to read almost all single-voxel MRS data formats. Having all necessary tools in one application, researchers can analyze experimental data right out of the box. Therefore, INSPECTOR can be easily employed by a researcher or laboratory processing and analyzing MRS data for the first time. Experienced users can analyze every trace of the FID via the GUI and discard or fix corrupted signals. This functionality can help to ensure high-quality experimental data and to troubleshoot if needed, e.g. in case of coil hardware failure or subject motion. Each functionality can be fine-tuned according to specific experimental needs. High-level data processing and quality management were incorporated into the pipeline to ensure data consistency and reproducibility.
INSPECTOR is written in MATLAB, which gives users several advantages. All spectral data can be exported in a MATLAB data format, thereby rendering them easily accessible for additional processing if needed. Since all figures are displayed in MATLAB, graphics can be exported in various graphical formats (e.g., .png, .tif, .eps), which enables easy handling and publication. The software includes ample options for documentation and visualization, including automated figure export in the above graphical formats or saving of LCM results in MS Excel file tables.
Protocol files are an important feature of INSPECTOR. MRS data need to be treated differently according to the tissue, nuclei, and acquisition methods from which they were derived. Each experiment requires unique settings of numerous parameters, which can be difficult to memorize and recover, a method prone to human errors. Protocol files save all this information in a complete image of the current software setup that can be shared across experiments, users or laboratories. Therefore, data measured at different sites can be processed and analyzed in a coherent and even fully identical fashion, ensuring consistency and scientific rigor. Protocol files can serve as backups for experimental settings as well.
Simulations can help to answer MRS-related research questions, such as: estimation of SNR, optimal TE for measurement of specific J-coupled metabolites, proper sequence parameters for JDE experiments, or prototyping novel sequences prior to implementation on the scanner. This approach can deliver results relatively quickly and without frequent and costly proof-of-concept scans.
The combination of in-depth and reproducible data visualization, processing, and simulation make INSPECTOR an ideal teaching tool47. Complete visualization of experimental data, simulations, and signal analysis enable review and discussion in a classroom setting, both in-person and remote. Protocol files with stored parameters can help instructors to share a MRS problem to solve, guide students in their approaches, and furthermore allow students to save and share their solutions. With the focus on teaching, it is hoped that students from any background can learn and use MRS methods via INSPECTOR with ease and interest, possibly contributing to future expansion of the in vivo MRS community.
INSPECTOR is a software tool available to the academic MRS community free of charge. Software support is provided by members of MR SCIENCE Laboratory at Columbia University (http://juchem.bme.columbia.edu). The laboratory organizes annual workshops with focus on both in vivo MRS methodology and application. Moreover, INSPECTOR has its own user community accessible by the LinkedIn social network. The MRS laboratories of several universities already use INSPECTOR and, to date, the software has been downloaded more than 200 times.
Future extensions of INSPECTOR include batch processing and spectroscopic imaging functions. Both are already implemented and regularly applied in our laboratory. These functionalities, once validated across vendor-provided data formats, will be made available with a future release. 2D NMR methods are not supported in the current version of INSPECTOR.
The INSPECTOR software package for MRS spectroscopy data inspection, processing, simulation and analysis was presented. Ease of use, compatibility with other data formats and data quality control from loading the data to export of analytical results make INSPECTOR a software of choice for wide use of the MRS methods in preclinical and clinical research.
INSPECTOR has been available for download under a non-commercial license free of charge since 2017 at: http://innovation.columbia.edu/technologies/cu17130_inspector.
For academic use, this work should be cited. For commercial use or source code request, please contact us directly.
Öz, G. et al. Clinical proton MR spectroscopy in central nervous system disorders. Radiology 270, 658–679 (2014).
Považan, M. et al. Comparison of multivendor single-voxel MR spectroscopy data acquired in healthy brain at 26 sites. Radiology 295, 171–180 (2020).
Landheer, K., Gajdošík, M. & Juchem, C. A semi-LASER, single-voxel spectroscopic sequence with a minimal echo time of 20.1 ms in the human brain at 3 T. NMR Biomed. https://doi.org/10.1002/nbm.4324 (2020).
Pfleger, L. et al. Absolute quantification of phosphor-containing metabolites in the liver using 31 P MRSI and hepatic lipid volume correction at 7T suggests no dependence on body mass index or age. J. Magn. Reson. Imaging 2, 2 (2018).
Ernst, T., Kreis, R. & Ross, B. D. Absolute quantitation of water and metabolites in the human brain. I. Compartments and water. J. Magn. Reson. Ser. B 102, 1–8 (1993).
de Graaf, R. A. In Vivo NMR Spectroscopy: Principles and Techniques 3rd edn. (John Wiley & Sons Ltd, New York, 2019). https://doi.org/10.1002/9781119382461.
Juchem, C. et al. B 0 shimming for in vivo magnetic resonance spectroscopy: Experts’ consensus recommendations. NMR Biomed. https://doi.org/10.1002/nbm.4350 (2020).
Wilson, M. et al. Methodological consensus on clinical proton MRS of the brain: Review and recommendations. Magn. Reson. Med. 82, 527–550 (2019).
Near, J. et al. Preprocessing, analysis and quantification in single-voxel magnetic resonance spectroscopy: Experts’ consensus recommendations. NMR Biomed. https://doi.org/10.1002/nbm.4257 (2020).
Landheer, K., Swanberg, K. M. & Juchem, C. Magnetic resonance Spectrum simulator (MARSS), a novel software package for fast and computationally efficient basis set simulation. NMR Biomed. https://doi.org/10.1002/nbm.4129 (2019).
Helms, G. The principles of quantification applied to in vivo proton MR spectroscopy. Eur. J. Radiol. 67, 218–229 (2008).
Juchem, C. INSPECTOR: ‘The New Kid on the Block’. ISMRM Virtual Study Group Meeting - MR Spectroscopy https://ismrm.adobeconnect.com/_a1156337412/pvzkfszv1l4s/ (2017).
Juchem, C. INSPECTOR: Magnetic resonance spectroscopy software for optimized data extraction. innovation.columbia.edu/technologies/cu17130_inspector (2020).
MATLAB Runtime. https://www.mathworks.com/products/compiler/matlab-runtime.html (2020).
Bogner, W., Hangel, G., Esmaeili, M. & Andronesi, O. C. 1D-spectral editing and 2D multispectral in vivo 1 H-MRS and 1 H-MRSI—methods and applications. Anal. Biochem. 529, 48–64 (2017).
Standard. DICOM Standard. National Electrical Manufacturers Association https://www.dicomstandard.org.
Klose, U. In vivo proton spectroscopy in presence of eddy currents. Magn. Reson. Med. 14, 26–30 (1990).
Tkáć, I. & Gruetter, R. Methodology of1H NMR spectroscopy of the human brain at very high magnetic fields. Appl. Magn. Reson. 29, 139–157 (2005).
van Eijsden, P., Behar, K. L., Mason, G. F., Braun, K. P. J. & de Graaf, R. A. In vivo neurochemical profiling of rat brain by 1 H-[13 C] NMR spectroscopy: Cerebral energetics and glutamatergic/GABAergic neurotransmission. J. Neurochem. 112, 24–33 (2010).
Provencher, S. W. Estimation of metabolite concentrations from localizedin vivo proton NMR spectra. Magn. Reson. Med. 30, 672–679 (1993).
Stefan, D. et al. Quantitation of magnetic resonance spectroscopy signals: the jMRUI software package. Meas. Sci. Technol. 20, 104035 (2009).
Jiru, F. Introduction to post-processing techniques. Eur. J. Radiol. 67, 202–217 (2008).
Babcock, E. E., Vaughan, J. T., Lesan, B. & Nunnally, R. L. Multinuclear nmr investigations of probe construction materials at 4.7 t. Magn. Reson. Med. 13, 498–503 (1990).
Barkhuijsen, H., de Beer, R. & van Ormondt, D. Improved algorithm for noniterative time-domain model fitting to exponentially damped magnetic resonance signals. J. Magn. Reson. 73, 553–557 (1987).
Mulkern, R. & Bowers, J. Density Matrix Calculations of AB Spectra from Multipulse Sequences : Quantum Mechanics Meets In Vivo Spectroscopy. 1–23 (1994).
Frahm, J., Merboldt, K.-D. & Hänicke, W. Localized proton spectroscopy using stimulated echoes. J. Magn. Reson. 1969(72), 502–508 (1987).
Bottomley, P. A. Spatial localization in NMR spectroscopy in vivo. Ann. N. Y. Acad. Sci. 508, 333–348 (1987).
Scheenen, T. W. J., Klomp, D. W. J., Wijnen, J. P. & Heerschap, A. Short echo time 1H-MRSI of the human brain at 3T with minimal chemical shift displacement errors using adiabatic refocusing pulses. Magn. Reson. Med. 59, 1–6 (2008).
Garwood, M. & DelaBarre, L. The return of the frequency sweep: Designing adiabatic pulses for contemporary NMR. J. Magn. Reson. 153, 155–177 (2001).
Mlynárik, V., Gambarota, G., Frenkel, H. & Gruetter, R. Localized short-echo-time proton MR spectroscopy with full signal-intensity acquisition. Magn. Reson. Med. 56, 965–970 (2006).
Choi, C. et al. 2-hydroxyglutarate detection by magnetic resonance spectroscopy in IDH-mutated patients with gliomas. Nat. Med. 18, 624–629 (2012).
Swanberg, K., Landheer, K., Gajdosik, M., Treacy, M. & Juchem, C. Hunting the perfect spline: Baseline handling for accurate macromolecule estimation and metabolite quantification by in vivo 1H MRS. Proc. Int. Soc. Magn. Reson. Med. 2, 856 (2020).
Cavassila, S., Deval, S., Huegen, C., van Ormondt, D. & Graveron-Demilly, D. Cramér-Rao bounds: An evaluation tool for quantitation. NMR Biomed. 14, 278–283 (2001).
Behar, K. L., Rothman, D. L., Spencer, D. D. & Petroff, O. A. C. Analysis of macromolecule resonances in 1H NMR spectra of human brain. Magn. Reson. Med. 32, 294–302 (1994).
Cudalbu, C. et al. Contribution of macromolecules to brain 1H MR spectra: Experts’ consensus recommendations. NMR Biomed. In Press, (2020).
Pfeuffer, J., Juchem, C., Merkle, H., Nauerth, A. & Logothetis, N. K. High-field localized 1H NMR spectroscopy in the anesthetized and in the awake monkey. Magn. Reson. Imaging 22, 1361–1372 (2004).
Rothman, D. L., Petroff, O. A. C., Behar, K. L. & Mattson, R. H. Localized 1H NMR measurements of gamma-aminobutyric acid in human brain in vivo. Proc. Natl. Acad. Sci. 90, 5662–5666 (1993).
Puts, N. A. J. & Edden, R. A. E. In vivo magnetic resonance spectroscopy of GABA: A methodological review. Prog. Nucl. Magn. Reson. Spectrosc. 60, 29–41 (2012).
Chang, L., Cloak, C. C. & Ernst, T. Magnetic resonance spectroscopy studies of GABA in neuropsychiatric disorders. J. Clin. Psychiatry 64(Suppl 3), 7–14 (2003).
Swanberg, K. M., Landheer, K., Pitt, D. & Juchem, C. Quantifying the metabolic signature of multiple sclerosis by in vivo proton magnetic resonance spectroscopy: Current challenges and future outlook in the translation from proton signal to diagnostic biomarker. Front. Neurol. 10, 2 (2019).
Swanberg, K. M., Prinsen, H., Coman, D., de Graaf, R. A. & Juchem, C. Quantification of glutathione transverse relaxation time T 2 using echo time extension with variable refocusing selectivity and symmetry in the human brain at 7 Tesla. J. Magn. Reson. 290, 1–11 (2018).
Prinsen, H., de Graaf, R. A., Mason, G. F., Pelletier, D. & Juchem, C. Reproducibility measurement of glutathione, GABA, and glutamate: Towards in vivo neurochemical profiling of multiple sclerosis with MR spectroscopy at 7T. J. Magn. Reson. Imaging 45, 187–198 (2017).
Landheer, K., Gajdošík, M., Treacy, M. & Juchem, C. Concentration and effective T2 relaxation times of macromolecules at 3T. Magn. Reson. Med. https://doi.org/10.1002/mrm.28282 (2020).
Swanberg, K. et al. Towards in vivo neurochemical profiling of multiple sclerosis with MR spectroscopy at 7 Tesla: Cross-sectional assessment of frontal-cortex glutathione, GABA, and glutamate in individuals with relapsing-remitting and progressive multiple sclerosis. in Proc Int Soc Magn Reson Med #2970 (2017).
Liu, Y., Gu, Y. & Yu, X. Assessing tissue metabolism by phosphorous-31 magnetic resonance spectroscopy and imaging: A methodology review. Quant. Imaging Med. Surg. 7, 707–716 (2017).
Rothman, D. L. et al. In vivo nuclear magnetic resonance spectroscopy studies of the relationship between the glutamate–glutamine neurotransmitter cycle and functional neuroenergetics. Philos. Trans. R. Soc. London. Ser. B Biol. Sci. 354, 1165–1177 (1999).
Juchem, C. INSPECTOR—A Tool for Teaching Magnetic Resonance Spectroscopy. in Proc Int Soc Magn Reson Med #3125 (2018).
The authors thank Drs. Robin A. de Graaf, Hetty Prinsen and Douglas L. Rothman (Yale University, CT, USA) for helpful discussions; Dr. Diana Martinez, Alexander Grassetti and Dr. Jonathan Wai (Columbia University and New York State Psychiatric Institute, NY, USA) for human MRS data from Siemens 3 T (studies: NCT03336398 and NCT03809286); Lorenz Pfleger, MSc, (Medical University in Vienna, Austria) for human MRS data from Siemens 7 T; Drs. Ken Olive and Yanping Sun (Columbia University, NY, USA) for preclinical MRS data from Bruker 9.4 T; and Dr. Graeme F. Mason (Yale University, CT, USA) for human 13C MRS data from Bruker 4 T.
The authors declare no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Gajdošík, M., Landheer, K., Swanberg, K.M. et al. INSPECTOR: free software for magnetic resonance spectroscopy data inspection, processing, simulation and analysis. Sci Rep 11, 2094 (2021). https://doi.org/10.1038/s41598-021-81193-9
This article is cited by
Multiple sclerosis diagnosis and phenotype identification by multivariate classification of in vivo frontal cortex metabolite profiles
Scientific Reports (2022)
In vivo brain MR spectroscopy in gliomas: clinical and pre-clinical chances
Clinical and Translational Imaging (2022)
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.