Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Multi-channel magnetic resonance spectroscopy graphical user interface (McMRSGUI)

  • Travis Carrell ,

    Roles Conceptualization, Data curation, Formal analysis, Methodology, Software, Validation, Visualization, Writing – original draft

    carrellt101@tamu.edu

    Affiliation Department of Biomedical Engineering, Texas A&M University, College Station, Texas, United States of America

  • Mary P. McDougall

    Roles Funding acquisition, Supervision, Writing – review & editing

    Affiliation Department of Biomedical Engineering, Texas A&M University, College Station, Texas, United States of America

Abstract

This work introduces an open-sourced graphical user interface (GUI) software enabling the combination of multi-channel magnetic resonance spectroscopy data with different literature-based methods for the improvement of the quality and reliability of combined spectra. The multi-channel magnetic resonance spectroscopy graphical user interface (McMRSGUI) is a MATLAB-based spectroscopy processing GUI equipped to load multi-channel MRS data, pre-process, combine, and export combined data for evaluation with open-source quantification software (jMRUI). A literature-based, decision-tree process was incorporated into the combination type selection to serve as a guide to minimize spectral distortion in selecting between weighting methods. Multi-channel, simulated spectra were combined with the different combination techniques and evaluated for spectral distortion to validate the code. The incorporation of the combination methods into a single processing software enables multi-channel magnetic resonance spectroscopy (MRS) data to be combined and compared for improved spectral quality with little user knowledge of combination techniques. Through the spectral peak distortion simulation of the combination methods, combined signal-to-noise ratio (SNR) values from the literature were verified. The spectral peak distortion simulation provides a secondary tool for researchers to estimate the spectral SNR levels when spectral distortion could occur and use this knowledge to further guide the selection of their combination technique. The McMRSGUI provides a software toolkit for evaluating multi-channel MRS data and their combination. Simulations evaluating spectral distortion at different noise levels were performed for each combination method to validate the GUI and demonstrate a method for researchers to assess the combined SNR levels at which they could be introducing spectral distortion.

Introduction

Magnetic resonance spectroscopy is a noninvasive method that provides access to important biochemical information from biological pathways and diseases in the body. Challenges associated with MRS of all nuclei involve detecting small concentrations, varying natural abundance and sensitivities of different nuclei relating to the overall obtainable signal intensity, and the balance between feasible scan times and appropriate localization.

One of the methods for alleviating some of these problems involves array coils and their increased sensitivity over a larger field of view. Roemer’s seminal work described how an array of coils could be optimally combined with complex weighting factors for an improved result using the B1- receive fields and the noise covariance [1], but obtaining the requisite information required for the formulation isn’t necessarily feasibly determined within a clinical setting. The “optimal” method for combining experimental spectroscopy data from multiple channels has been an active topic of discussion within literature [24], resulting in multiple combination techniques [29]. Some of the techniques require either additional noise scans for obtaining noise correlation or covariance maps [3] or prior unsuppressed water reference scans [2, 4, 5], to obtain weighting factors. Others simply require the SNR or variations of subcomponents of the SNR with regards to a certain metabolite [2, 10, 11].

The tradeoff of using more scanner time for acquiring additional data and increasing the degree of post-processing results in either a better understanding of the noise correlation and covariance amongst the channels or an improved estimation of the field maps of the channels through the increased sensitivity of 1H data. Regardless of the technique, the end goal of the combination is to improve the spectral SNR for reliability of quantification and fitting without introducing significant bias or spectral distortion. Spectral distortion directly results in inaccurate findings for quantification of metabolites. As the goal for spectroscopy processing is to minimize user interaction, spectral distortion can go unnoticed. Therefore, the selection of the combination technique should be determined based on the available additional clinical data, noise correlation between channels, degree of user interaction for phasing data, and the relative SNR of the combined spectra to ensure that the combined result is as accurate as possible.

Magnetic resonance vendors each have their own processing software, which often performs combination and some pre-processing operations on multi-channel data before allowing access to the “raw” data. Per a recent experts’ consensus report, it is recommended that individual transient data be accessible for preprocessing and radiofrequency (RF) coil combination, as well as effectively communicating all actions performed on the data to increase reproducibility of results [12].

Several groups have put forth open-source software to enable the processing of MRS data from the initial data loading all the way through data quantification [1318] or simply handle loading and preprocessing of data and transfer processed data to existing programs for quantification [19]. Variations exist among the programs as to the coding language, whether the source code is openly available (OSPREY, OXSA, FSL-MRS, FID-A), if they are packaged in a manner to make the program accessible amongst different computer architectures (jMRUI, INSPECTOR), or they are available via web-based applications (SelectWave). Benefits arise from all three types of systems as modularity, visibility, and flexibility to add or modify code as newer methods become available is a key argument for making the source code available, while providing a packaged program can enable a more sequenced progression, platform-independence, and wider potential use. The combination of both methods provides the greatest potential for usage and research opportunities. Regardless, both methods still require programming that is specific to a certain niche application and will require continued updates as newer processes become available. Therefore, open-source MRS code requires readability, low-entry to understanding, and transparency to be truly effective in an ever-changing field.

This work presents an alternative for pre-processing and combining of MRS data; presenting users with literature-based options to best combine and phase their multi-channel data in a format that can be presented as a standalone program or be accessible via a coding language commonly used by those in the field. It specifically addresses the gap amongst open-source MRS codes concerning access to different coil combination techniques to reduce the introduction of bias via the combination method. Furthermore, an additional simulation is presented that provides utility in identifying SNR levels in which bias can be introduced from the combination technique. Although it was designed specifically for use with single voxel, x-nuclei data, the toolkit also incorporates methods that can be utilized for 1H spectra.

Methods

The McMRSGUI was developed in MATLAB® (Mathworks, Natick, MA) using App Designer to allow the graphical user interface to be published in a stand-alone capacity for utilization on Windows-based systems or be used within MATLAB’s coding environment for research use. This platform enables flexibility as the template code can be adjusted to specific research needs and then be compiled and shared with fellow researchers. The compiled GUI can be run on any Windows-based computer that has the MATLAB Runtime environment installed, which is free and available for download from the MathWorks website [20].

Data loading

The program is configured to load time domain spectroscopy data within three file types: Varian (.fid), jMRUI Data Textfile (.txt), or a MATLAB structure (.mat). Time domain data must represent baseband or digitally demodulated spectroscopy data. Necessary information for loaded files includes the complex free induction decay (FID) data, center frequency, and spectral bandwidth. Multiple files or acquisition sets can be loaded at once and will be treated as if they are a continuation of the previously loaded file(s) acquisitions.

Preprocessing

Functionality for preprocessing of individual channel data, such as averaging transients with a sliding window average of user-defined length for studies requiring temporal resolution, manual 0-order and 1st-order phasing, baseline correction [21], zero-padding, subtraction of another file for removal of the water peak or broad baseline macromolecules, and different viewing configurations either in the time domain or frequency domain, are built into the program. Additionally, line broadening is included for data viewing but is not recommended for data quantification. Inspection of the data for data quality can be performed through viewing the FID, noise-normalized spectra, or a waterfall plot. Spectral evaluation of linewidth and SNR are performed using the maximum peak or on a user-defined frequency region. Noise selection limits and frequency axis viewing limits are manually set by the user. Fully preprocessed data can be exported in two different formats: either in the.mat structure “Processed” or in the jMRUI Data Textfile format. Both formats can be reloaded and preprocessed as necessary.

Multi-channel combination

The preprocessed multi-channel data is combined in the spectral domain by multiplying each channel by a weighting factor before summation with the other weighted channel data. Selection of the combination method can be chosen directly by the user or the decision tree matrix, shown in Fig 1, will assist the user in selecting an appropriate method. Six weighting options are available within the program: equal weighting, SNR-weighting [9, 10], S/N2-weighting [2], whitened value singular-value decomposition (WSVD) with or without apodization (Apod) [3, 22], and adaptively optimized combination (AOC) [4]. The first three methods assume that the noise between channels is not correlated [4]. Phasing of the spectra is necessary to adequately estimate the signal and noise components for the first two methods, while the S/N2 method utilizes complex weighting factors obtained from the fitting of a reference peak within the data [2]. Additionally, the alignment of peak frequencies is an option afforded to the user to correct for frequency shifts amongst the channels due to positioning of the array for the equal and SNR weighing methods. The WSVD method requires the calculation of a noise covariance matrix obtained from a user-defined noise free region in the spectral domain or a separate noise scan obtained with the transmitter turned off [3]. In scenarios where the SNR of the data is low, utilizing the WSVD+Apod method can improve the estimation of the weighting factors through the application of linebroadening or apodization. The quality of the estimate of the WSVD weighting factors displays in a range from 0 to 1, with 1 representing the highest quality estimation [22]. The AOC method incorporates an unsuppressed water scan into the weighting factors and the inversion of the full noise correlation matrix [4]. The full noise correlation matrix incorporates the coil covariances onto the diagonal components of the noise correlation, enabling this method to better estimate the influences from intrinsic and extrinsic noise sources. Like the WSVD method, the quality of the full noise correlation is determined by the number of data points used to calculate the correlation matrix.

thumbnail
Fig 1. Flowchart of the decision tree for multi-channel spectroscopy combination.

Multi-channel spectroscopy combination method decision tree logic utilized within the McMRSGUI. The user has the option to specifically select a method or use the program as a guide for selecting an appropriate combination method. Utilization of supplemental 1H unsuppressed water data for determining weighting factors improves the accuracy of the combination method(s) in scenarios of low SNR combination. The weighting methods are arranged from left to right in order of literature-recommended order for the scenario of correlation between channels.

https://doi.org/10.1371/journal.pone.0299142.g001

To validate the McMRSGUI processing code, two Lorentzian resonance peaks were modeled according to the simulation by Wu et al. for measuring distortion introduced by multi-channel combination techniques [4]. The Lorentzian peaks were modeled according to Eq (1), (1) where fs is the sampling frequency, and aq, θq, dq, and fq denote the amplitude, phase, damping factor, and resonance frequency of the qth sinusoid, respectively. Parameters used for the simulation and the associated scaling of the eight generated coils elements are in Table 1. Correlated noise between channels was simulated utilizing the full noise correlation matrix with values approximating Wu et al.’s simulation [4]. Distortion was measured as the difference between the ratio of the areas underneath the two peaks from the original model spectrum and the combined spectrum. jMRUI and the AMARES algorithm were utilized for calculating the areas under both peaks following data combination [17, 23].

thumbnail
Table 1. Parameters for Lorentzian peak simulation and coil element scaling factors.

https://doi.org/10.1371/journal.pone.0299142.t001

For the simulation, the noise content was varied between levels corresponding to high SNRs and low SNRs, where the SNR was defined as the signal amplitude of the highest peak over the standard deviation of the noise after the application of a matched filter [24]. The noise region was selected as the last 400 points of the simulated spectra where there were no peaks. As each combination method produced a different SNR for the same added noise level, the noise level was used as the common variable to compare the overall distortion level between the methods. Monte Carlo simulations were utilized to generate 300 variations of the eight-element noise data for each noise level utilizing MATLAB’s white gaussian noise function with a 50 Ohm impedance. The results of the Monte Carlo simulations enabled the comparison of the mean and standard deviation for each noise level and associated combination method. The assumption that the AOC method could adequately determine the coil sensitivities and spatial phase shifts of the individual coil elements from an unsuppressed water resonance was utilized, as per Wu et al.’s simulation [4]. The S/N2 method’s signal amplitude factors were calculated using the AMARES algorithm in jMRUI [17, 23].

Results

The fully constructed MATLAB GUI for the McMRSGUI is shown in Fig 2. The WSVD+Apod combined data of the simulated data case with 37.5 decibel (dB) of noise added is shown as an example to illustrate the functionality of some of the preprocessing and spectral evaluation tools. Further examples of the functionality and utilization of the program can be found in the Supporting Information Materials.

thumbnail
Fig 2. Front panel of McMRSGUI.

McMRSGUI front panel showing the first acquisition of the WSVD+Apod combined spectra from the simulated dataset with 37.5 dB of noise added. The preprocessing controls are shown in the leftmost tab group and the spectral evaluation tools are shown on the right. The quality of the WSVD+Apod fitting is shown with the title above the spectrum.

https://doi.org/10.1371/journal.pone.0299142.g002

Fig 3A and 3B show the mean and standard deviation of the combined spectrum’s ratio of the area of the two peaks from that of the original model spectrum following Monte Carlo simulations at different noise levels. The corresponding mean SNR of each method is shown in Fig 3C. At lower added noise levels, corresponding to higher SNR levels, all the methods combine the spectrum with little to no mean distortion. Increasing levels of distortion occur as higher levels of noise are added, making the signal more difficult to distinguish from the noise. The WSVD+Apod method outperforms the original WSVD method at lower SNR levels due to its reduction in high frequency noise from linebroadening when estimating the weighting factors. Overall, the AOC method had the lowest or one of the lower levels of distortion for the tested noise ranges. All of the above results represent a similar performance to the simulation completed by Wu et al. [4], validating that the combination methods are accurately implemented. Due to the simulation being run with no phase distortion on the channels, this represented the best-case scenario and mitigated the requirement to manually phase the spectra for the equal and SNR methods. This resulted in an improved performance for these methods at lower SNR values than would normally be expected, as these methods rely on manual phasing or automatic phasing algorithms before the calculation of the scalar weights.

thumbnail
Fig 3. Mean distortion, standard deviation of distortion, and mean SNR plots as a function of the simulated noise for the combination methods.

(A) The mean distortion of the combined spectrums’ peaks ratio resulting from the Monte Carlo simulation. Due to the signal content remaining constant and the associated SNR of the combined spectrum varying due to the different combination methods, the mean distortion is shown as a function of the simulated noise level. (B) The standard deviation of the distortion from the true ratio is also shown as a function of the simulated noise level. (C) The mean SNR of each combination derived from the highest peak’s amplitude over the standard deviation of the noise in the range of the highest simulated noise levels.

https://doi.org/10.1371/journal.pone.0299142.g003

Discussion

For multi-channel MRS data, the selection of the combination type has implications for the quality and relative distortion from the absolute spectra that is obtainable. As the absolute result cannot be adequately inferred from the limited information obtained within a clinical setting, the best estimation represents the highest achievable standard for MRS combination. The estimations for all the combination methods converge to a similar result for cases where the SNR is adequately high. As high SNR is rarely the case for clinical spectroscopy due to the need for localization, limited scan times, physiological concentrations, and decreased sensitivity for x-nuclei, the selection choice for the combination of multi-channel data becomes weightier. The methods that utilize an unsuppressed water scan benefit from the much higher sensitivity within the body for determining phases and scaling factors. As x-nuclei studies do not have the luxury of the higher sensitivity from water, a prominent metabolite, such as phosphocreatine (PCr) for 31P, can be used. Solely utilizing the water content or prominent metabolite for determining the scaling coefficients disregards the influence of the noise correlation between channels. Ideally, the receive array being used would have little to no correlation between channels due to good design, sufficient decoupling from preamplifiers, and no development of eddy current signals from the patient or surrounding MR components. In this case, the noise correlation matrix could be disregarded and one of the SNR-based methods could be used. With the advent and use of higher channel count arrays, correlation between channels will undoubtedly increase. Therefore, an understanding of the noise correlation should be factored into the selection for combination method if possible.

In their work, Rodgers et al. provided an SNR guideline of 35, 15, and 60 at which the WSVD, WSVD+Apod, and S/N2 methods, respectively, began to produce higher SNR values than what Rodgers et al. called Roemer’s (BS B1-) combination [3]. To verify the validity of this threshold, a 3 Hz matched filter was applied to the output of the combined spectra and found that the WSVD, WSVD+Apod, and S/N2 methods produce similar SNR values to those reported by Rodgers et al. at simulated noise levels of ~35 dBm, ~42.5 dBm and ~30 dBm, respectively. These simulated noise levels were all above the point at which the combination methods began to introduce distortions into the combined spectrum in Fig 3, thus supporting the conclusion by Rodgers et al.

An extension of the above validation can be applied by researchers to their in vivo data sets by utilizing the same simulation performed in this work, as detailed by Fig 4. The full noise correlation matrix and approximate coil amplitudes from the in vivo data can be inputted into the simulation for spectral distortion proposed by Wu et al. [4]. The addition of noise levels, as performed in this paper, can then be run through Monte Carlo simulations to verify when the ratio of peak areas of the combined spectrum departs from the absolute ratio, providing validation for the SNR at which the clinical data were combined with regards to distortion and the combination selection. This can provide researchers with a method to mitigate distortion in their data as well as increase the SNR and associated confidence in the fitting of the metabolites within their data.

thumbnail
Fig 4. Simulation block diagram for distortion and bias testing via combination techniques.

Block diagram showing the simulation process and associated MATLAB scripts/GUI for calculating the SNR levels at which bias and distortion can be introduced by the combination techniques.

https://doi.org/10.1371/journal.pone.0299142.g004

Conclusion

The McMRSGUI addresses a gap within open-source MR spectroscopy codes as it consolidates multiple literature-based, multi-channel combination techniques within a single, flexible GUI for utilization in determining the proper technique based on the available additional scan information, noise correlation between channels, and combined SNR. The decision tree provides a simplified approach for the selection of the various techniques. Data can then be exported for quantification with other open-source software. This software was validated using a spectral peak distortion simulation that both verified SNR values presented by Rodgers et al. [3] and provides insight into the point at which distortion is likely to be introduced due to the combination method. In addition to the decision tree, this simulation can be utilized by researchers to reduce the likelihood that the chosen combination technique will introduce distortion in their multi-channel MRS data.

References

  1. 1. Roemer PB, Edelstein WA, Hayes CE, Souza SP, Mueller OM. The NMR phased array. Magn Reson Med. 1990;16(2):192–225. Epub 1990/11/01. pmid:2266841.
  2. 2. Hall EL, Stephenson MC, Price D, Morris PG. Methodology for improved detection of low concentration metabolites in MRS: optimised combination of signals from multi-element coil arrays. Neuroimage. 2014;86:35–42. Epub 2013/05/04. pmid:23639258.
  3. 3. Rodgers CT, Robson MD. Coil combination for receive array spectroscopy: Are data-driven methods superior to methods using computed field maps? Magn Reson Med. 2016;75(2):473–87. Epub 2015/03/31. pmid:25820303; PubMed Central PMCID: PMC4744755.
  4. 4. Wu M, Fang L, Ray CE Jr, Kumar A, Yang S. Adaptively Optimized Combination (AOC) of Phased-Array MR Spectroscopy Data in the Presence of Correlated Noise: Compared with Noise-Decorrelated or Whitened Methods. Magn Reson Med. 2017;78(3):848–59. Epub 2016/11/23. pmid:27873353; PubMed Central PMCID: PMC7200078.
  5. 5. An L, Willem van der Veen J, Li S, Thomasson DM, Shen J. Combination of multichannel single-voxel MRS signals using generalized least squares. J Magn Reson Imaging. 2013;37(6):1445–50. Epub 2012/11/23. pmid:23172656; PubMed Central PMCID: PMC3582859.
  6. 6. Brown MA. Time-domain combination of MR spectroscopy data acquired using phased-array coils. Magn Reson Med. 2004;52(5):1207–13. Epub 2004/10/28. pmid:15508170.
  7. 7. Dong Z, Peterson B. The rapid and automatic combination of proton MRSI data using multi-channel coils without water suppression. Magn Reson Imaging. 2007;25(8):1148–54. Epub 2007/10/02. pmid:17905247; PubMed Central PMCID: PMC2367158.
  8. 8. Sandgren N, Stoica P, Frigo FJ, Selen Y. Spectral analysis of multichannel MRS data. J Magn Reson. 2005;175(1):79–91. Epub 2005/06/14. pmid:15949751.
  9. 9. Wright SM, Wald LL. Theory and application of array coils in MR spectroscopy. NMR Biomed. 1997;10(8):394–410. Epub 1998/05/23. pmid:9542737.
  10. 10. Wald LL, Moyher SE, Day MR, Nelson SJ, Vigneron DB. Proton spectroscopic imaging of the human brain using phased array detectors. Magn Reson Med. 1995;34(3):440–5. Epub 1995/09/01. pmid:7500884.
  11. 11. Maril N, Lenkinski RE. An automated algorithm for combining multivoxel MRS data acquired with phased-array coils. J Magn Reson Imaging. 2005;21(3):317–22. Epub 2005/02/22. pmid:15723370.
  12. 12. Near J, Harris AD, Juchem C, Kreis R, Marjanska M, Oz G, et al. Preprocessing, analysis and quantification in single-voxel magnetic resonance spectroscopy: experts’ consensus recommendations. NMR Biomed. 2021;34(5):e4257. Epub 2020/02/23. pmid:32084297; PubMed Central PMCID: PMC7442593.
  13. 13. Purvis LAB, Clarke WT, Biasiolli L, Valkovic L, Robson MD, Rodgers CT. OXSA: An open-source magnetic resonance spectroscopy analysis toolbox in MATLAB. PLoS One. 2017;12(9):e0185356. Epub 2017/09/25. pmid:28938003; PubMed Central PMCID: PMC5609763.
  14. 14. Clarke WT, Stagg CJ, Jbabdi S. FSL-MRS: An end-to-end spectroscopy analysis package. Magn Reson Med. 2021;85(6):2950–64. Epub 2020/12/07. pmid:33280161; PubMed Central PMCID: PMC7116822.
  15. 15. Gajdosik M, Landheer K, Swanberg KM, Juchem C. INSPECTOR: free software for magnetic resonance spectroscopy data inspection, processing, simulation and analysis. Sci Rep. 2021;11(1):2094. Epub 2021/01/24. pmid:33483543; PubMed Central PMCID: PMC7822873.
  16. 16. Oeltzschner G, Zollner HJ, Hui SCN, Mikkelsen M, Saleh MG, Tapper S, et al. Osprey: Open-source processing, reconstruction & estimation of magnetic resonance spectroscopy data. J Neurosci Methods. 2020;343(February):108827. Epub 2020/07/01. pmid:32603810; PubMed Central PMCID: PMC7477913.
  17. 17. Stefan D, Cesare FD, Andrasescu A, Popa E, Lazariev A, Vescovo E, et al. Quantitation of magnetic resonance spectroscopy signals: the jMRUI software package. Meas Sci Technol. 2009;20(10):104035–.
  18. 18. Kahriman F, Liland KH. SelectWave: A graphical user interface for wavelength selection and spectral data analysis. Chemometrics and Intelligent Laboratory Systems. 2021;212. WOS:000643798100011.
  19. 19. Simpson R, Devenyi GA, Jezzard P, Hennessy TJ, Near J. Advanced processing and simulation of MRS data using the FID appliance (FID-A)-An open source, MATLAB-based toolkit. Magn Reson Med. 2017;77(1):23–33. Epub 2015/12/31. pmid:26715192.
  20. 20. MATLAB Runtime. The MathWorks Inc. 2021.
  21. 21. Xi Y, Rocke DM. Baseline correction for NMR spectroscopic metabolomics data analysis. BMC Bioinformatics. 2008;9:324. Epub 2008/07/31. pmid:18664284; PubMed Central PMCID: PMC2516527.
  22. 22. Rodgers CT, Robson MD. Receive array magnetic resonance spectroscopy: Whitened singular value decomposition (WSVD) gives optimal Bayesian solution. Magn Reson Med. 2010;63(4):881–91. Epub 2010/04/08. pmid:20373389.
  23. 23. Vanhamme L, van den Boogaart A, Van Huffel S. Improved Method for Accurate and Efficient Quantification of MRS Data with Use of Prior Knowledge. Journal of Magnetic Resonance. 1997;129(1):35–43. WOS:000071149200005. pmid:9405214
  24. 24. Ernst RR, Bodenhausen G, Wokaun A. Principles of Nuclear Magnetic Resonance in One and Two Dimensions. Oxford, UK: Clarendon Press; 1987.