Skip to content

stanstrup/xcmsVis

Repository files navigation

xcmsVis

R-CMD-check Lifecycle: experimental License: MIT Project Status: Active – The project has reached a stable, usable state and is being actively developed.

Modern, interactive visualizations for XCMS metabolomics data using ggplot2.

Overview

xcmsVis provides ggplot2 implementations of XCMS plotting functions, enabling:

  • Modern, publication-ready visualizations
  • Interactive plots through plotly integration
  • Consistent styling across all plots
  • Full compatibility with both XCMSnExp and XcmsExperiment objects

This package complements the XCMS package by reimplementing its base graphics plots using ggplot2.

Installation

# Install from GitHub (development version)
# devtools::install_github("yourusername/xcmsVis")

Features

Current Functions

  • gplotAdjustedRtime() - ggplot2 version of plotAdjustedRtime()
  • gplotChromPeaks() - ggplot2 version of plotChromPeaks()
  • gplotChromPeakImage() - ggplot2 version of plotChromPeakImage()
  • gplot() - ggplot2 version of plot() for XChromatogram objects
  • ghighlightChromPeaks() - ggplot2 version of highlightChromPeaks()

Planned Functions

Future releases will include ggplot2 versions of:

  • plotQC()
  • plotChromPeakDensity()
  • And more!

Usage

library(xcmsVis)
library(xcms)

# Works with XcmsExperiment (XCMS v4+)
xdata <- readMsExperiment(files = mzml_files)
# ... perform peak detection, alignment, etc.

# Create retention time adjustment plot
p <- gplotAdjustedRtime(xdata, color_by = sample_group)
print(p)

# Make it interactive
library(plotly)
ggplotly(p, tooltip = "text")

# Also works with XCMSnExp (XCMS v3)
xdata_v3 <- readMSData(files = mzml_files, mode = "onDisk")
# ... perform XCMS workflow
p <- gplotAdjustedRtime(xdata_v3, color_by = sample_group)

Motivation

This package addresses the need discussed in XCMS issue #551 for ggplot2-based visualizations that can be easily made interactive using plotly.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

About

Modern Visualization for XCMS Data

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •