Skip to content

Repository files navigation

T2DM Urinary Metabolomics Analysis

A metabolomics analysis pipeline investigating urinary biomarkers of Type 2 Diabetes Mellitus (T2DM) using NMR spectroscopy data. This project applies epidemiological and machine learning methods to identify metabolites that are significantly altered in T2DM patients compared to healthy controls.


Table of Contents


Background

Type 2 Diabetes Mellitus (T2DM) is a metabolic disorder affecting over 400 million people worldwide. Metabolomics — the large-scale study of small molecules in biological samples — offers a powerful approach to understanding the metabolic disruptions associated with the disease and identifying potential urinary biomarkers.

This project uses NMR-based urinary metabolomics to:

  • Identify metabolites significantly different between T2DM patients and healthy controls
  • Build a machine learning classifier to distinguish the two groups
  • Discover robust biomarker candidates confirmed by multiple analytical methods

Dataset

  • Source: MetaboLights MTBLS1
  • Study: A metabolomic comparison of urinary changes in type 2 diabetes in mouse, rat, and human (Salek et al., 2007)
  • Technology: NMR spectroscopy (Bruker DRX700, 700 MHz)
  • Samples: 132 urine samples
    • 84 healthy controls
    • 48 T2DM patients (diet-controlled, unmedicated)
  • Features: 220 NMR spectral bins (metabolite abundance values)
File Description
s_MTBLS1.txt Sample metadata (subject IDs, condition, gender)
m_MTBLS1_metabolite_profiling_NMR_spectroscopy_v2_maf.tsv Metabolite abundance matrix

Methods

1. Preprocessing

  • Transposed the metabolite matrix (samples × features)
  • Log-transformation (log1p) to normalise right-skewed abundance values
  • Auto-scaling (z-score standardisation) to place all features on equal footing

2. Exploratory Analysis — PCA

  • Principal Component Analysis reduced 220 dimensions to 2
  • Visualised group separation between T2DM and Control samples

3. ExWAS — Metabolome-Wide Association Study

  • Univariate logistic regression for each of the 220 metabolite features
  • Benjamini-Hochberg FDR correction to control for multiple testing
  • Effect sizes calculated as mean difference between groups (scaled)

4. Random Forest Classification

  • Ensemble classifier with 200 trees and balanced class weights
  • 5-fold stratified cross-validation for honest performance evaluation
  • Feature importances extracted to identify most predictive metabolites
  • Cross-validated ROC curve for unbiased AUC estimation

5. Method Comparison

  • Overlapping top features between ExWAS and Random Forest identified
  • Dual-method agreement used to prioritise robust biomarker candidates

Results

Method Result
PCA Partial group separation visible along PC1 (16.8% variance)
ExWAS 87 / 220 metabolites significant after FDR correction (q < 0.05)
Random Forest Cross-validated AUC = 0.985 ± 0.022
Method overlap 13 metabolites confirmed by both ExWAS and Random Forest

Key Findings

Metabolites Higher in T2DM

Metabolite Biological Relevance
2-oxoisovalerate Valine/leucine catabolism — altered amino acid metabolism
ethanol Gut bacteria fermentation marker
unknown_m_8.335 Unidentified aromatic compound — warrants further investigation

Metabolites Lower in T2DM

Metabolite Biological Relevance
isoleucine Branched-chain amino acid — well-established T2DM marker
hippurate Gut microbiome health marker — consistently reduced in T2DM
N-acetylglutamate Urea cycle intermediate — reflects altered nitrogen metabolism

These findings are consistent with published T2DM metabolomics literature, supporting disruption of amino acid metabolism, gut microbiome function, and energy metabolism.


Requirements

pandas
numpy
matplotlib
seaborn
scikit-learn
statsmodels
scipy

Visualisations

PCA of Urinary NMR Profiles

Partial separation between T2DM (red) and Control (blue) samples along PC1.

PCA Plot

Metabolites Confirmed by Both Methods

13 metabolites identified as significant by both ExWAS and Random Forest.

Method Comparison

About

A metabolomics analysis pipeline investigating urinary biomarkers of Type 2 Diabetes Mellitus (T2DM) using NMR spectroscopy data. This project applies epidemiological and machine learning methods to identify metabolites that are significantly altered in T2DM patients compared to healthy controls.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages