Description Usage Arguments See Also Examples
View source: R/plotting_functions.R
Draws differential map (i.e. one with positive and negative entries).
1 2 3 4 5 6 7 8 9 10 11 12 13 |
mtx.dense |
numeric matrix with positive and negative entries; if matrix does not contain any negative values use |
zeros.na |
logical if TRUE convert zero cells to NA |
breaks |
numeric number of breaks on color scale |
colors.pal |
colors for pallette |
color.range |
numeric vector of length 2 or NULL; if specified gives minimum and maximum values for color scale; this is manual adjustment of scale |
sqrt.transform |
logical if TRUE apply sqrt transformation: sqrt(pos) to positive elements of matrix and -sqrt(abs(neg)) to negative elements of matrix |
useRaster |
logical if TRUE (default) lower quality image is produced, but the process is much faster and resulting file uses little space |
image_plot_na
for function handling heatmap plotting
1 2 3 4 5 6 7 8 9 10 11 12 | # get sample contact map (MSC replicate 1) for chromosome 18
mtx1.sparse <- DIADEM::sample_hic_maps[["MSC-HindIII-1_40kb-raw"]][["18"]]
# get another sample contact map (MSC replicate 2) for chromosome 18
mtx2.sparse <- DIADEM::sample_hic_maps[["MSC-HindIII-2_40kb-raw"]][["18"]]
# make differential map
merged <- base::merge(mtx1.sparse, mtx2.sparse, by = c("i", "j"))
merged$difference <- merged$val.x - merged$val.y
dense <- sparse2dense(merged[c("i","j","difference")], N = 1952)
# plot
plot_diff_map(dense)
# plot with sqrt transformation of data
plot_diff_map(dense, sqrt.transform = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.