extractRegion: Extract a subset of the HTCexp object

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

View source: R/HTCexp-class.R

Description

Extract a subset of the HTCexp object based on genomic ranges

Usage

1
extractRegion(x, MARGIN, chr, from, to, exact=FALSE)

Arguments

x

object that inherits from class HTCexp

MARGIN

a vector giving the subscripts which the function will be applied over as in 'apply' function. E.g., '1' for the 'x' intervals, and '2' for the 'y' intervals, 'c(1, 2)' indicates 'x' and 'y' intervals.

chr

character; the chromosome of the genomic region

from

numeric; start of the genomic region

to

numeric; end of the genomic region

exact

logical; exact genomic region

Details

By default, only the intervals fully included in the genomic ranges are returned. If exact is true, the overlapping intervals are also used, and forced to start/end at the specified position. If no intervals are overlapping, an interval with NA values is added.

Value

A HTCexp object

Author(s)

N. Servant

See Also

GRanges-class

Examples

1
2
3
4
5
data(Nora_5C)

## Focus on the genomic region chrX:98000000-100000000
E14sub<-extractRegion(E14$chrXchrX, c(1,2), chr="chrX", from=98000000, to=100000000)
show(E14sub)

HiTC documentation built on Nov. 8, 2020, 8:27 p.m.