After quality-trimmed reads leave the preprocessing stage, they are mapped to the reference genome in paired-end mode. In bulk ATAC-seq (the defaultDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BDB-Genomics/atacseq-pipeline/llms.txt
Use this file to discover all available pages before exploring further.
ATAC_MODE=bulk), alignment is performed by Bowtie2 using the --very-sensitive preset, which maximises sensitivity at the cost of runtime — an appropriate trade-off for ATAC-seq, where correctly mapping reads near open-chromatin boundaries is essential. The resulting unsorted BAM is piped directly from Bowtie2 through samtools view to avoid writing an intermediate SAM file to disk, then coordinate-sorted by a dedicated samtools sort rule before the post-alignment filtering chain begins.
Single-cell ATAC-seq mode (
ATAC_MODE=scatac) replaces Bowtie2 with Chromap (--preset atac) and routes output through ArchR for Arrow-file creation and doublet removal. That modality is documented separately in the single-cell modality guide.Configuration
bowtie2.params.index key resolves to the YAML anchor *BOWTIE2_INDEX, which points to data/reference/index/genome. Changing the reference genome in one place (global.references.bowtie2_index) automatically propagates to the alignment rule.
Bowtie2 Alignment
Input Resolution
The rule resolves R1 and R2 trimmed FASTQ paths dynamically using the sample wildcard, pulling from
results/preprocessing/fastp/:Paired-End Alignment
Bowtie2 aligns in paired-end mode (
-1/-2) with --very-sensitive, which enables the most exhaustive seed extension strategy in Bowtie2:Full Rule
Output
| File | Location | Description |
|---|---|---|
{sample}.bam | results/alignment/bowtie2/ | Unsorted BAM; input to samtools_sort |
Coordinate Sorting
The unsorted BAM produced by the alignment step cannot be indexed and is not suitable for the downstream filtering chain, which relies on positional operations (fixmate, markdup, MAPQ filtering). Thesamtools_sort rule converts it to a coordinate-sorted BAM using four threads and 8 GB RAM:
Output
| File | Location | Description |
|---|---|---|
{sample}.sorted.bam | results/post_alignment/samtools_sort/ | Coordinate-sorted BAM; enters post-alignment chain |
Resource Allocation
- Bowtie2
- samtools sort
| Parameter | Value |
|---|---|
| Threads | 8 |
| Memory | 16 GB |
| Wall-time | 240 min (base, scales on retry) |
| Container | mulled-v2-ac74a7f02306649ee64e819b8830f69904d48507 |
attempt on retry:
Benchmark Files
Each rule writes a Snakemake benchmark file capturing real-world CPU time, wall-clock time, and peak memory:benchmarks/bowtie2/{sample}.txtbenchmarks/samtools_sort/{sample}.txt
benchmark_summary rule into results/reporting/benchmark_summary.tsv at the end of the run.