Skip to content
Back to skills

Bio Applied Chipseq Pipeline

ASecurity

ChIP-seq pipeline — QC, alignment, deduplication, peak calling with MACS2, and signal normalization with deepTools

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
data-aipythonbashtestinggitdocumentation

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Pavel-Kravchenko/Bioinformatics --skill bio-applied-chipseq-pipeline --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bio Applied Chipseq Pipeline?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bio Applied Chipseq Pipeline
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pavel-kravchenko-bio-applied-chipseq-pipeline/badge)](https://www.skillsdirectory.com/skills/pavel-kravchenko-bio-applied-chipseq-pipeline)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bio-applied-chipseq-pipeline
description: "ChIP-seq pipeline — QC, alignment, deduplication, peak calling with MACS2, and signal normalization with deepTools"
tool_type: python
primary_tool: Matplotlib
---

# ChIP-seq Processing Pipeline

- [ENCODE ChIP-seq pipeline](https://www.encodeproject.org/chip-seq/)
- [MACS3 documentation](https://macs3-project.github.io/MACS/)
- [deepTools documentation](https://deeptools.readthedocs.io/)

## Experiment Design Reference

| Experiment Type | Peak Shape | Recommended Reads | Example Marks |
|---|---|---|---|
| TF | Narrow (< 500 bp) | 20-40 M | CTCF, GATA1, p53 |
| Active histone | Narrow | 30-50 M | H3K4me3, H3K9ac |
| Broad histone | Broad (> 5 kb) | 40-80 M | H3K27me3, H3K9me3 |
| Enhancer mark | Narrow/Mixed | 30-50 M | H3K27ac, H3K4me1 |

**Antibody**: must be ChIP-grade (not just WB-validated). **Replicates**: ENCODE requires >= 2 biological replicates + IDR analysis. **Sequencing**: paired-end strongly preferred (accurate fragment size, better dedup).

## Step 1: QC and Trimming

```bash
fastqc sample_R1.fastq.gz sample_R2.fastq.gz -o qc/raw/ -t 4
multiqc qc/raw/ -o qc/raw/multiqc/

# Trim Galore (auto-detects adapters)
trim_galore --paired --fastqc --cores 4 --quality 20 --length 20 \
    --output_dir trimmed/ sample_R1.fastq.gz sample_R2.fastq.gz

# Alternative: fastp (faster)
fastp -i sample_R1.fastq.gz -I sample_R2.fastq.gz \
    -o trimmed/sample_R1_trimmed.fastq.gz -O trimmed/sample_R2_trimmed.fastq.gz \
    --detect_adapter_for_pe --thread 4 -h trimmed/fastp_report.html
```

**Warning signs**: adapter > 20% = short fragments (re-evaluate sonication); Q < 20 beyond 10bp at 3' = aggressive trim; bimodal GC = contamination; > 30% pairs discarded = re-prep library.

## Step 2: Alignment (Bowtie2)

```bash
bowtie2 -x /data/indices/hg38 \
    -1 trimmed/sample_R1_val_1.fq.gz -2 trimmed/sample_R2_val_2.fq.gz \
    -p 8 --no-mixed --no-discordant \
    2> logs/sample_bowtie2.log | \
    samtools view -bS -F 4 -F 256 -q 30 -f 2 | \
    samtools sort -@ 4 -o aligned/sample.bam

samtools index aligned/sample.bam
samtools flagstat aligned/sample.bam | tee logs/sample_flagstat.txt

# Remove ENCODE blacklisted regions
bedtools intersect -a aligned/sample.bam -b hg38-blacklist.v2.bed -v > aligned/sample_filtered.bam
samtools index aligned/sample_filtered.bam
```

Target: > 80% alignment rate. Filter flags: `-F 4` (unmapped), `-F 256` (secondary), `-q 30` (MAPQ), `-f 2` (properly paired).

## Step 3: Duplicate Removal (Picard)

```bash
picard MarkDuplicates \
    I=aligned/sample_filtered.bam O=dedup/sample_dedup.bam \
    M=dedup/sample_dup_metrics.txt REMOVE_DUPLICATES=true \
    OPTICAL_DUPLICATE_PIXEL_DISTANCE=2500 \  # 100 for HiSeq, 2500 for NovaSeq
    VALIDATION_STRINGENCY=SILENT

samtools index dedup/sample_dedup.bam
```

**ENCODE QC thresholds**: PBC1 > 0.7 (acceptable), > 0.9 (ideal). NRF > 0.8 (acceptable), > 0.9 (ideal). Total dup rate > 50% = library complexity problem; TF ChIP should be < 30%.

## Pitfalls

- **Coordinate systems**: BED uses 0-based half-open; VCF/GFF use 1-based inclusive — mixing them causes off-by-one errors
- **Batch effects**: Always check for batch confounding before interpreting biological signal
- **Multiple testing**: Apply FDR correction (Benjamini-Hochberg) when testing thousands of features simultaneously

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.