Description Usage Arguments Value Examples
Compartment vector indices correspond to bins along chromosome.
1 | pc2mtx(pc, sparse.mtx)
|
pc |
numeric, compartment vector or principal component (eigenvector) |
sparse.mtx |
data.frame, matrix in sparse format containg manadatory fields i and j |
data.frame - contact map in sparse format with additional columns for every row (dense matrix cell): compartment.i, compartment.j, compartment
1 2 3 4 5 6 | # make artificial eigenvector --> its length is 12 so it represents artificial chromosome with 12 bins
pc <- c(-0.3,-0.5,0.2,0.3,0.4,0.4,-0.5,0.2,0.1,0.3,-0.9,-0.7)
# make artificial sparse contact map
sparse.mtx <- data.frame(i = c(1,3,5,7,8,9,11), j = c(7,2,1,1,3,10,9), val = c(10,8,3,1,1,2,20))
print(sparse.mtx)
pc2mtx(pc, sparse.mtx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.