Description Usage Arguments Details Value Author(s) References See Also Examples
hbm.features
computes the main features of a hierarchical block matrix.
1 | hbm.features(m, noise.factor, ncores = 1, ref = NULL, ...)
|
m |
a numeric association matrix, typically a chromatin contact map. |
noise.factor |
numeric vector giving the noise factor to add with |
ncores |
integer giving the number of cores to register and use. If this is larger than one, iterations will be executed in parallel. |
ref |
hierarchical block matrix computed with |
... |
additional parameters for |
hbm.features
adds noise to the given association matrix and executes hbm
to generate a hierarchical block matrix. Repeating this for multiple iterations (with the same or different noise factor values) gives a mean hierarchical block matrix that can be compared with the matrix computed from the non noisy association matrix.
hbm.features
returns a list with the following objects:
noisy.hm |
The average hierarchical block matrix. A numeric matrix whose i,j-th entry gives the mean scale at which i and j were found in the same cluster across |
features |
|
Yoli Shavit
hbm
's website: http://www.cl.cam.ac.uk/~ys388/hbm/
add.noise
to see how noise is added to matrices
hbm
to learn how to build hierarchical block matrices
hbm
's tutorials at http://www.cl.cam.ac.uk/~ys388/hbm/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | set.seed(2)
n = 100 # chain size
# generate chain configuration (random walk/giant loop model)
conf = generate.random.conf(n, sd = 0.5, scale = FALSE)
# generate a contact map -like matrix using the model c ~ exp(-d)
control = exp(-1*as.matrix(dist(conf)))
noise = rep(10, 10)
res = hbm.features(control, noise, prune = TRUE, pruning.prob = 0.01)
m = res$features
image(t(m)[,nrow(m):1], axes = FALSE)
ats = seq(0,1,0.2)
lbls = as.character(n*ats)
axis(1, at= ats, labels = lbls, cex.axis = 0.8)
ats = seq(1,0,-1*0.2)
lbls = as.character(n*seq(0,1,0.2))
axis(2, at= ats, labels = lbls, cex.axis = 0.8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.