2859

FSL-MRS: A New MR Spectroscopy Fitting Tool
William T Clarke1, Jamie Near2, Uzay E Emir3,4, and Saad Jbabdi1
1Wellcome Centre for Integrative Neuroimaging, NDCN, University of Oxford, Oxford, United Kingdom, 2Douglas Mental Health University Institute, and Department of Psychiatry, McGill University, Montreal, QC, Canada, 3School of Health Sciences, Purdue University, West Lafayette, IN, United States, 4Weldon School of Biomedical Engineering, Purdue University, West Lafayette, IN, United States

Synopsis

FSL-MRS is a new Python-based MRS fitting tool. The model is based on a linear combination of basis spectra, and fitting is achieved with a sampling approach which gives full posterior distributions of fitted parameters. Results are stored both as text files and an interactive HTML report. On publication the tool will be open source and free as part of the FSL package. The tool will be developed to handle MRSI and model fMRS as time-series. Here we demonstrate an initial implementation in phantom data and three brain regions of 37 subjects and compare against another fitting software.

Introduction

Unlike MRI neuroimaging, MR spectroscopy lacks standard analysis pipelines, which substantially hinders use in research. For fitting of post-processed data, a number of expert-created programs are available (1-3), but many suffer from a closed-source approach, or require high levels of user interaction, or have significant expense. The currently available software is not easily extensible to new uses of MRS such as high voxel count MRSI or time-series modelling of fMRS.

Here we introduce a new Python-based MRS fitting tool, FSL-MRS, working on the principle of linear combination of pre-calculated basis spectra. This tool calculates full posterior distributions of the fitted metabolite concentrations to estimate concentration covariances and uncertainties. FSL-MRS incorporates an interactive reporting interface which uses the latest data-science visualisation tools. The tool is open source, free as part of the FSL software package, and operates with a command line or configuration-file interface.

In this work we show an initial implementation of the user interface and output and describe the fitting model and approach. A validation of the tool’s concentration estimates is carried out in a uniform phantom, and its in vivo performance is assessed in three brain regions of 37 subjects at 7T.

Methods

The model for the complex-domain spectrum is $$Y(\nu)=B(\nu)+exp[i(\phi_0+\nu\phi_1)]\sum_{g=1}^{N_G}\sum_{l=1}^{N_g}C_{l,g}M_{l,g}(\nu;\gamma_g,\epsilon_g)$$
$$M_{l,g}(\nu;\gamma_g,\epsilon_g) = \mathcal{F}\left \{ m_{l,g}(t)exp[-(\gamma_g+i\epsilon_g)t]) \right \}$$
where $$$B(\nu)$$$ describes an nth-order polynomial estimate of the baseline, the second term applies a global phase term and the final term is the sum of all scaled, shifted and broadened metabolite basis spectra $$$M_{l,g}(\nu;\gamma_g,\epsilon_g)$$$. To avoid overfitting there is no flexibility in the metabolite line-shapes beyond shifting (ε) and broadening (γ), which can be flexibly applied to NG groups of metabolites (all metabolites in a group are treated with the same ε and γ). $$$\mathcal{F}$$$ is the Fourier transform and $$$m_{l,g}(t)$$$ is the inverse Fourier transform of $$$M_{l,g}(\nu;0,0)$$$ and equivalent to the raw time-domain basis functions generated.

Initialization is achieved using the truncated Newton algorithm in the SciPy package. The final fit is carried out over all model parameters using Metropolis-Hastings (a Markov chain Monte Carlo algorithm). An interactive HTML report (Plotly, Montreal, Canada) is generated for each fit displaying the fitted spectrum, model fit, residuals and concentrations (Fig 1) and concentration posterior distributions, metabolite covariances and scaled basis spectra (Fig 2).

Validation of water scaled concentrations was carried out in a uniform aqueous phantom (SPECTRE, Gold Standard Phantoms, London, UK) containing six metabolites (NAA, Cr, Cho, Ins, Glu and Lac) using a previously published STEAM sequence at 7T (4,5). The same basis spectra were used to estimate the concentrations of six metabolites from 5 Hz line-broadened spectra from the phantom. Absolute concentrations were calculated from referencing the integral of the scaled creatine spectrum to an un-suppressed water spectrum taken to be equivalent to 55 M concentration.

In vivo performance was compared to LCModel (2) in three brain regions (ACC, OCC and putamen) in 37 subjects scanned using a STEAM sequence protocol in a whole body 7T scanner (Siemens, Erlangen, Germany). Fitting basis sets were created by density matrix simulation of 20 metabolites using an extended 1D-projection method (6) in Spinach (7) with an in vivo measured macromolecular basis spectrum. LCModel was used without concentration ratio priors.

Results

Results of the validation of concentration estimates are displayed in Figure 3. FSL-MRS correctly estimates the water-scaled metabolite concentrations of three of six included metabolites. This appears to match the performance of LCModel (ignoring a global scaling offset seen with LCModel in this case).

The per-metabolite correlation plots between FSL-MRS and LCModel are shown in Figure 4. Concentrations are expressed relative to total creatine and scaled so that total creatine equals 8. The mean Pearson correlation is 0.27. In the most prominent metabolites (NAA, Ins, PCh and Glu) correlation was 0.59.

Discussion

Here we presented an initial implementation of FSL-MRS, demonstrating equivalence to a single existing tool. Work will continue to evaluate with simulation data to confirm validity and against other toolboxes in a wider set of data (different field strengths and sequences and pathological subjects).

We will take advantage of the tool’s flexibility to handle MRSI and incorporate time series modelling to fit fMRS. This will also incorporate reading data from multiple formats, including ascii and 4D NIfTI. We will also extend the current line-shape model to incorporate a distribution of Lorentzian resonances.

We plan to distribute FSL-MRS in 2020.

Acknowledgements

We thank Phil Cowen and Beata Godlewska for providing the test data, which was funded by the MRC [MR/K022202/1]. The Wellcome Centre for Integrative Neuroimaging is supported by core funding from the Wellcome Trust (203139/Z/16/Z).

References

1. Graveron-Demilly D. Quantification in magnetic resonance spectroscopy based on semi-parametric approaches. MAGMA 2014;27(2):113-130.

2. Provencher SW. Estimation of metabolite concentrations from localized in vivo proton NMR spectra. Magn Reson Med 1993;30(6):672-679.

3. Wilson M, Reynolds G, Kauppinen RA, Arvanitis TN, Peet AC. A constrained least-squares approach to the automated quantitation of in vivo (1)H magnetic resonance spectroscopy data. Magn Reson Med 2011;65(1):1-12.

4. Emir UE, Auerbach EJ, Van De Moortele PF, Marjanska M, Ugurbil K, Terpstra M, Tkac I, Oz G. Regional neurochemical profiles in the human brain measured by (1)H MRS at 7 T using local B(1) shimming. NMR Biomed 2012;25(1):152-160.

5. Godlewska BR, Pike A, Sharpley AL, Ayton A, Park RJ, Cowen PJ, Emir UE. Brain glutamate in anorexia nervosa: a magnetic resonance spectroscopy case control study at 7 Tesla. Psychopharmacology (Berl) 2017;234(3):421-426.

6. Landheer K, Swanberg KM, Juchem C. Magnetic resonance Spectrum simulator (MARSS), a novel software package for fast and computationally efficient basis set simulation. NMR Biomed 2019:e4129.

7.Hogben HJ, Krzystyniak M, Charnock GTP, Hore PJ, Kuprov I. Spinach - A software library for simulation of spin dynamics in large spin systems. Journal of Magnetic Resonance 2011;208(2):179-194.

Figures

Figure 1. Gif showing interactive fitting summary in HTML report. Summaries of the metabolite concentrations, relative concentrations (here to user-defined Cr) and Cramer-Rao lower bounds on the concentrations are shown adjacent to an interactive, zoomable plot of the spectrum, fit, residual and estimated baseline.

Figure 2. Left: MCMC correlations for each metabolite concentration. Right: Estimated MCMC concentration marginal distribution for each metabolite.

Figure 3. Phantom data. a Example MRS-FSL fit of an 11 ms STEAM spectrum acquired from a uniform spectroscopy phantom containing six metabolites (NAA, Cr, Cho, Ins, Glu and Lac). b Comparison of FSL-MRS and LCModel estimated absolute concentrations in the phantom. The x-axis and boxes show the actual concentrations (±10%).

Figure 4. Correlation scatter plots for the estimated relative concentration of each metabolite in three brain areas (ACC, OCC & putamen) from 37 subjects measured using a STEAM sequence at 7T. The solid line marks x=y.

Proc. Intl. Soc. Mag. Reson. Med. 28 (2020)
2859