pc2mtx: Matches compartment with entries of contact map given in...

Description Usage Arguments Value Examples

Description

Compartment vector indices correspond to bins along chromosome.

Usage

1
pc2mtx(pc, sparse.mtx)

Arguments

pc

numeric, compartment vector or principal component (eigenvector)

sparse.mtx

data.frame, matrix in sparse format containg manadatory fields i and j

Value

data.frame - contact map in sparse format with additional columns for every row (dense matrix cell): compartment.i, compartment.j, compartment

Examples

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)

rz6/CopulaHiC documentation built on Dec. 31, 2019, 9:19 a.m.