Skip to contents

R-CMD-check pkgdown

Isotope and adduct annotation of LC-MS feature groups.

One compound gives many LC-MS features: its quasi-molecular ion, other adducts, in-source fragments and the isotopes of all of these, its ion family. groupFeatures() from MsFeatures and xcms groups features that come from the same compound. IonFamilies annotates the ion family within each group:

Results go into featureDefinitions() of the XcmsExperiment: isotopes and adduct hold the labels as text in CAMERA’s syntax, and the grouping is the feature_group column from groupFeatures(). All hypotheses are kept in the list column adduct_hints (adductHints()), and the parameters in metadata(x)$IonFamilies.

library(xcms)
library(MsFeatures)
library(IonFamilies)

x <- groupFeatures(x, SimilarRtimeParam(diffRt = 3))
x <- groupFeatures(x, AbundanceSimilarityParam(threshold = 0.7, transform = log2))
x <- annotateIsotopes(x, IsotopologueParam(ppm = 10))
x <- annotateAdducts(x, AdductVoteParam(polarity = "positive", nBest = 3))
featureDefinitions(x)[, c("feature_group", "isotopes", "adduct")]
adductHints(x)

Installation

remotes::install_github("stanstrup/IonFamilies")

Status

Early development (0.99.x, the Bioconductor pre-release numbering). Documentation: https://stanstrup.github.io/IonFamilies. The package follows the RforMassSpectrometry and Bioconductor conventions so that it could be contributed there later.

Development notes

  • Commit messages follow Conventional Commits (feat:, fix:, docs:, test:, refactor:, style:, build:, ci:).
  • Parts of the code were written with the help of an AI assistant (Claude, Anthropic) and reviewed by the maintainer. This is disclosed as the RforMassSpectrometry contribution guidelines ask.
  • data/adductRules.rda is generated by inst/scripts/make-adductRules.R.
  • Releases are made by semantic-release from the commit messages (GitHub Actions, .github/workflows/release.yaml); versions stay in 0.99.x.
  • The pkgdown site is built and deployed to the gh-pages branch by .github/workflows/pkgdown.yaml.