percentOverlaps: Overlap genomic regions

Description Usage Arguments Details Value Author(s) Examples

View source: R/genomic_region_annotation.R

Description

Overlap genomic regions

Usage

1
percentOverlaps(query, subject, ignore_strand = TRUE, ...)

Arguments

query

a GRanges object

subject

a GRanges object

ignore_strand

wether ignore strands

...

pass to findOverlaps

Details

For every interval in query, it calculates the percent that is covered by subject.

Be careful with strand in your GRanges object!

Value

A numeric vector which has the same length as query.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

1
2
3
4
gr1 = GRanges(seqname = "chr1", ranges = IRanges(start = c(4, 10), end = c(6, 16)))
gr2 = GRanges(seqname = "chr1", ranges = IRanges(start = c(7, 13), end = c(8, 20)))
percentOverlaps(gr1, gr2)
percentOverlaps(gr2, gr1)

jokergoo/epik documentation built on Sept. 28, 2019, 9:20 a.m.