circhic
.CircHiCFigure¶A circular HiC figure
array of chromosome length.
position of the origin. The origin is set to the North of the plot
whether to plot a circular or a linear chromosome.
A Matplotlib figure. If not provided, will create it.
Notes
See FIXME
Methods
|
Plot bands |
|
Plot a bar chart |
|
Plot a heatmap of the HiC contact count matrix on a circular strip. |
|
Plot a line chart |
Plot the r-axis, corresponding to the genomic distance |
|
|
Set a colorbar on the plot |
|
Set the circular tick labels |
Plot bands
List of the all the beginnings of each band.
List of all the ends of each band.
List of colors. Should be the same size as begin and end
Plot a bar chart
The line color. Possible values:
A single color format string (e.g. “#000000”, “black”, “0”).
A float between 0 and 1
Defaults to None.
The inner radius of the plot, assuming the maximum outer radius possible is 1. Should be smaller than outer_radius.
The outer radius of the plot, assuming the maximum outer radius possible is 1. Should be larger than inner_radius.
Plot a heatmap of the HiC contact count matrix on a circular strip.
The contact count matrix of shape (n, n) where n = lengths.sum() / resolution
Plot up to inner_gdis of the diagonal of the contact count matrix (in genomic distance). Corresponds to the lower-diagonal on a typical square HiC contact count matrix.
Plot up to outer_gdis of the diagonal of the contact count matrix (in genomic distance). Corresponds to the upper-diagonal part of the contact count matrix on a typical square contact count map.
Radius of the inner strip, considering that the maximum outer radius is 1. Should be smaller than outer_radius. Note that inner_radius will be ignored if ax is provided.
Radius of the outer strip, considering that the maximum possible outer radius is 1. Should be larger than inner_radius.
Resolution of the HiC contact count map. By default, the function will estimate the resolution given the lengths of the chromosome and the shape of the contact count matrix.
A Matplotlib colormap.
if “reflect”, the contact count matrix will be plotted from inner_gdis to 0, then 0 to outer_gdis.
if “distant”, the contact count matrix will be plotted from inner_gdis to outer_gdis: this option is useful to visualize contact counts far away from the diagonal.
vmin and vmax define the data range that the colormap covers. By default, the colormap covers the complete value range of the supplied data.
Matplotlib Axes object. By default, will create one. Note that outer_radius and inner_radius will be ignored if ax is provided.
Plot a line chart
The line color. Possible values:
A single color format string (e.g. “#000000”, “black”, “0”).
A float between 0 and 1
Defaults to None.
The inner radius of the plot, assuming the maximum outer radius possible is 1. Should be smaller than outer_radius.
The outer radius of the plot, assuming the maximum outer radius possible is 1. Should be larger than inner_radius.
Plot the r-axis, corresponding to the genomic distance
Set a colorbar on the plot
The matplotlib.cm.ScalarMappable (i.e., Image, ContourSet, etc.) described by this colorbar.
Whether to plot a vertical or horizontal colorbar.
Set the circular tick labels
the list of strings to plot. Should be the same length as the number of ticks.
the positions of the ticks. Should be the same length as the tick labels.
A dictionary controlling the appearance of the ticklabels. The default fontdict is:
- {‘fontsize’: rcParams[‘axes.titlesize’],
‘fontweight’: rcParams[‘axes.titleweight’], ‘verticalalignment’: ‘baseline’, ‘horizontalalignment’: loc}
See the Maplotlib documentation for more information on the fontdict.
Matplotlib Axes object. By default, will create one. Note that outer_radius and inner_radius will be ignored if ax is provided.
circhic.CircHiCFigure
¶Circular Hi-C and genomic data
Zooming in chromosomal interaction domains
Secondary diagonal from ‘distant’ mode
A human chromosome: KBM7’s chr11
KBM-7 cell line, chromosome XI