Description Usage Arguments Value References Examples
converting 3-column contact matrix to squared HiC matrix
1 | bed2mat(bed, resol = "NONE")
|
bed |
the 3-column contact matrix; first and second columns are genome coordinates or bin index. |
resol |
resolution in base pair unit. Set it to "NONE" if the first two columns are bin indices. |
a squared HiC matrix that can be recongnized by get.scc.
HiCRep: assessing the reproducibility of Hi-C data using a stratum-adjusted correlation coefficient. Tao Yang, Feipeng Zhang, Galip Gurkan Yardimci, Fan Song, Ross C Hardison, William Stafford Noble, Feng Yue, Qunhua Li. Genome Research 2017. doi: 10.1101/gr.220640.117
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # making up an example
nbin = 50
bed <- matrix(0, nbin^2, 3)
bed[,1] = rep(seq_len(nbin), nbin)
bed[,2] = rep(seq_len(nbin), each = nbin)
bed[,3] = sample(1:10000, nbin^2,replace = TRUE)
mat <- bed2mat(bed, resol = "NONE")
# assume "hic.coordinate.txt" is a 3-column contact matrix
# indexed by chromosome coordinates, and resolution = 4K base pair
## Not run:
bed <- read.delim(“hic.coordinate.txt”)
mat <- bed2mat(bed, resol = 40000) # resol specifies the bin size in base pair
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.