Learn R Programming

hbm (version 1.0)

add.noise: Add Noise to a Symmetric Association Matrix

Description

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

Usage

add.noise(m, ...)

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).

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

Run this code
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)

Run the code above in your browser using DataLab