Machine learning assisted intraoperative assessment of brain tumor margins using HRMAS NMR spectroscopy

PLoS Comput Biol. 2020 Nov 11;16(11):e1008184. doi: 10.1371/journal.pcbi.1008184. eCollection 2020 Nov.


Complete resection of the tumor is important for survival in glioma patients. Even if the gross total resection was achieved, left-over micro-scale tissue in the excision cavity risks recurrence. High Resolution Magic Angle Spinning Nuclear Magnetic Resonance (HRMAS NMR) technique can distinguish healthy and malign tissue efficiently using peak intensities of biomarker metabolites. The method is fast, sensitive and can work with small and unprocessed samples, which makes it a good fit for real-time analysis during surgery. However, only a targeted analysis for the existence of known tumor biomarkers can be made and this requires a technician with chemistry background, and a pathologist with knowledge on tumor metabolism to be present during surgery. Here, we show that we can accurately perform this analysis in real-time and can analyze the full spectrum in an untargeted fashion using machine learning. We work on a new and large HRMAS NMR dataset of glioma and control samples (n = 565), which are also labeled with a quantitative pathology analysis. Our results show that a random forest based approach can distinguish samples with tumor cells and controls accurately and effectively with a median AUC of 85.6% and AUPR of 93.4%. We also show that we can further distinguish benign and malignant samples with a median AUC of 87.1% and AUPR of 96.1%. We analyze the feature (peak) importance for classification to interpret the results of the classifier. We validate that known malignancy biomarkers such as creatine and 2-hydroxyglutarate play an important role in distinguishing tumor and normal cells and suggest new biomarker regions. The code is released at

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Algorithms
  • Biopsy
  • Brain Neoplasms / diagnostic imaging*
  • Brain Neoplasms / pathology
  • Brain Neoplasms / surgery
  • Cohort Studies
  • Glioma / diagnostic imaging*
  • Glioma / pathology
  • Glioma / surgery
  • Humans
  • Intraoperative Period
  • Machine Learning*
  • Magnetic Resonance Spectroscopy / methods*
  • Margins of Excision*

Grants and funding

This work was supported in part by grants from BPI France (ExtempoRMN Project), Hopitaux Universitaires de Strasbourg, Bruker BioSpin, Universite de Strasbourg and the Centre National de la Recherche Scientifique (CNRS). It is also supported by TUBA GEBIP award to AEC. The funders did not play a role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.