htrain: Train the smoothing parameter (neighborhood size).

Description Usage Arguments Details Value References Examples

View source: R/htrain.R

Description

Train the smoothing parameter (neighborhood size).

Usage

1
htrain(R1, R2, resol, lbr = 0, ubr = 5e+06, range = 0:10)

Arguments

R1

A Hi-C intra-chromosome matrix.

R2

The other intra-chromosome matrix to compare with.

resol

An integer indicating the resolution of the Hi-C matrix.

lbr

An integer indicating the minumum distance of interaction that is considered. Default is 0.

ubr

An integer indicating the maximum distance of interaction that is considered. Defalt is 5000000.

range

A vector of consecutive integers from which the optimal smoothing parameter is searched, starting from zero (i.g., 0:10).

Details

A fraction (10%) of data are first randomly sampled, then the scc for the sampled data is computed at a series of smoothing parameterts in the ascending order. The samllest h at which the increment of scc is less than 0.01 is saved. This procedure is repeat 10 times, and the mode of the 10 h's is outputed as the estimated optimal neighborhood size.

Value

a integer estimated to be the optimal smoothing parameter.

References

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

Examples

1
2
3
data(HiCR1)
data(HiCR2)
h_hat <- htrain(HiCR1, HiCR2, 1000000, 0, 5000000, 0:2)

MonkeyLB/hicrep documentation built on Dec. 15, 2020, 12:47 a.m.