extractRegion {HiTC} | R Documentation

## Extract a subset of the HTCexp object

### Description

Extract a subset of the `HTCexp` object based on genomic ranges

### Usage

    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

    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)

[Package HiTC version 1.34.0 Index]