Description Usage Arguments Value See Also Examples
Computes coverages or decays of every Hi-C maps in both data sets of given HiCcomparator object. Coverage is defined as sum of contacts on given bin. Decay is sum or mean of contacts for every diagonal.
1 2 | ## S3 method for class 'HiCcomparator'
dominating_signal(hic.comparator, which.signal = c("coverage", "decay")[1])
|
hic.comparator |
object of type HiCcomparator |
which.signal |
character either coverage or decay, which signal to calculate |
dataframe with following columns: (i, sum.contacts, mean.contacts, sd.contacts, name, dataset), which can be used to conveniently visualise coverages or decays (see examples)
HiCcomparator
on how to construct HiCcomparator object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # first create HiCcomparator object - see ?HiCcomparator for examples
coverage <- dominating_signal(hic.comparator)
# visualise results
library("ggplot2")
ggplot(coverage, aes(x = i, y = sum.contacts, color = dataset)) +
geom_point(size = 0.5) +
geom_smooth(alpha = 0.5) +
facet_wrap(~ name, ncol = 1, scales = "free") +
theme(legend.position = "bottom")
# get decay
decay <- dominating_signal(hic.comparator, which.signal = "decay")
ggplot(decay[decay$diagonal != 0,], aes(x = diagonal, y = mean.contacts, color = dataset)) +
geom_point(size = 0.5) +
scale_x_log10() +
scale_y_log10() +
facet_wrap(~ name, ncol = 1, scales = "free") +
theme(legend.position = "bottom")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.