add.noise: Add Noise to a Symmetric Association Matrix

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/hbm.R

Description

add.noise adds noise to a symmetric association matrix, typically a chromatin contact map.

Usage

1

Arguments

m

a symmetric numeric association matrix, typically a chromatin contact map.

...

additional parameters for jitter.

Value

add.noise returns a matrix of the same dimension as m but with noise added (see additional parameters for setting noise amount in jitter).

Author(s)

Yoli Shavit

References

hbm's website: http://www.cl.cam.ac.uk/~ys388/hbm/

See Also

hbm.features to see how add.noise is used to estimate feature robustness in hierarchical block matrices
hbm to learn how to build hierarchical block matrices
hbm's tutorials at http://www.cl.cam.ac.uk/~ys388/hbm/

Examples

1
2
3
4
5
6
7
set.seed(2)
n = 200 # chain size
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)))
# add noise 
control.noisy = add.noise(control, factor = 5)

hbm documentation built on May 1, 2019, 6:32 p.m.