smoothMat {hicrep} | R Documentation |
smooth the Hi-C matrix with mean filter
smoothMat(dat, h)
dat |
A N*N Hi-C intra-chromosome matrix. |
h |
The neighborhood size parameter. It is the distance of smoothing target bin to the boundary of the neighborhood in the unit of resolution. |
Given a Hi-C N*N matrix, the algorithm scans through each data points (i, j), idnetifies points within its neighborhood of size h (max distance to (i, j) is h*resolution), and calculates the mean. The mean is subsequently used as the smoothed value of the point (i, j).
a smoothed (or not when resol = 0), zero-filtered and vectorized Hi-C data.
HiCRep: assessing the reproducibility of Hi-C data using a stratum-adjusted correlation coefficient. Tao Yang, Feipeng Zhang, Galip Gurkan Yardimci, Ross C Hardison, William Stafford Noble, Feng Yue, Qunhua Li. bioRxiv 101386; doi: https://doi.org/10.1101/101386.
data(HiCR1) #re-format the row and column names resol <- 1000000 ref_Rep1 <- HiCR1[,-c(1,2,3)] rownames(ref_Rep1) = colnames(ref_Rep1) = HiCR1[,3]-resol/2 smt_HiC_R1 <- smoothMat(ref_Rep1, 1) dim(smt_HiC_R1) smt_HiC_R1[1:5,1:5]