Skip to contents

Project Status: Active R-CMD-check-bioc codecov :name status badge license


Overview

MsIO provides flexible, language-agnostic import and export capabilities for mass spectrometry (MS) data objects in R. It facilitates interoperability by supporting various open file formats such as JSON, HDF5, plain text, and domain-specific standards like mzTab-M or MetaboLights archives.

While R’s native save()/load() functions allow object serialization, they rely on R-specific binary formats, making cross-platform data exchange difficult. MsIO addresses this by introducing standardized file formats and programmatic interfaces, simplifying integration between R-based tools and external software ecosystems.


Key Features

  • πŸ“¦ Export/import MS analysis results objects across interoperable file formats
  • 🧩 Modular design via S4 parameter classes and generic methods
  • πŸ”„ Integration with Bioconductor packages like Spectra, MsExperiment, xcms, and alabaster.base
  • πŸ”§ Support for plain text, JSON+HDF5, mzTab-M, and MetaboLights repository data

Package Architecture

Generic Methods

  • saveMsObject(object, param)
  • readMsObject(object, param)

These methods delegate the actual file handling based on the class of the supplied param object (e.g., PlainTextParam, AlabasterParam).

Parameter Classes

Each format can be configured with their respective S4 class:

Class Purpose
PlainTextParam Text-based tabular storage
AlabasterParam HDF5/JSON archival via alabaster
mzTabParam Export to mzTab-M (MS metabolomics)
MetaboLightsParam Import from MetaboLights repository

Corresponding logic is implemented in dedicated .R files (e.g.Β XcmsExperiment.R, Spectra.R), with new formats expected to follow the same structure.


Supported Formats

βœ… Plain Text (PlainTextParam)

  • Tab-delimited export/import for key objects:

βœ… Alabaster (AlabasterParam)

  • Structured archival using HDF5 and JSON (via alabaster.base)
  • Supported for XcmsExperiment, MsExperiment, Spectra, MsBackendMzR, MsBackendCached, MsBackendOfflineSql.

βœ… mzTab-M Export (mzTabParam)

  • Export of XcmsExperiment preprocessing results to mzTab-M (HUPO PSI metabolomics standard)

βœ… MetaboLights (MetaboLightsParam)

  • Import of complete experiments (including raw MS files) from MetaboLights as MsExperiment objects.

Planned Features & Contributions Welcome

Future development directions include:

  • πŸ”„ Import mzTab-M into SummarizedExperiment
  • πŸ”„ Import mzTab-M into QFeatures
  • πŸ”„ Generic ISA-tab import integration (if justified)

We welcome and encourage contributions β€” see below for how to get involved!


Contributing

We appreciate contributions of all kinds β€” from bug fixes and tests to documentation and new format support.

If you’re planning to contribute:

  1. Read our contribution guidelines
  2. Follow the RforMassSpectrometry style guide
  3. Fork the repo, create a branch, implement your changes, and submit a pull request
  4. For new formats, implement:

License

This package is licensed under the Artistic 2.0 License: πŸ“„ https://opensource.org/licenses/Artistic-2.0

Documentation (manuals, vignettes) is licensed under CC BY-SA 4.0: πŸ“„ https://creativecommons.org/licenses/by-sa/4.0/