Skip to content

Verify the mass spectrometry cohort

The source manifest connects each raw file to a biological culture. We verify that connection before the search because a correct statistical model with reversed condition labels answers the wrong question.

PXD002057 contains three parental SKBR3 cultures and three cultures of the resistant SKBR3-AZDRc derivative. The original XML experiment titles state each condition and replicate. The archive README links those XML records to the raw files.

These examples inspect source metadata. The primary execution record tracks those separate checks.

The separate input preparation accepts all six complete raw files, totaling 13,972,629,221 bytes. Each matches its provider size and MD5, and the companion integrity record preserves its local SHA-256 value. The complete cohort passes its fresh primary gate and downstream sample review.

The fixtures preserve the source annotations independently of the analysis labels. Both languages check exact raw-file joins, condition assignments, biological units, and source sizes. The expected source size describes the complete raw file, not a downloaded prefix.

library(digest)
library(ggplot2)
library(jsonlite)
checksums <- read.table("/fixtures/SHA256SUMS", colClasses = "character")
for (index in seq_len(nrow(checksums))) {
actual <- digest(file = file.path("/fixtures", checksums[index, 2]),
algo = "sha256")
stopifnot(identical(actual, checksums[index, 1]))
}
samples <- read.delim("/fixtures/sample_metadata.tsv", check.names = FALSE)
source <- read.delim("/fixtures/source_annotations.tsv", check.names = FALSE)
samples <- samples[order(samples$run_id), ]
source <- source[match(samples$raw_file, source$raw_file), ]
condition_names <- c(
parental = "Parental SKBR3 cells",
resistant = "AZD8931-resistant SKBR3-AZDRc cells"
)
stopifnot(
nrow(samples) == 6L,
!anyDuplicated(samples$sample_id),
!anyDuplicated(samples$biological_unit),
!anyDuplicated(samples$raw_file),
!anyDuplicated(source$raw_file),
identical(samples$raw_file, source$raw_file),
all(source$source_condition == condition_names[samples$condition]),
all(source$source_replicate == samples$biological_replicate),
all(samples$source_xml == source$source_xml),
all(samples$fraction == 1L),
all(samples$acquisition == "DDA"),
all(table(samples$condition) == 3L)
)
samples$condition <- factor(samples$condition,
levels = c("parental", "resistant"))
design <- model.matrix(~ condition, data = samples)
stopifnot(qr(design)$rank == ncol(design))
design_table <- data.frame(
sample_id = samples$sample_id,
intercept = design[, 1],
resistant = design[, 2]
)
write.csv(design_table, "outputs/design_r.csv", row.names = FALSE)
metrics <- list(samples = nrow(samples),
parental = sum(samples$condition == "parental"),
resistant = sum(samples$condition == "resistant"),
expected_bytes = sum(samples$expected_bytes),
design_rank = qr(design)$rank)
write_json(metrics, "outputs/metrics_r.json", auto_unbox = TRUE)
cat("Source files:", nrow(samples), "\n")
cat("Parental cultures:", sum(samples$condition == "parental"), "\n")
cat("Resistant cultures:", sum(samples$condition == "resistant"), "\n")
cat("Expected raw bytes:", format(sum(samples$expected_bytes),
scientific = FALSE), "\n")
cat("Design rank:", qr(design)$rank, "\n")
cat("Complete-profile residual degrees of freedom:",
nrow(design) - qr(design)$rank, "\n")
Source files: 6
Parental cultures: 3
Resistant cultures: 3
Expected raw bytes: 13972629221
Design rank: 2
Complete-profile residual degrees of freedom: 4
design_plot <- ggplot(samples, aes(biological_replicate, condition,
color = condition)) +
geom_point(size = 5) +
geom_text(aes(label = sample_id), nudge_y = 0.17,
color = "#263238", size = 3.8) +
scale_x_continuous(breaks = 1:3, limits = c(0.6, 3.4)) +
scale_y_discrete(expand = expansion(add = 0.5)) +
scale_color_manual(values = c("#246783", "#b84b3b")) +
labs(x = "Biological replicate within condition", y = NULL,
title = "Six independently prepared cultures",
subtitle = "Replicate numbers do not establish pairs") +
theme_minimal(base_size = 12) +
theme(legend.position = "none", panel.grid.minor = element_blank())
ggsave("outputs/design_r.png", design_plot, width = 8, height = 3.8,
dpi = 160, bg = "white")

The design shows three parental and three resistant cultures.

The two-column design contains an intercept and a resistant-condition indicator. Its residual degrees of freedom apply to a protein group observed in every culture. Missing measurements can reduce that number for an individual group.

The figure displays the biological design, not a measured quality result. The primary workflow converts all six raw files and retains identification and quantification evidence for the later lessons.

The PXD002057 archive record supplies the deposited sample description and links the source experiment. The methods in Creedon and colleagues, 2016, describe the biological triplicates. Use both records when connecting raw filenames to independent cultures.