Description Usage Arguments See Also Examples
View source: R/plotting_functions.R
Additionally it can plot regions on both orignal image and inset.
1 2 3 4 5 6 7 8 |
args.map |
named list of arguments for map plotting function for type of args see |
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_contact_map
, plot_diff_map
for plotting contact maps and difference maps and plot_regions
for plotting regions and its arguments
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.