compartment_matrixplot: Compartment score matrix plot

View source: R/matrixplot_compartment.R

compartment_matrixplotR Documentation

Compartment score matrix plot

Description

Display a Hi-C matrix with compartment scores annotated in the margins.

Usage

compartment_matrixplot(
  exp1,
  exp2 = NULL,
  CS_discovery = NULL,
  chrom,
  arm = "p",
  colour_lim = NULL,
  rasterise = FALSE,
  metric = c("contacts", "obsexp", "log2obsexp", "correlation"),
  colour_bar = FALSE,
  ...
)

Arguments

exp1

A GENOVA contacts object.

exp2

A GENOVA contacts object compatible with exp1 (optional) or NULL. If not NULL, the exp2 argument will be displayed alongside the exp1 data.

CS_discovery

A CS_discovery object, as created by the compartment_score function. When NULL, the compartment score will be calculated on the fly for this arm only.

chrom

A character of length 1 with a chromosome name.

arm

Either "p", "q" or "all", denoting the chromosome arm of which to display the data from. "all" displays the whole chromosome.

colour_lim

A numeric of length two giving the minimum and maximum values in contact values. Out of bounds values will be set to the nearest limits.

rasterise

Set to TRUE to use a bitmap raster instead of polygons.

metric

One of the follow:

"contacts"

Displays contacts.

"obsexp"

Displays observed over expected by distance.

"log2obsexp"

Displays the log 2 observed over expected by distance.

"correlation"

Displays Pearson correlation for the observed over expected by distance.

colour_bar

A logical of length 1, indicating whether a colour-bar legend should be drawn at the right.

...

Arguments passed to the compartment_score function.

Details

The 'on-the-fly' calculation of the compartment score uses the default settings. Therefore, if for example a different eigenvector is to be retrieved, please use the compartment_score function and provide the result as the CS_discovery argument in this function.

Value

No values are returned but a plot is outputted on the graphics device.

Recommended resolution

100kb-150kb.

See Also

The compartment_score function for computation of compartment scores.

Other matrix plots: hic_matrixplot(), insulation_matrixplot(), pyramid(), trans_matrixplot()

Examples

## Not run:  
compartment_matrixplot(
  WT_150kb, KO_150kb,
  chrom = "chr18", arm = "q",
  metric = "correlation"
)

## End(Not run)

robinweide/GENOVA documentation built on March 14, 2024, 11:16 p.m.