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, max, range)

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.

max

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

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: 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

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

Example output

smoothing:0
smoothing:1

hicrep documentation built on April 28, 2020, 7:51 p.m.