Description Usage Arguments Value Examples
Based on this method output one may plot expected vs observed plot of interactions for each diagonal pool (see examples).
1 2 | ## S3 method for class 'HiCglm'
simulate_null(hic.glm, dpools = "all", N = 10)
|
hic.glm |
HiCglm object |
dpools |
character or vector, if character "all" then use all pooled diagonals in background model, otherwise use specified subset |
N |
integer number of samples for every predictor value |
list of list of data frames with expected interactions, first list enumerates different maps (usually chromosomes), second list contains 2 elements refering to Y | X and X | Y models. Finally the last 2 lists contain data frames with simulated interactions.
1 2 3 4 5 6 7 8 | # first prepare HiCglm object
expected <- simulate_null(hicglm, dpools = 1:10)
observed <- lapply(hicglm$model[["18"]][as.character(1:10)], function(x) x$data)
observed <- do.call("rbind", observed)[c("val.x", "val.y", "dpool")]
# plot results: expected vs observed
ggplot(all.data, aes(x = val.x, y = val.y, color = type)) +
geom_point(size = 0.3, alpha = 0.7) +
facet_wrap(~ dpool, scales = "free", ncol = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.