Creates a heatmap of a Hi-C matrix.

usage: hicPlotMatrix --matrix MATRIX --outFileName OUTFILENAME [--title TITLE]
                     [--scoreName SCORENAME] [--perChromosome]
                     [--chromosomeOrder CHROMOSOMEORDER [CHROMOSOMEORDER ...]]
                     [--region REGION] [--region2 REGION2] [--log1p] [--log]
                     [--colorMap COLORMAP] [--vMin VMIN] [--vMax VMAX]
                     [--dpi DPI] [--bigwig BIGWIG [BIGWIG ...]]
                     [--vMinBigwig VMINBIGWIG] [--vMaxBigwig VMAXBIGWIG]
                     [--scaleFactorBigwig SCALEFACTORBIGWIG] [--loops LOOPS]
                     [--help] [--version]

Required arguments

--matrix, -m

Path of the Hi-C matrix to plot.

--outFileName, -out

File name to save the image.

Optional arguments

--title, -t

Plot title.

--scoreName, -s

Score name label for the heatmap legend.


Instead of plotting the whole matrix, each chromosome is plotted next to the other. This parameter is not compatible with –region.

Default: False


If set, masked bins are removed from the matrix and the nearest bins are extended to cover the empty space instead of plotting black lines.

Default: False


Chromosomes and order in which the chromosomes should be plotted. This option overrides –region and –region2.


Plot only this region. The format is chr:start-end The plotted region contains the main diagonal and is symmetric unless –region2 is given.


If given, then only the region defined by –region and –region2 is given. The format is the same as –region1.


Plot the log1p of the matrix values.

Default: False


Plot the MINUS log of the matrix values.

Default: False


Color map to use for the heatmap. Available values can be seen here: http://matplotlib.org/examples/color/colormaps_reference.html

Default: “RdYlBu_r”


Minimum score value.


Maximum score value.


Resolution for the image in case theouput is a raster graphics image (e.g png, jpg).

Default: 72


Bigwig file to plot below the matrix. This can for example be used to visualize A/B compartments or ChIP-seq data.


Add an additional axis to determine the values of a bigwig file in 2D better.

Default: False


Minimum score value for bigwig.


Maximum score value for bigwig


The sign of the bigwig values are flipped. Useful if hicPCA gives inverted values.

Default: False


Scale the values of a bigwig file by the given factor.

Default: 1.0


Bedgraph file to plot detected long range contacts from hicDetectLoops.


show program’s version number and exit


hicplotMatrix takes a Hi-C matrix and plots the interactions of all or some chromosomes.


Here’s an example of Hi-C data from wild-type D. melanogaster embryos.


This plot shows all contacts of a Hi-C matrix. Its bins were merged into 25 kb bins using hicMergeMatrixBins. Alternatively, chromosomes can be plotted separately:

$ hicPlotMatrix -m Dmel.h5 -o hicPlotMatrix.png \
-t 'D.melanogaster (--perChromosome)' --log1p \
--clearMaskedBins --chromosomeOrder 2L 2R 3L 3R X --perChromosome