plot_with_inset: Plots contact map or diff map with inset.

Description Usage Arguments See Also Examples

View source: R/plotting_functions.R

Description

Additionally it can plot regions on both orignal image and inset.

Usage

1
2
3
4
5
6
7
8
plot_with_inset(
  args.map,
  xlim,
  ylim,
  which.map = c("contact.map", "diff.map")[1],
  mar = c(1, 2, 1, 0.1),
  args.regions = NULL
)

Arguments

args.map

named list of arguments for map plotting function for type of args see plot_contact_map and plot_diff_map

xlim

numeric 2-element vector o x limits

ylim

numeric 2-element vector o y limits

which.map

character string indicating if contact map or diff map should be plotted

mar

numeric vector of length 4 specifying margins

args.regions

named list of arguments passed to plot_regions function, if NULL then don not plot regions

See Also

plot_contact_map, plot_diff_map for plotting contact maps and difference maps and plot_regions for plotting regions and its arguments

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# get Hi-C map file
mtx.fname <- system.file("extdata", "MSC-HindIII-1_40kb-raw.npz", package = "DIADEM", mustWork = TRUE)
# read it and take chromosome 18
m.sparse18 <- read_npz(mtx.fname, mtx.names = c("18"))[["18"]]
dense <- sparse2dense(m.sparse18[c("i","j","val")], N = 1952)
plot_with_inset(list(dense), c(500,800), c(500,800))
# get TADs
tads <- map2tads(dense)
# plot with TADs
plot_with_inset(list(dense), c(500,800), c(500,800), args.regions = list(tads))

rz6/CopulaHiC documentation built on Dec. 31, 2019, 9:19 a.m.