Skill Tracer
Skills › Knowledge Work Plugins › nextflow-development › atacseq.md

atacseq.md

138 lines · bio-research/skills/nextflow-development/references/pipelines/atacseq.md at 2574e29

Open on GitHub
1# nf-core/atacseq
2
3**Version:** 2.1.2
4
5**Official Documentation:** https://nf-co.re/atacseq/2.1.2/
6**GitHub:** https://github.com/nf-core/atacseq
7
8> **Note:** When updating to a new version, check the [releases page](https://github.com/nf-core/atacseq/releases) for breaking changes and update the version in commands below.
9

nf-core/atacseq

Version: 2.1.2

Official Documentation: https://nf-co.re/atacseq/2.1.2/ GitHub: https://github.com/nf-core/atacseq

Note: When updating to a new version, check the releases page for breaking changes and update the version in commands below.
Raw lines 1 to 9
10## Contents
11- [Test command](#test-command)
12- [Samplesheet format](#samplesheet-format)
13- [Parameters](#parameters)
14- [Output files](#output-files)
15- [Quality metrics](#quality-metrics)

Contents

  • Test command
  • Samplesheet format
  • Parameters
  • Output files
  • Quality metrics
Raw lines 10 to 16
17## Test command
19```bash
20nextflow run nf-core/atacseq -r 2.1.2 -profile test,docker --outdir test_atacseq
21```
23Expected: ~15 min, creates peaks and BigWig tracks.

Test command

nextflow run nf-core/atacseq -r 2.1.2 -profile test,docker --outdir test_atacseq

Expected: ~15 min, creates peaks and BigWig tracks.

Raw lines 17 to 24
25## Samplesheet format
27```csv
28sample,fastq_1,fastq_2,replicate
29CONTROL,/path/to/ctrl_rep1_R1.fq.gz,/path/to/ctrl_rep1_R2.fq.gz,1
30CONTROL,/path/to/ctrl_rep2_R1.fq.gz,/path/to/ctrl_rep2_R2.fq.gz,2
31TREATMENT,/path/to/treat_rep1_R1.fq.gz,/path/to/treat_rep1_R2.fq.gz,1
32TREATMENT,/path/to/treat_rep2_R1.fq.gz,/path/to/treat_rep2_R2.fq.gz,2
33```
35| Column | Required | Description |
36|--------|----------|-------------|
37| sample | Yes | Condition/group identifier |
38| fastq_1 | Yes | Absolute path to R1 |
39| fastq_2 | Yes | Absolute path to R2 (paired-end required) |
40| replicate | Yes | Replicate number (integer) |

Samplesheet format

sample,fastq_1,fastq_2,replicate
CONTROL,/path/to/ctrl_rep1_R1.fq.gz,/path/to/ctrl_rep1_R2.fq.gz,1
CONTROL,/path/to/ctrl_rep2_R1.fq.gz,/path/to/ctrl_rep2_R2.fq.gz,2
TREATMENT,/path/to/treat_rep1_R1.fq.gz,/path/to/treat_rep1_R2.fq.gz,1
TREATMENT,/path/to/treat_rep2_R1.fq.gz,/path/to/treat_rep2_R2.fq.gz,2
ColumnRequiredDescription
sampleYesCondition/group identifier
fastq_1YesAbsolute path to R1
fastq_2YesAbsolute path to R2 (paired-end required)
replicateYesReplicate number (integer)
Raw lines 25 to 41
42### Design file for differential analysis
43```csv
44sample,condition
45CONTROL,control
46TREATMENT,treatment
47```
49Use with `--deseq2_design design.csv`.

Design file for differential analysis

sample,condition
CONTROL,control
TREATMENT,treatment

Use with --deseq2_design design.csv.

Raw lines 42 to 50
51## Parameters
53### Minimal run
54```bash
55nextflow run nf-core/atacseq -r 2.1.2 -profile docker \
56 --input samplesheet.csv --outdir results --genome GRCh38 --read_length 50
57```

Minimal run

nextflow run nf-core/atacseq -r 2.1.2 -profile docker \
    --input samplesheet.csv --outdir results --genome GRCh38 --read_length 50
Raw lines 53 to 58
59### Common parameters
61| Parameter | Default | Description |
62|-----------|---------|-------------|
63| `--genome` | - | `GRCh38`, `GRCh37`, `mm10` |
64| `--read_length` | 50 | Read length for MACS2 optimization |
65| `--narrow_peak` | true | Narrow peaks (false for broad) |
66| `--mito_name` | chrM | Mitochondrial chromosome name |
67| `--keep_mito` | false | Keep mitochondrial reads |
68| `--min_reps_consensus` | 1 | Min replicates for consensus peaks |

Common parameters

ParameterDefaultDescription
--genome-GRCh38, GRCh37, mm10
--read_length50Read length for MACS2 optimization
--narrow_peaktrueNarrow peaks (false for broad)
--mito_namechrMMitochondrial chromosome name
--keep_mitofalseKeep mitochondrial reads
--min_reps_consensus1Min replicates for consensus peaks
Raw lines 59 to 69
70### Differential accessibility
71```bash
72--deseq2_design design.csv
73```

Differential accessibility

--deseq2_design design.csv
Raw lines 70 to 74
75## Output files
77```
78results/
79├── bwa/mergedLibrary/
80│ ├── *.mLb.mkD.sorted.bam # Filtered, deduplicated alignments
81│ └── bigwig/
82│ └── *.bigWig # Coverage tracks
83├── macs2/narrowPeak/
84│ ├── *.narrowPeak # Peak calls
85│ └── consensus/
86│ └── consensus_peaks.bed # Merged peaks across replicates
87├── deeptools/
88│ ├── plotFingerprint/ # Library complexity
89│ └── plotProfile/ # TSS enrichment
90├── deseq2/ # If --deseq2_design provided
91└── multiqc/
92```
94**Key outputs:**
95- `*.mLb.mkD.sorted.bam`: Analysis-ready alignments
96- `*.narrowPeak`: MACS2 peak calls (BED format)
97- `consensus_peaks.bed`: Consensus peaks across replicates
98- `*.bigWig`: Genome browser tracks

Output files

results/
├── bwa/mergedLibrary/
│   ├── *.mLb.mkD.sorted.bam     # Filtered, deduplicated alignments
│   └── bigwig/
│       └── *.bigWig             # Coverage tracks
├── macs2/narrowPeak/
│   ├── *.narrowPeak             # Peak calls
│   └── consensus/
│       └── consensus_peaks.bed  # Merged peaks across replicates
├── deeptools/
│   ├── plotFingerprint/         # Library complexity
│   └── plotProfile/             # TSS enrichment
├── deseq2/                      # If --deseq2_design provided
└── multiqc/

Key outputs:

  • *.mLb.mkD.sorted.bam: Analysis-ready alignments
  • *.narrowPeak: MACS2 peak calls (BED format)
  • consensus_peaks.bed: Consensus peaks across replicates
  • *.bigWig: Genome browser tracks
Raw lines 75 to 99
100## Quality metrics
102| Metric | Good | Acceptable | Poor |
103|--------|------|------------|------|
104| Mapped reads | >80% | 60-80% | <60% |
105| Mitochondrial | <20% | 20-40% | >40% |
106| Duplicates | <30% | 30-50% | >50% |
107| FRiP | >30% | 15-30% | <15% |
108| TSS enrichment | >6 | 4-6 | <4 |
110**Fragment size**: Should show nucleosomal periodicity (~50bp nucleosome-free, ~200bp mono-nucleosome).

Quality metrics

MetricGoodAcceptablePoor
Mapped reads>80%60-80%<60%
Mitochondrial<20%20-40%>40%
Duplicates<30%30-50%>50%
FRiP>30%15-30%<15%
TSS enrichment>64-6<4

Fragment size: Should show nucleosomal periodicity (~50bp nucleosome-free, ~200bp mono-nucleosome).

Raw lines 100 to 111
112## Downstream analysis
114```r
115library(ChIPseeker)
116library(GenomicRanges)
117peaks <- import("consensus_peaks.bed")
118peakAnno <- annotatePeak(peaks, TxDb = TxDb.Hsapiens.UCSC.hg38.knownGene)
119```
121**Motif analysis:**
122```bash
123findMotifsGenome.pl consensus_peaks.bed hg38 motifs/ -size 200
124```

Downstream analysis

library(ChIPseeker)
library(GenomicRanges)
peaks <- import("consensus_peaks.bed")
peakAnno <- annotatePeak(peaks, TxDb = TxDb.Hsapiens.UCSC.hg38.knownGene)

Motif analysis:

findMotifsGenome.pl consensus_peaks.bed hg38 motifs/ -size 200
Raw lines 112 to 125
126## Troubleshooting
128**Low FRiP**: Check library complexity in `plotFingerprint/`. May indicate over-transposition.
130**Few peaks**: Lower threshold with `--macs_qvalue 0.1` or use `--narrow_peak false` for broader peaks.
132**High duplicates**: Normal for low-input; pipeline removes by default.

Troubleshooting

Low FRiP: Check library complexity in plotFingerprint/. May indicate over-transposition.

Few peaks: Lower threshold with --macs_qvalue 0.1 or use --narrow_peak false for broader peaks.

High duplicates: Normal for low-input; pipeline removes by default.

Raw lines 126 to 133
134## More Information
136- **Full parameter list:** https://nf-co.re/atacseq/2.1.2/parameters/
137- **Output documentation:** https://nf-co.re/atacseq/2.1.2/docs/output/
138- **Usage documentation:** https://nf-co.re/atacseq/2.1.2/docs/usage/

More Information

  • Full parameter list: https://nf-co.re/atacseq/2.1.2/parameters/
  • Output documentation: https://nf-co.re/atacseq/2.1.2/docs/output/
  • Usage documentation: https://nf-co.re/atacseq/2.1.2/docs/usage/
Raw lines 134 to 138