Description Usage Arguments Value See Also Examples
Computes correlations (Pearson, Spearman, Kendall) and significances of corresponding diagonals between 2 Hi-C maps of HiCcomparator object.
1 2 3 4 5 6 |
hic.comparator |
object of type HiCcomparator |
which.cors |
character indicating which correlation measures to calculate, available choices are: pearson, spearman and kendall |
pooled |
logical if true then calculates correlations over pools of diagonals, otherwise uses single diagonals |
dataframe with following columns: diagonal, pcc, pearson.pval, rho, spearman.pval, tau, kendall.pval, name which can be used to conveniently visualise dependancy between 2 Hi-C maps being compared (see examples)
HiCcomparator
on how to construct HiCcomparator object
1 2 3 4 5 6 7 8 9 10 11 12 | first create HiCcomparator object - see ?HiCcomparator for examples
library("ggplot2")
library("reshape2")
decay.cors <- decay_correlation(hic.comparator)
# wide to long
decay.cors.long <- reshape2::melt(decay.cors[c("name","diagonal","pcc","rho","tau")], id.vars = c("name","diagonal"), variable.name = "correlation", value.name = "coefficient")
# remove 0 diagonal (as it is non informative anyways) and illustrate results
ggplot(decay.cors.long[decay.cors.long$diagonal != 0,],
aes(x = diagonal, y = coefficient, color = correlation)) +
geom_point(size = 0.3) +
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.