Run nf-core/atacseq for paired donors
The ATAC workflow must preserve one profile per donor and condition. This analysis uses eight complete ENA runs from GSE118189, with no read downsampling. Donors 1001 through 1004 each contribute resting and stimulated naive CD4 T cells. The separate metadata table carries the pairing into the downstream model.
The complete cohort workflow and all eight paired lessons pass their execution checks. The analysis retains all four donor pairs with the sample quality and model limits stated in the downstream lessons. The execution record preserves the completed run and its separate recovery check alongside the small pipeline test profile.
Use one reference definition
Section titled “Use one reference definition”The reference is the UCSC hg19 analysis FASTA with mitochondrial sequence
named chrMT. Alignment retains all 85 reference contigs. GENCODE v19 supplies
nuclear gene coordinates, while downstream inference uses autosomes after
blacklist removal. This preserves GRCh37 coordinates and does not relabel
the deposited matrix as GRCh38.
The preparation checks every contig and interval bound, verifies the reference hashes, and builds the Bowtie2 index from that FASTA. It derives one TSS per annotated gene and removes duplicate chromosome, base, and strand positions for the TSS metric. Gene annotation retains stable gene identifiers and nearest-gene ties.
The mitochondrial annotation is excluded from the nuclear GTF because its sequence naming differs from the alignment reference. The alignment FASTA still includes mitochondrial DNA so the QC report can measure those reads before their removal.
Preserve the biological units
Section titled “Preserve the biological units”The samplesheet uses resting and stimulated as sample labels and donor
indices 1 through 4 as replicate numbers. For example, both profiles with
replicate 1 map to donor 1001. The metadata also preserves the original GEO
sample and ENA run identifiers.
The pipeline parameter skip_merge_replicates=true prevents pooled biological
replicate outputs from replacing the eight individual profiles. Donor 1003’s
deposited libraries already include additional sequencing, as the GEO records
state. Those extra reads do not create additional biological donors.
Distinguish deposited reads from instrument output
Section titled “Distinguish deposited reads from instrument output”All eight selected GEO records describe adapter removal with Cutadapt 1.13 and a minimum retained length of 20. The inspected prefixes of the first four complete read pairs contain variable read lengths up to 76 bases.
The new run retains the pipeline’s Trim Galore stage and records any further adapter and quality removal in its reports. It does not claim to reproduce the original preprocessing. The original GEO protocol also reports a different Bowtie2 release and a mapping-quality threshold above 30, while the selected nf-core filter below uses its declared release default.
Inspect the selected parameters
Section titled “Inspect the selected parameters”The implementation uses nf-core/atacseq 2.1.2 with Nextflow 26.04.0 and rootless Podman. The source commit, external configuration commit, plugin version, and resolved container digests are recorded in the companion configuration.
| Setting | Selected behavior |
|---|---|
| Aligner | Bowtie2 uses --very-sensitive -X 2000 to allow a concordant fragment range that includes nucleosomal fragments. |
| Mitochondrial sequence | Both pipeline removal and ataqv metrics use chrMT. |
| Duplicate handling | Picard marks duplicates before the cleaned alignments exclude them. |
| Mapping quality | The release’s filter requires MAPQ at least 1; it does not apply a MAPQ 30 threshold. |
| Pair handling | The release removes orphaned alignments and retains its forward-reverse paired orientation. |
| Alignment filters | The paired filter limits absolute insert size to 2,000 bases, allows at most four mismatches, and excludes soft clipping. |
| Peaks | MACS2 uses paired BAM input, narrow peaks, --nomodel, and q-value threshold 0.01. |
| Effective genome size | MACS2 receives the declared human approximation of 2.7 billion bases. |
| Consensus | A region needs peak support from at least two samples within either condition. |
| Library complexity | skip_preseq=false enables Preseq with its fixed seed. |
| Biological replicates | skip_merge_replicates=true preserves the individual donor profiles. |
The effective genome size is a peak-model parameter, not a statement that
every reference base is uniquely mappable. Supplying it explicitly also
avoids forcing the original read protocol into an unsupported read_length
schema value. FastQC and the input audit retain the observed read lengths.
MACS2 uses the paired fragment span directly. This workflow does not shift those fragments a second time as if they were insertion coordinates. The maximum concordant insert setting also does not make every retained fragment nucleosome-free.
Record corrections at the process boundary
Section titled “Record corrections at the process boundary”The inspected release copies BED starts directly into its SAF count annotation. BED starts are zero-based, while SAF starts are one-based. The companion process hook sets each SAF start to BED start plus one and preserves every end and region identifier before featureCounts runs. A paired-read boundary test checks that this conversion changes the intended base assignment without changing the count unit.
The release’s autosome heuristic also retains chrUn names because its
case comparison differs. A second hook supplies the explicit chr1 through
chr22 list to ataqv. It leaves the full alignment reference intact.
Both corrections remain visible in the execution configuration and process
records.
The release’s FRiP report can count an alignment more than once when called peaks overlap. The QC lesson preserves that report, reproduces its calculation, and separately computes unique alignment and fragment fractions from the cleaned BAMs.
Follow each output to its use
Section titled “Follow each output to its use”The main sample outputs reside below bowtie2/merged_library/.
| Output | Use |
|---|---|
*.mLb.clN.sorted.bam and index |
The cleaned alignments supply the independent fragment audit. |
picard_metrics/ |
The reports retain duplication measurements before duplicate removal. |
ataqv/narrow_peak/ |
The reports retain mitochondrial and TSS measurements. |
preseq/ |
The curves describe projected library complexity. |
macs2/narrow_peak/*_peaks.narrowPeak |
Each sample contributes called intervals to consensus construction. |
macs2/narrow_peak/consensus/ |
The BED, corrected SAF, support table, and featureCounts matrix define shared regions. |
bigwig/ and bigwig/scale/ |
The tracks and scale factors support genomic displays with an explicit unit. |
Subread 2.0.1 uses -p to count paired fragments. The count command also uses
-O --fracOverlap 0.2, so one fragment can contribute to more than one region.
Assignment depends on aligned mate bases; an unsequenced insert gap alone
does not create a feature count. The
count lesson keeps that distinction
between fragment assignments and distinct sequenced molecules.
The pipeline’s own DESeq2 QC output does not replace the paired inferential
model. The differential lesson
fits ~ donor + condition from the fresh integer matrix and reports the
normalization and donor omission sensitivity checks.
Further reading
Section titled “Further reading”The nf-core/atacseq 2.1.2 usage guide defines the samplesheet, reference inputs, and workflow options. The tag fixes the pipeline version used for these fixtures.
The featureCounts module in atacseq 2.1.2 shows the counting command used by the workflow. Compare it with the recorded version and task command before interpreting paired-end counts.