maxGap-method: Estimated max gaps

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Compute an estimated max gap information, which could be used as max.gap argument in shringkageFun.

Usage

1
2
## S4 method for signature 'GenomicRanges'
maxGap(obj, ratio = 0.0025)

Arguments

obj

GenomicRanges object

ratio

Multiple by the range of the provided gaps as the max gap.

Details

This function tries to estimate an appropriate max gap to be used for creating a shrinkage function.

Value

A numeric value

Author(s)

Tengfei Yin

See Also

shrinkageFun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(GenomicRanges)
gr1 <- GRanges("chr1", IRanges(start = c(100, 300, 600),
end = c(200, 400, 800)))
gr2 <- GRanges("chr1", IRanges(start = c(100, 350, 550),
end = c(220, 500, 900)))
gaps.gr <- intersect(gaps(gr1, start = min(start(gr1))),
gaps(gr2, start = min(start(gr2))))
shrink.fun <- shrinkageFun(gaps.gr, max.gap = maxGap(gaps.gr))
shrink.fun(gr1)
shrink.fun(gr2)

biovizBase documentation built on Nov. 8, 2020, 8:01 p.m.