Skip to contents

Plot a genomic region given a matrix

Usage

plot_region_mat(
  mat,
  mc_colors = NULL,
  colors = c("white", "gray", "black", "gold"),
  color_breaks = c(0, 6, 12, 18, 24),
  intervals = NULL,
  resolution = NULL,
  dca_mat = NULL,
  n_smooth = 10,
  n_pixels = 1000,
  gene_annot = FALSE
)

Arguments

mat

a matrix where rows are coordinates and columns are metacells

mc_colors

a vector of colors for the metacells (optional)

colors

color pallette for the ATAC signal

color_breaks

a vector of breaks for the color palette

intervals

the plotted intervals (optional)

resolution

the resolution of the plotted intervals (optional)

dca_mat

a matrix with the differential cluster accessibility (DCA) for the plotted regions (optional). Output of mct_diff_access_on_hc.

n_smooth

number of genomic bins to use for smoothing the signal. Signal is smoothed by a rolling sum for each metacell (optional). Default is 20.

n_pixels

number of pixels in the plot. The DCA regions would be extended by ceiling(2 * nrow(mat) / n_pixels) (optional).

gene_annot

whether to add gene annotations; these annotations rely on the existence of an annots/refGene.txt file in the genome's misha directory, and on the existence of an intervals set called "intervs.global.tss" in the genome's misha directory. (optional)