Skip to content

The paired ATAC-seq dataset

Four donors provide the comparison in this section. Each contributes a resting and a stimulated naive CD4 T-cell sample, so the analysis estimates a condition effect within donors. Eight sample profiles do not mean eight independent donors.

The source is GSE118189, from Calderon and colleagues. GEO calls the selected cell type Naive_Teffs and records donor and treatment in each sample title. The stimulation protocol uses CD3/CD28 antibody beads and IL-2 for 24 hours. Resting cells provide the comparator; this design does not separate the effects of culture, beads, and cytokine exposure.

The selection retains complete pairs from donors 1001 through 1004 before any differential result. Other cell types and the unmatched stimulated sample from donor 1011 do not enter the cohort. The companion metadata joins GEO accessions to ENA runs through their SRA experiment identifiers. Both records from donor 1003 describe additional NextSeq reads merged with the original library. That merge creates neither a new donor nor an independent biological replicate.

Keep the archived and fresh matrices separate

Section titled “Keep the archived and fresh matrices separate”

This page uses the deposited matrix to check provenance. Its regions came from the original study’s consensus procedure across a wider collection of samples. The original methods describe fragment counts and a limma-voom analysis with donor and TSS enrichment terms. The later lessons use a fresh nf-core/atacseq consensus and a separately specified DESeq2 model. Differences between the two matrices can arise from region definitions as well as alignment and filtering.

The preparation preserves the complete source archive hash and extracts all regions for the eight selected columns. It does not select regions according to treatment effects. The archive SHA-256 is 583b24da0ef1d29ca6c221cba1c3fe3ded35ca780428176de8962f91315f2d48. That hash identifies the downloaded archive; it is not an independent checksum provided by GEO.

The companion repository requires access. It preserves source metadata, the extraction script, the selected archive columns, and checksums. The examples run in its chromatin:recovery_2026_11_01 container without network access. The public source remains available from GEO regardless of companion access.

Count columns must follow metadata order. A correct set of names with an incorrect order still assigns counts to the wrong donor or treatment. Both examples explicitly align columns, require one sample per donor and condition, and construct the same five-column design matrix. They also verify that the archive contains nonnegative integers and unique autosomal intervals.

The original experiment comes from Calderon and colleagues, deposited as GSE118189, SRP156496, and PRJNA484801. This example summarizes the deposited GEO count matrix. The source notice distinguishes this matrix from the fresh outputs used by the later lessons.

The authors’ original data resource links GSE118189 and invites research use with citation. The archive source notice records that release, NCBI’s molecular data policy, and the exact matrix identity. This lesson preserves all regions and selects eight sample columns before it derives donor summaries.

library(ggplot2)
library(jsonlite)
metadata <- read.delim("/fixtures/metadata.tsv", colClasses = "character")
metadata <- metadata[order(metadata$donor, metadata$condition), ]
stopifnot(!anyDuplicated(metadata$sample_id))
stopifnot(!anyDuplicated(metadata$geo_accession))
stopifnot(!anyDuplicated(metadata$run_accession))
metadata$donor <- factor(metadata$donor)
metadata$condition <- factor(metadata$condition,
levels = c("resting", "stimulated"))
stopifnot(all(table(metadata$donor, metadata$condition) == 1L))
archive <- read.delim(gzfile("/fixtures/archived_counts.tsv.gz"),
check.names = FALSE)
stopifnot(setequal(names(archive)[-1], metadata$geo_title))
counts <- as.matrix(archive[, metadata$geo_title])
stopifnot(all(is.finite(counts)), all(counts >= 0))
stopifnot(all(counts == floor(counts)))
stopifnot(!anyDuplicated(archive$region_id))
regions <- do.call(rbind, strsplit(archive$region_id, "_", fixed = TRUE))
starts <- as.integer(regions[, 2])
ends <- as.integer(regions[, 3])
stopifnot(all(regions[, 1] %in% paste0("chr", 1:22)))
stopifnot(all(starts >= 0L), all(ends > starts))
design <- model.matrix(~donor + condition, metadata)
design_rank <- qr(design)$rank
stopifnot(design_rank == ncol(design))
metadata$assigned_counts <- colSums(counts)
cat(sprintf("Samples: %d; donors: %d; archived regions: %d\n",
nrow(metadata), nlevels(metadata$donor), nrow(counts)))
cat(sprintf("Design rank: %d; residual degrees of freedom: %d\n",
design_rank, nrow(design) - design_rank))
for (i in seq_len(nrow(metadata))) {
cat(sprintf("%s %s %s %s %d\n", metadata$donor[i],
metadata$condition[i], metadata$geo_accession[i],
metadata$run_accession[i], metadata$assigned_counts[i]))
}
dir.create("outputs", showWarnings = FALSE)
write.table(metadata, "outputs/archive_summary_r.tsv", sep = "\t",
quote = FALSE, row.names = FALSE)
write.table(design, "outputs/design_r.tsv", sep = "\t",
quote = FALSE, row.names = FALSE)
metrics <- list(samples = nrow(metadata), donors = nlevels(metadata$donor),
regions = nrow(counts), design_rank = design_rank,
total = sum(counts), zero_fraction = mean(counts == 0L))
write_json(metrics, "outputs/metrics_r.json",
auto_unbox = TRUE, digits = 16)
figure <- ggplot(metadata, aes(condition, assigned_counts / 1e6,
group = donor, color = donor)) +
geom_line(linewidth = 0.7) + geom_point(size = 3) +
theme_bw(base_size = 12) +
labs(x = "Condition", y = "Archived assigned counts, millions",
color = "Donor")
ggsave("outputs/archive_totals_r.png", figure,
width = 7, height = 4.3, dpi = 160)
Samples: 8; donors: 4; archived regions: 829942
Design rank: 5; residual degrees of freedom: 3
1001 resting GSM3320253 SRR7650753 8269922
1001 stimulated GSM3320254 SRR7650754 14854489
1002 resting GSM3320296 SRR7650796 10802722
1002 stimulated GSM3320297 SRR7650797 8210511
1003 resting GSM3320336 SRR7650836 6679139
1003 stimulated GSM3320337 SRR7650837 7951653
1004 resting GSM3320370 SRR7650870 12752827
1004 stimulated GSM3320371 SRR7650871 13028718

Lines connect archived count totals from the same donor.

Each line connects one donor’s two sample profiles. Its slope describes counts assigned to the deposited regions, not a change in absolute genome-wide accessibility. Sequencing depth, filtering, and the original region collection all affect the total. These totals cannot supply a mitochondrial fraction, duplicate rate, or fraction of unique fragments in peaks.

The rank check establishes that the donor and condition coefficients are estimable. The primary workflow supplies fresh reports for the quality review before differential inference.

The GSE118189 sample metadata identifies the donors and stimulation conditions represented here. These records connect the fixture labels to their source experiment.

The nf-core/atacseq 2.1.2 usage guide describes the processing stages that produced the retained outputs. It gives context for the files used by the downstream lessons.