generate.random.conf generates a random chain configuration following a random walk/giant loop model (Sachs et al., 1995).
generate.random.conf(n, k = 3, perturb = NULL, scale = T, mean = 0, sd = 1)perturb is set to NULL indicating no perturbation should not be applied.
TRUE by default.
generate.random.conf returns a n x k matrix, giving the coordinates of n beads (nodes) in a k-d space.
generate.random.conf aims to generate a chromosome-like chain of n beads (nodes), in a k-D Euclidean space (k=3 by default) that follows a random walk/giant loop model (Sachs et al., 1995). This is achieved by sampling the differences between successive beads' coordinates from a normal distribution $N(\mu, \sigma)$ ($\mu = 0$, $\sigma = 1$, by default), across each axis (see examples in Hu et al., 2013 and Shavit et al., 2014). The configuration is scaled by default so that the distance between the first and last beads is approximately one unit. generate.random.conf can also be used to generate configurations that deviate from the chain constraints by perturbing beads.
hbm's website: http://www.cl.cam.ac.uk/~ys388/hbm/
hbm to learn how to build a hierarchical block matrix from a contact map of a random configuration.
hbm's tutorials at http://www.cl.cam.ac.uk/~ys388/hbm/
set.seed(2)
n = 100
conf = generate.random.conf(n, k = 2)
plot(conf, xlab = "x", ylab = "y")
conf = generate.random.conf(n, k = 2, scale = FALSE)
plot(conf, xlab = "x", ylab = "y")
Run the code above in your browser using DataLab