Skip to content

Distinguish ion evidence from compound identity

A reproducible feature can remain chemically unknown. Its accurate mass, retention time, isotope pattern, and proposed adduct describe an ion signal. They do not establish a unique molecular structure. The species comparison therefore keeps feature identifiers through its tables and figures.

This workflow supplies negative-mode MS1 evidence. It does not analyze the study’s separate pooled MS/MS files or compare biological features with reference standards under an identity-confirmation procedure. A significant species effect changes neither boundary.

Preserve what the adduct algorithm actually reports

Section titled “Preserve what the adduct algorithm actually reports”

MetaboliteAdductDecharger proposes groups of related ions. The executed workflow preserves its annotated feature map, which retains individual ion areas. It does not replace each group with a summed neutral-compound quantity.

The distinction also affects annotations. OpenMS assigns the default deprotonation formula to an ungrouped ion with a known charge. That default is an assumption, not evidence from another matching ion. The preparation preserves the original Group field and the ungrouped flags from the OpenMS 3.0.0 implementation.

Both examples count a candidate relation only when at least two retained observations share an injection and group. They also require the observation to lack an ungrouped flag. Group numbers are local to an injection; matching numbers in two files do not define the same compound.

The executed data produce no retained candidate ion relations under that rule. Default deprotonation labels do not turn the ungrouped observations into supporting adduct pairs.

The source data are Dietz and colleagues’ MTBLS865 deposit, released publicly by MetaboLights in 2020 under EMBL-EBI Terms of Use. The repository’s public data policy permits reuse, and its data guide permits modification. The source notice identifies the authors, original files, and this analysis’s selection and transformations.

library(ggplot2)
library(jsonlite)
source("/shared/validate_fixtures.R")
ValidateFixtures(c("sample_metadata.tsv", "features.tsv.gz",
"feature_observations.tsv.gz"))
features <- read.delim(gzfile("/fixtures/features.tsv.gz"),
colClasses = c(feature_id = "character"))
observations <- read.delim(gzfile("/fixtures/feature_observations.tsv.gz"),
colClasses = c(feature_id = "character",
source_feature_id = "character",
adduct_group = "character"))
metadata <- read.delim("/fixtures/sample_metadata.tsv")
stopifnot(!anyDuplicated(features$feature_id))
stopifnot(setequal(features$feature_id, observations$feature_id))
stopifnot(!anyDuplicated(observations[c("feature_id", "injection_id")]))
stopifnot(!anyNA(observations$adduct_group))
group_key <- paste(observations$injection_id, observations$adduct_group,
sep = ":")
group_sizes <- table(group_key)
observations$group_size <- as.integer(group_sizes[group_key])
observations$candidate_relation <- observations$group_size > 1L &
observations$ungrouped == 0L
feature_index <- match(observations$feature_id, features$feature_id)
evidence <- data.frame(
feature_id = features$feature_id,
observations = tabulate(feature_index, nbins = nrow(features)),
related_observations = tabulate(
feature_index[observations$candidate_relation], nbins = nrow(features)),
default_only_observations = tabulate(
feature_index[observations$ungrouped == 1L], nbins = nrow(features))
)
evidence$msms_identification <- FALSE
evidence$confirmed_identity <- FALSE
write.csv(evidence, "outputs/evidence_r.csv", row.names = FALSE)
metrics <- list(features = nrow(features),
related_features = sum(evidence$related_observations > 0),
related_observations = sum(observations$candidate_relation),
msms_identifications = 0L, confirmed_identities = 0L)
write_json(metrics, "outputs/metrics_r.json", auto_unbox = TRUE)
cat(sprintf("Retained ion features: %d\n", metrics$features))
cat(sprintf("Features with candidate ion relations: %d\n",
metrics$related_features))
cat("MS/MS identifications in this analysis: 0\n")
cat("Confirmed biological compound identities: 0\n")
Retained ion features: 96101
Features with candidate ion relations: 0
MS/MS identifications in this analysis: 0
Confirmed biological compound identities: 0
qc_id <- metadata$injection_id[metadata$role == "pooled_qc"][1]
qc <- observations[observations$injection_id == qc_id, ]
qc$evidence <- ifelse(qc$candidate_relation,
"Candidate relation", "No retained partner")
ion_plot <- ggplot(qc, aes(aligned_retention_time_seconds / 60, mz,
color = evidence)) +
geom_point(size = 1.1, alpha = 0.65) +
scale_color_manual(values = c("Candidate relation" = "#c46536",
"No retained partner" = "#7b8c99")) +
labs(x = "Aligned retention time in minutes", y = "Observed m/z",
color = NULL, title = paste("Ion evidence in", qc_id)) +
theme_minimal(base_size = 12) + theme(legend.position = "bottom")
ggsave("outputs/adduct_evidence_r.png", ion_plot, width = 8.5, height = 5,
dpi = 160, bg = "white")
counts <- data.frame(
evidence = factor(c("Observed features", "Candidate ion relations",
"MS/MS identities", "Confirmed identities"),
levels = c("Observed features", "Candidate ion relations",
"MS/MS identities", "Confirmed identities")),
features = c(metrics$features, metrics$related_features, 0, 0)
)
evidence_plot <- ggplot(counts, aes(evidence, features)) +
geom_col(fill = "#286b86") +
geom_text(aes(label = features), vjust = -0.3) +
scale_y_continuous(expand = expansion(mult = c(0, 0.12))) +
labs(x = NULL, y = "Features",
title = "Available evidence has distinct limits") +
theme_minimal(base_size = 11)
ggsave("outputs/identity_evidence_r.png", evidence_plot, width = 8.5,
height = 4.4, dpi = 160, bg = "white")

The first pooled QC shows ion positions and candidate adduct evidence.

Observed features and candidate ion relations do not supply confirmed biological identities.

Keep the standard checks within their scope

Section titled “Keep the standard checks within their scope”

The control lesson extracts three declared mass channels from known MM8 material. A channel can contain more than one chromatographic peak, and a matching mass can have several chemical explanations. Its total area therefore supports a repeatability check for that channel. It does not transfer a compound name to every biological feature inside the same mass window.

Confirmation requires a declared identity procedure with suitable orthogonal evidence and reference material. The selected workflow has neither biological MS/MS matching nor a validated retention-time match to a reference standard. The pathway lesson consequently uses feature-level figures and explains the additional evidence required for a pathway analysis.

  • Sumner and colleagues on chemical-analysis reporting

    The MSI paper distinguishes identified compounds, putative annotations, compound classes, and unknowns. It requires orthogonal evidence against authentic material for its highest identification level.

  • OpenMS 3.0.0 adduct-deconvolution source

    The original implementation records ungrouped ions and assigns default adducts to eligible singletons. These operations explain why a default label does not establish a related-ion group.