Skip to content

Audit identification confidence

A spectrum match, a peptide sequence, and a protein group are different hypotheses. Their counts differ, their evidence overlaps, and their error rates require separate definitions. Repeated spectra from one peptide cannot be counted as independent protein evidence.

The primary workflow preserves the accepted identification records and their score metadata. This lesson uses those fresh records to inspect filtering at each reported level.

Level Hypothesis Duplicate measurements
Peptide-spectrum match A particular spectrum supports a candidate peptide. Several spectra can support the same peptide.
Peptidoform A sequence has a declared modification state. Charge states and repeated spectra can represent the same peptidoform.
Peptide sequence An unmodified amino acid sequence is present. Different peptidoforms can share that sequence.
Protein group The peptide evidence supports the declared group of accessions. Group members can share the same evidence.

The selected workflow applies per-run filtering before its experiment-wide PSM and protein steps. We preserve the exact score names, score directions, and filtering order. A column named score is not enough to identify the hypothesis or its error interpretation.

The configured 0.01 thresholds do not automatically establish peptide-level control. Unless the accepted output records a peptide-level procedure, the lesson reports peptide counts without claiming a peptide q-value threshold.

A q-value describes the minimum estimated false discovery rate at which a result enters the accepted set under that procedure. It is not the posterior probability that the individual result is wrong. Percolator can also report posterior error probabilities, but those values answer a different question.

The target-decoy comparison depends on the search space and competition procedure. We inspect the executed OpenMS and Percolator commands instead of treating a requested parameter as proof that the corresponding option ran.

A post-filtered table cannot reconstruct the complete score distribution before filtering. If only accepted records remain, a target-decoy plot must state that boundary. The preserved process evidence supplies the appropriate earlier records where the workflow retains them.

The result retains every accession in a group. A representative accession is useful for display, but it does not turn an ambiguous group into an independently measured protein.

Peptide support uses unmodified sequence identities. Multiple charge states or modified forms of one sequence do not satisfy a two-sequence requirement. A group-unique peptide can map to several proteins within one indistinguishable group, provided it does not also support another group.

Potential contaminants and decoys remain separate flags. A mixed group that includes a potential contaminant requires conservative treatment before biological interpretation. The exclusion table records the full group and its reason instead of deleting a name without a trace.

Identification acceptance determines which measurements have enough sequence evidence to enter later analysis. Differential abundance then tests condition coefficients among an explicitly eligible set of protein groups.

The differential BH adjustment belongs to that second family of hypotheses. It does not repair a mistaken sequence assignment, and a protein identification q-value does not replace the differential p-value. Continue with sample quality and normalization after the identification record passes its checks.

The sequential counts below apply to the final exported groups. They do not reconstruct the search population before target-decoy filtering. The score histogram likewise describes final group q-values, and each group counts once regardless of its number of members.

The export retains 2005 protein groups, including 92 groups with multiple accessions. The declared support filter retains 1166 noncontaminant target groups.

These counts describe retained export records. They do not estimate the number of distinct proteins measured independently.

library(ggplot2)
library(jsonlite)
source("/shared/ms_common.R")
data <- LoadMsData()
groups <- data$groups
q_value <- as.numeric(groups$protein_q_value)
member_count <- as.integer(groups$member_count)
stopifnot(all(is.finite(q_value)), all(q_value >= 0 & q_value <= 1))
stopifnot(identical(groups$identification_pass, q_value <= 0.01))
identified <- groups$identification_pass
target <- identified & !groups$is_decoy
clean <- target & !groups$is_contaminant
supported <- clean & groups$unique_peptide_count >= 2L
stages <- data.frame(
stage = c("Exported groups", "Identification threshold", "Target groups",
"Without potential contaminants", "Two unique peptides"),
groups = c(nrow(groups), sum(identified), sum(target), sum(clean),
sum(supported))
)
write.csv(stages, "outputs/identification_stages_r.csv", row.names = FALSE)
record <- data.frame(
group_id = groups$group_id, members = groups$members,
protein_q_value = q_value, member_count = member_count,
unique_peptide_count = groups$unique_peptide_count,
is_decoy = groups$is_decoy, is_contaminant = groups$is_contaminant,
identification_pass = identified, support_pass = supported
)
write.csv(record, "outputs/group_evidence_r.csv", row.names = FALSE)
metrics <- list(exported_groups = nrow(groups),
identified_groups = sum(identified),
supported_target_groups = sum(supported),
ambiguous_groups = sum(member_count > 1L),
potential_contaminant_groups = sum(groups$is_contaminant))
write_json(metrics, "outputs/metrics_r.json", auto_unbox = TRUE)
cat("Final exported protein groups:", metrics$exported_groups, "\n")
cat("Supported noncontaminant target groups:",
metrics$supported_target_groups, "\n")
cat("Groups with multiple accessions:", metrics$ambiguous_groups, "\n")
Final exported protein groups: 2005
Supported noncontaminant target groups: 1166
Groups with multiple accessions: 92
stages$stage <- factor(stages$stage, levels = rev(stages$stage))
retention <- ggplot(stages, aes(groups, stage)) +
geom_col(fill = "#286b86") + geom_text(aes(label = groups), hjust = -0.15) +
scale_x_continuous(expand = expansion(mult = c(0, 0.15))) +
labs(x = "Protein groups", y = NULL,
title = "Sequential decisions within the final export") +
theme_minimal(base_size = 11)
ggsave("outputs/identification_retention_r.png", retention,
width = 9, height = 4.5, dpi = 160, bg = "white")
score <- ggplot(record, aes(protein_q_value, fill = is_contaminant)) +
geom_histogram(bins = 30, position = "stack") +
scale_fill_manual(values = c("#286b86", "#b85c38")) +
labs(x = "Final protein-group q-value", y = "Groups",
fill = "Potential contaminant",
title = "Scores after primary filtering") +
theme_minimal(base_size = 11)
ggsave("outputs/identification_scores_r.png", score,
width = 8, height = 4.5, dpi = 160, bg = "white")

The bars show protein groups retained at each declared filter.

The histogram shows final protein group q-values and contaminant flags.

The pinned OpenMS ProteomicsLFQ implementation declares separate sub-protein and protein FDR options, protein inference methods, and peptide restrictions for quantification. These options explain why a threshold needs a stated hypothesis level.

The quantms 1.10.0 usage guide describes the SDRF sample metadata, sequence database, and workflow inputs. Consult it when tracing the accepted identification records back to the primary analysis.