domains / science / ngs-deeptools-analysis / deeptools

deeptools

Skill card

combined

The K-Dense-AI copy is the most technically rigorous, containing specific 4.0.0 migration notes (Rust backend changes, removal of --ignoreDuplicates) and a detailed normalization guide. However, the FreedomIntelligence and aipoch copies contain specific workflow steps (ATAC-seq Tn5 offset correction, RNA-seq strand-specific filtering) and a general execution model that the K-Dense copy defers to external reference files. Because the K-Dense copy is truncated and relies on external references for the full workflow details that are explicitly present in the other copies, crowning it would hide the concrete procedural steps found in the others.

Repositories

RepositoryPath
K-Dense-AI/scientific-agent-skillsskills/deeptools/SKILL.md
aipoch/medical-research-skillsscientific-skills/Data Analysis/deeptools/SKILL.md
FreedomIntelligence/OpenClaw-Medical-Skillsskills/deeptools/SKILL.md

Other copies

RoleRepositoryPath
peerK-Dense-AI/scientific-agent-skillsskills/deeptools/SKILL.md
peeraipoch/medical-research-skillsscientific-skills/Data Analysis/deeptools/SKILL.md
peerFreedomIntelligence/OpenClaw-Medical-Skillsskills/deeptools/SKILL.md

Combined skill

---
name: deeptools
description: NGS analysis toolkit for BAM to bigWig conversion, QC, and visualization for ChIP-seq, RNA-seq, and ATAC-seq.
---

# deepTools: NGS Data Analysis Toolkit

## Overview
deepTools is a comprehensive suite of Python command-line tools for processing high-throughput sequencing data. It is used for quality control, normalization, sample comparison, and generating publication-quality visualizations.

## When to Use
- **File conversion**: "Convert BAM to bigWig", "generate coverage tracks".
- **Quality control**: "check ChIP quality", "compare replicates", "PCA analysis".
- **Visualization**: "create heatmap around TSS", "plot ChIP signal".
- **Analysis workflows**: "analyze ChIP-seq data", "ATAC-seq analysis".

## Installation
Use Python 3.12+ and deepTools 4.0.0 for the most up-to-date Rust-backed performance.
```bash
uv venv --python 3.13 .venv-deeptools
uv pip install --python .venv-deeptools/bin/python deepTools==4.0.0
source .venv-deeptools/bin/activate
```

## Quick Start
1. **Validate Input Files**: Check BAM, bigWig, and BED files.
   ```bash
   python scripts/validate_files.py --bam sample1.bam sample2.bam --bed regions.bed
   ```
2. **Generate Workflow Template**: Create customized scripts for standard analyses.
   ```bash
   python scripts/workflow_generator.py chipseq_qc -o qc_workflow.sh \
       --input-bam Input.bam --chip-bams "ChIP1.bam ChIP2.bam"
   chmod +x qc_workflow.sh && ./qc_workflow.sh
   ```

## Core Workflows

### ChIP-seq Quality Control
1. **Sample correlation**: Use `multiBamSummary` and `plotCorrelation` (replicates should have >0.9 correlation).
2. **PCA analysis**: Use `plotPCA` to check for outliers.
3. **Fingerprint**: Use `plotFingerprint` to assess enrichment strength (steep rise = good ChIP).

### ChIP-seq Complete Analysis
1. **Generate coverage tracks**: Use `bamCoverage` with RPGC or CPM normalization.
2. **Create comparison tracks**: Use `bamCompare` for log2 ratio.
3. **Compute signal matrices**: Use `computeMatrix` around features.
4. **Generate visualizations**: Use `plotHeatmap` and `plotProfile`.

### RNA-seq Coverage
- Use `bamCoverage` with `--filterRNAstrand` for strand-specific tracks.
- **Important**: NEVER use `--extendReads` for RNA-seq.
- Use CPM for fixed bins or RPKM for gene-level analysis.

### ATAC-seq Analysis
1. **Shift reads**: Use `alignmentSieve` with `--ATACshift` for Tn5 offset correction.
2. **Generate coverage**: Use `bamCoverage`.
3. **Analyze fragment sizes**: Look for the nucleosome ladder pattern.

## Normalization Methods
- **RPGC**: 1× genome coverage (requires `--effectiveGenomeSize`).
- **CPM**: Counts per million mapped reads.
- **RPKM**: Reads per kb per million (per-bin length and library-size scaling).

## 4.0.0 Migration Notes
- `bamCoverage`, `bamCompare`, and `multiBamSummary` no longer accept `--ignoreDuplicates`; use `--samFlagExclude 1024` after duplicate marking.
- `bamCompare` no longer accepts SES.
- `--exactScaling` is removed from rewritten coverage commands.