| name | bio-chipseq-visualization |
| description | 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. |
| tool_type | mixed |
| primary_tool | deepTools |
ChIP-seq Visualization
deepTools - Compute Matrix
computeMatrix reference-point \
--referencePoint TSS \
-b 3000 -a 3000 \
-R genes.bed \
-S sample.bw \
-o matrix.gz \
--outFileSortedRegions sorted_genes.bed
deepTools - Scale-Regions
computeMatrix scale-regions \
-R genes.bed \
-S sample1.bw sample2.bw \
-b 3000 -a 3000 \
-m 5000 \
-o matrix_scaled.gz
deepTools - Heatmap
plotHeatmap \
-m matrix.gz \
-o heatmap.png \
--colorMap RdBu \
--whatToShow 'heatmap and colorbar' \
--zMin -3 --zMax 3
plotHeatmap \
-m matrix.gz \
-o heatmap_with_profile.png \
--plotTitle 'H3K4me3 Signal' \
--heatmapHeight 15 \
--refPointLabel TSS
deepTools - Profile Plot
plotProfile \
-m matrix.gz \
-o profile.png \
--plotTitle 'Average Signal Profile' \
--perGroup
plotProfile \
-m matrix_multi.gz \
-o profile_compare.png \
--colors red blue green \
--plotTitle 'Sample Comparison'
Create BigWig from BAM
bamCoverage \
-b sample.bam \
-o sample.bw \
--normalizeUsing CPM \
--binSize 10 \
--numberOfProcessors 8
bamCompare \
-b1 chip.bam \
-b2 input.bam \
-o chip_vs_input.bw \
--operation log2ratio \
--binSize 50
ChIPseeker Profile Heatmap (R)
library(ChIPseeker)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
peaks <- readPeakFile('sample_peaks.narrowPeak')
promoter <- getPromoters(TxDb = txdb, upstream = 3000, downstream = 3000)
tagMatrix <- getTagMatrix(peaks, windows = promoter)
tagHeatmap(tagMatrix, xlim = c(-3000, 3000), color = 'red')
plotAvgProf(tagMatrix, xlim = c(-3000, 3000), xlab =
ylab
plotAvgProf2tagMatrix xlim conf
Gviz - Genome Browser Tracks (R)
library(Gviz)
library(GenomicRanges)
chr <- 'chr1'
start <- 1000000
end <- 1100000
itrack <- IdeogramTrack(genome = 'hg38', chromosome = chr)
gtrack <- GenomeAxisTrack()
dtrack <- DataTrack(
range = 'sample.bw',
genome = 'hg38',
type = 'histogram',
name = 'ChIP Signal',
col.histogram = 'darkblue',
fill.histogram = 'darkblue'
)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
grtrack <- GeneRegionTrack(txdb, genome = 'hg38', chromosome chr name
plotTracksitrack gtrack dtrack grtrack
from start to end chromosome chr
Multiple Samples in Gviz
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)
library(EnrichedHeatmap)
library(rtracklayer)
signal <- import('sample.bw')
tss <- promoters(txdb, upstream = 0, downstream = 1)
mat <- normalizeToMatrix(signal, tss, extend = 3000, mean_mode = 'w0', w = 50)
EnrichedHeatmap(mat, name = 'Signal', col = c('white', 'red'))
IGV Batch Screenshot
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
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