depth.adj {hicrep}R Documentation

Sequencing depth adjustment

Description

Sequencing depth could be a confounding effect when measuring the reproducibility. This function will adjust sequencing depth of a given matrix to a specified total number of reads through random sampling.

Usage

depth.adj(d, size, resol, out = 0)

Arguments

d

a Hi-C matrix needed to be adjusted.

size

the size the total number one wants to adjust to.

resol

the resolution of the input matrix.

out

either 0 or 1. If it is 0, the function returns matrix format; if 1, it returns vection format.

Value

a matrix or vec which has the adjusted total number of reads.

References

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.

Examples

data(HiCR1)
#total number of reads
sum(HiCR1[,-c(1:3)])

#Adjust it to 200000 reads, output Hi-C matrix
HiC_R1_200k = depth.adj(HiCR1, 200000, 1000000, out = 0)
#check total number of reads after adjustment
sum(HiC_R1_200k[,-c(1:3)])

#output vector
HiC_R1_200k = depth.adj(HiCR1, 200000, 1000000, out = 1)
#check total number of reads after adjustment
sum(HiC_R1_200k[,3])

[Package hicrep version 1.6.0 Index]