bio-chipseq-visualization

Visualize ChIP-seq data using deepTools, Gviz, and ChIPseeker. Create heatmaps, profile plots, and genome browser tracks. Visualize signal around peaks, TSS, or custom regions. Use when visualizing ChIP-seq signal and peaks.

1,802 stars

Best use case

bio-chipseq-visualization is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Visualize ChIP-seq data using deepTools, Gviz, and ChIPseeker. Create heatmaps, profile plots, and genome browser tracks. Visualize signal around peaks, TSS, or custom regions. Use when visualizing ChIP-seq signal and peaks.

Teams using bio-chipseq-visualization should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/bio-chipseq-visualization/SKILL.md --create-dirs "https://raw.githubusercontent.com/FreedomIntelligence/OpenClaw-Medical-Skills/main/skills/bio-chipseq-visualization/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/bio-chipseq-visualization/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How bio-chipseq-visualization Compares

Feature / Agentbio-chipseq-visualizationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Visualize ChIP-seq data using deepTools, Gviz, and ChIPseeker. Create heatmaps, profile plots, and genome browser tracks. Visualize signal around peaks, TSS, or custom regions. Use when visualizing ChIP-seq signal and peaks.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## Version Compatibility

Reference examples tested with: GenomicRanges 1.54+, deepTools 3.5+

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 Visualization

**"Create a heatmap of ChIP-seq signal around peaks"** → Generate signal heatmaps, profile plots, and genome browser tracks showing enrichment patterns around genomic features.
- CLI: `deeptools computeMatrix reference-point` → `plotHeatmap`
- R: `Gviz`, `ChIPseeker::plotAvgProf()`

## deepTools - Compute Matrix

**Goal:** Build a signal matrix of ChIP-seq coverage around reference points for downstream heatmaps and profiles.

**Approach:** Use computeMatrix to extract bigWig signal values in windows around genomic features like TSS.

```bash
# Compute signal matrix around TSS
computeMatrix reference-point \
    --referencePoint TSS \
    -b 3000 -a 3000 \              # 3kb upstream and downstream
    -R genes.bed \                  # Reference regions
    -S sample.bw \                  # Signal file (bigWig)
    -o matrix.gz \
    --outFileSortedRegions sorted_genes.bed
```

## deepTools - Scale-Regions

**Goal:** Visualize ChIP signal across gene bodies scaled to a uniform length.

**Approach:** Scale all gene regions to equal size and compute signal with flanking windows.

```bash
# Signal across gene bodies
computeMatrix scale-regions \
    -R genes.bed \
    -S sample1.bw sample2.bw \
    -b 3000 -a 3000 \              # Flanking regions
    -m 5000 \                       # Scaled body length
    -o matrix_scaled.gz
```

## deepTools - Heatmap

**Goal:** Generate a heatmap of ChIP-seq signal intensity across genomic regions.

**Approach:** Render the precomputed signal matrix as a clustered heatmap with optional profile summary.

```bash
# Generate heatmap from matrix
plotHeatmap \
    -m matrix.gz \
    -o heatmap.png \
    --colorMap RdBu \
    --whatToShow 'heatmap and colorbar' \
    --zMin -3 --zMax 3

# With profile on top
plotHeatmap \
    -m matrix.gz \
    -o heatmap_with_profile.png \
    --plotTitle 'H3K4me3 Signal' \
    --heatmapHeight 15 \
    --refPointLabel TSS
```

## deepTools - Profile Plot

**Goal:** Display average ChIP-seq signal profiles across genomic regions for sample comparison.

**Approach:** Plot mean signal from the computed matrix, optionally overlaying multiple samples.

```bash
# Average profile plot
plotProfile \
    -m matrix.gz \
    -o profile.png \
    --plotTitle 'Average Signal Profile' \
    --perGroup

# Multiple samples comparison
plotProfile \
    -m matrix_multi.gz \
    -o profile_compare.png \
    --colors red blue green \
    --plotTitle 'Sample Comparison'
```

## Create BigWig from BAM

**Goal:** Convert BAM alignments to normalized bigWig signal tracks for visualization.

**Approach:** Use bamCoverage for single-sample normalization or bamCompare for log2 ratio of ChIP over input.

```bash
# Normalized bigWig (CPM)
bamCoverage \
    -b sample.bam \
    -o sample.bw \
    --normalizeUsing CPM \
    --binSize 10 \
    --numberOfProcessors 8

# With input subtraction
bamCompare \
    -b1 chip.bam \
    -b2 input.bam \
    -o chip_vs_input.bw \
    --operation log2ratio \
    --binSize 50
```

## ChIPseeker Profile Heatmap (R)

**Goal:** Visualize peak distribution around TSS using ChIPseeker tag matrices and profile plots.

**Approach:** Build a tag density matrix from peak locations relative to promoter windows, then plot as heatmap or average profile.

```r
library(ChIPseeker)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)

txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene

# Load peaks
peaks <- readPeakFile('sample_peaks.narrowPeak')

# Get promoter regions
promoter <- getPromoters(TxDb = txdb, upstream = 3000, downstream = 3000)

# Compute tag matrix
tagMatrix <- getTagMatrix(peaks, windows = promoter)

# Heatmap
tagHeatmap(tagMatrix, xlim = c(-3000, 3000), color = 'red')

# Profile plot
plotAvgProf(tagMatrix, xlim = c(-3000, 3000), xlab = 'Distance from TSS (bp)',
            ylab = 'Peak Count Frequency')

# With confidence interval
plotAvgProf2(tagMatrix, xlim = c(-3000, 3000), conf = 0.95)
```

## Gviz - Genome Browser Tracks (R)

**Goal:** Create publication-quality genome browser views combining signal tracks, gene models, and ideograms.

**Approach:** Layer Gviz track objects (ideogram, axis, data, gene) and render a specific genomic region.

```r
library(Gviz)
library(GenomicRanges)

# Define region
chr <- 'chr1'
start <- 1000000
end <- 1100000

# Ideogram track
itrack <- IdeogramTrack(genome = 'hg38', chromosome = chr)

# Genome axis
gtrack <- GenomeAxisTrack()

# Data track from bigWig
dtrack <- DataTrack(
    range = 'sample.bw',
    genome = 'hg38',
    type = 'histogram',
    name = 'ChIP Signal',
    col.histogram = 'darkblue',
    fill.histogram = 'darkblue'
)

# Gene track
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
grtrack <- GeneRegionTrack(txdb, genome = 'hg38', chromosome = chr, name = 'Genes')

# Plot
plotTracks(list(itrack, gtrack, dtrack, grtrack),
           from = start, to = end, chromosome = chr)
```

## Multiple Samples in Gviz

**Goal:** Compare ChIP-seq signal from multiple samples in a single browser view.

**Approach:** Create separate DataTrack objects per sample and stack them in the plotTracks call.

```r
# Create data tracks for each sample
dtrack1 <- DataTrack(range = 'control.bw', genome = 'hg38', name = 'Control',
                      type = 'histogram', col.histogram = 'blue', fill.histogram = 'blue')
dtrack2 <- DataTrack(range = 'treatment.bw', genome = 'hg38', name = 'Treatment',
                      type = 'histogram', col.histogram = 'red', fill.histogram = 'red')

plotTracks(list(itrack, gtrack, dtrack1, dtrack2, grtrack),
           from = start, to = end, chromosome = chr)
```

## EnrichedHeatmap (R)

**Goal:** Generate customizable heatmaps of ChIP signal around genomic features using ComplexHeatmap framework.

**Approach:** Normalize bigWig signal to a matrix around target sites and render with EnrichedHeatmap.

```r
library(EnrichedHeatmap)
library(rtracklayer)

# Load signal and regions
signal <- import('sample.bw')
tss <- promoters(txdb, upstream = 0, downstream = 1)

# Normalize to matrix
mat <- normalizeToMatrix(signal, tss, extend = 3000, mean_mode = 'w0', w = 50)

# Heatmap
EnrichedHeatmap(mat, name = 'Signal', col = c('white', 'red'))
```

## IGV Batch Screenshot

**Goal:** Automate genome browser screenshots at specific loci without manual interaction.

**Approach:** Write an IGV batch script that loads tracks, navigates to regions, and saves snapshots.

```bash
# Create IGV batch script
cat > igv_batch.txt << 'EOF'
new
genome hg38
load sample.bw
load peaks.bed
goto chr1:1000000-1100000
snapshot region1.png
goto chr2:50000000-51000000
snapshot region2.png
exit
EOF

# Run IGV in batch mode
igv.sh -b igv_batch.txt
```

## Key Tools Comparison

| Tool | Type | Best For |
|------|------|----------|
| deepTools | CLI | Large-scale heatmaps, profiles |
| ChIPseeker | R | Peak-centric visualization |
| Gviz | R | Publication-quality browser |
| EnrichedHeatmap | R | Customizable heatmaps |
| IGV | GUI | Interactive exploration |

## deepTools Key Commands

| Command | Purpose |
|---------|---------|
| bamCoverage | BAM to bigWig |
| bamCompare | Compare two BAMs |
| computeMatrix | Signal matrix |
| plotHeatmap | Heatmap visualization |
| plotProfile | Profile plot |
| multiBigwigSummary | Compare multiple bigWigs |
| plotCorrelation | Sample correlation |

## Related Skills

- peak-calling - Generate peaks for visualization
- peak-annotation - Annotation pie charts
- alignment-files - Prepare BAM files

Related Skills

scientific-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.

bio-tcr-bcr-analysis-repertoire-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Create publication-quality visualizations of immune repertoire data including circos plots, clone tracking, diversity plots, and network graphs. Use when generating figures for repertoire comparisons, clonal dynamics, or V(D)J gene usage.

bio-spatial-transcriptomics-spatial-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Visualize spatial transcriptomics data using Squidpy and Scanpy. Create tissue plots with gene expression, clusters, and annotations overlaid on histology images. Use when visualizing spatial expression patterns.

bio-pathway-enrichment-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Visualize enrichment results using enrichplot package functions. Use when creating publication-quality figures from clusterProfiler results. Covers dotplot, barplot, cnetplot, emapplot, gseaplot2, ridgeplot, and treeplot.

bio-metagenomics-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Visualize metagenomic profiles using R (phyloseq, microbiome) and Python (matplotlib, seaborn). Create stacked bar plots, heatmaps, PCA plots, and diversity analyses. Use when creating publication-quality figures from MetaPhlAn, Bracken, or other taxonomic profiling output.

bio-hi-c-analysis-hic-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Visualize Hi-C contact matrices, TADs, loops, and genomic features using matplotlib, cooltools, and HiCExplorer. Create triangle plots, virtual 4C, and multi-track figures. Use when visualizing contact matrices or genomic features.

bio-de-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Visualize differential expression results using DESeq2/edgeR built-in functions. Covers plotMA, plotDispEsts, plotCounts, plotBCV, sample distance heatmaps, and p-value histograms. Use when visualizing differential expression results.

bio-copy-number-cnv-visualization

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Visualize copy number profiles, segments, and compare across samples. Create publication-quality plots of CNV data from CNVkit, GATK, or other callers. Use when creating genome-wide CNV plots, sample heatmaps, or chromosome-level visualizations.

bio-chipseq-super-enhancers

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Identifies super-enhancers from H3K27ac ChIP-seq data using ROSE and related tools. Use when studying cell identity genes, cancer-associated regulatory elements, or master transcription factor binding regions that cluster into large enhancer domains.

bio-chipseq-qc

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

ChIP-seq quality control metrics including FRiP (Fraction of Reads in Peaks), cross-correlation analysis (NSC/RSC), library complexity, and IDR (Irreproducibility Discovery Rate) for replicate concordance. Use to assess experiment quality before downstream analysis. Use when assessing ChIP-seq data quality metrics.

bio-chipseq-peak-calling

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

ChIP-seq peak calling using MACS3 (or MACS2). Call narrow peaks for transcription factors or broad peaks for histone modifications. Supports input control, fragment size modeling, and various output formats including narrowPeak and broadPeak BED files. Use when calling peaks from ChIP-seq alignments.

bio-chipseq-peak-annotation

1802
from FreedomIntelligence/OpenClaw-Medical-Skills

Annotate ChIP-seq peaks to genomic features and genes using ChIPseeker. Assign peaks to promoters, exons, introns, and intergenic regions. Find nearest genes and calculate distance to TSS. Generate annotation plots and statistics. Use when annotating ChIP-seq peaks to genomic features.