Serum metabolomics analysis of fibromyalgia (FM) patients and healthy controls (HC) from the GLORIA cohort.
This repository contains the R analysis code accompanying the manuscript Fibromyalgia tryptophan metabolism is associated with pain symptomology but not anti-satellite glial cell antibody levels (2026).
The analysis uses targeted metabolomics to characterize serum metabolite profiles in FM patients and healthy controls (HC).
.
├── GLORIA_metabolomics_analysis.Rmd # Main analysis script
├── functions_C18.R # Analysis helper functions
├── func_holdouts.R # Cross-validation (PLS-DA) helper functions
└── README.md
The GLORIA_metabolomics_analysis.Rmd script runs the full analysis in the following order:
- Data loading — metadata, compound IDs, mass spectrometry feature data (extracted from TraceFinder)
- Feature identification — matching features to a compound library by m/z and retention time
- Quality control — internal standard plots, batch normalization (median normalization)
- PLS-DA — cross-validated PLS-DA models (FM/HC, FM mild/severe, low/high IgG+SGC%) with permutation testing
- Linear regression — age- and BMI-adjusted models for FM vs. HC
- Spearman correlations — metabolites correlated with clinical parameters (VAS, FIQ, HAD, SF-36, PPT, CPM, PSQI, IgG+SGC%, etc.)
- Tryptophan pathway ratios — Kyn/Trp, 5-HTrp/Trp, Ind/Trp
- Pathway analysis — visualization of MetaboAnalyst pathway enrichment results
R v.4.1 with the following packages:
install.packages(c(
"tidyverse", "ggplot2", "readxl", "writexl", "stringr",
"car", "emmeans", "pvclust", "Hmisc", "ggpubr", "plotly",
"ggrepel", "pROC", "xml2"
))
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(c("ComplexHeatmap", "colorRamp2", "mixOmics", "ropls"))Raw and processed data files are not included in this repository as they contain individual-level patient data. The following input files are required (paths configured via the params block in the Rmd YAML header):
| Parameter | Description |
|---|---|
metaData |
GLORIA master metadata file (.xlsx) |
filteredSamples |
List of samples excluded due to exclusion criteria (.csv) |
PSQI |
PSQI sleep scores (.xlsx) |
featData |
Batch-normalized RPLC feature matrix (.csv) |
C18ID |
C18 compound reference list with functional annotation (.xlsx) |
HILICID |
HILIC compound library (.xlsx) |
TFdt |
HILIC feature data (.xlsx) |
featID |
Additional IDs (.csv) |
funcAnn |
Manual annotation table (.xlsx) |
Results are written to the directory specified by params$outputDir, including:
tables/— metadata summary table, full results, supplementary tablesFC/— fold-change heatmaps and volcano plotscorrelation/— metabolite–clinical parameter correlation heatmapsPLSDA/— PLS-DA scores, loadings, VIP plots, and performance metricspublication/— final figures and tables for the manuscript
Jenny Jakobsson