| name | bio-workflows-chipseq-pipeline |
| description | End-to-end ChIP-seq workflow from FASTQ files to annotated peaks. Covers QC, alignment, peak calling with MACS3 (or HOMER), and peak annotation with ChIPseeker. Use when processing ChIP-seq data from alignment through peak annotation. |
| tool_type | mixed |
| primary_tool | MACS3 |
| workflow | true |
| depends_on | ["read-qc/fastp-workflow","read-alignment/bowtie2-alignment","alignment-files/duplicate-handling","chip-seq/chipseq-qc","chip-seq/peak-calling","chip-seq/peak-annotation","chip-seq/differential-binding","chip-seq/chipseq-visualization","chip-seq/motif-analysis"] |
| qc_checkpoints | [{"after_qc":"Q30 >85%, adapter content <5%"},{"after_alignment":"Mapping rate >80%, unique mapping >70%"},{"after_dedup":"NRF >0.8, PBC1 >0.8 (compute pre-dedup)"},{"after_peaks":"FRiP >1% (TF) or >5% (histone); NSC >1.05; RSC >0.8"},{"after_idr":"Nself and Nt ratios both <=2 (ENCODE consistency rule)"}] |
Version Compatibility
Reference examples tested with: Bowtie2 2.5.3+, MACS3 3.0+, HOMER 4.11+, bedtools 2.31+, fastp 0.23+, samtools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- R:
packageVersion('<pkg>') then ?function_name to verify parameters
- CLI:
<tool> --version then <tool> --help to confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
ChIP-seq Pipeline
"Process my ChIP-seq data from FASTQ to annotated peaks" → Orchestrate QC, Bowtie2 alignment, duplicate removal, MACS3 peak calling, ChIPseeker annotation, and QC metrics (FRiP, strand cross-correlation).
Complete workflow from raw ChIP-seq FASTQ files to annotated peaks.
Workflow Overview
FASTQ files (IP + Input)
|
v
[1. QC & Trimming] -----> fastp
|
v
[2. Alignment] ---------> Bowtie2
|
v
[3. BAM Processing] ----> sort, markdup, filter
|
v
[4. Peak Calling] ------> MACS3
|
v
[5. QC] ----------------> FRiP, fingerprint plots
|
v
[6. Annotation] --------> ChIPseeker
|
v
Annotated peaks + QC report
Primary Path: Bowtie2 + MACS3 + ChIPseeker
Step 1: Quality Control with fastp
for sample in IP_rep1 IP_rep2 Input_rep1 Input_rep2; do
fastp -i ${sample}_R1.fastq.gz -I ${sample}_R2.fastq.gz \
-o trimmed/${sample}_R1.fq.gz -O trimmed/${sample}_R2.fq.gz \
--detect_adapter_for_pe \
--qualified_quality_phred 20 \
--length_required 25 \
--html qc/${sample}_fastp.html
done
Step 2: Alignment with Bowtie2
bowtie2-build genome.fa bt2_index/genome
for sample in IP_rep1 IP_rep2 Input_rep1 Input_rep2; do
bowtie2 -p 8 -x bt2_index/genome \
-1 trimmed/${sample}_R1.fq.gz \
-2 trimmed/_R2.fq.gz \
--no-mixed --no-discordant \
--maxins 1000 \
2> aligned/. | \
samtools view -@ 4 -bS -q 30 - | \
samtools -@ 4 -o aligned/.bam