Brick_fetch_range_index {HiCBricks} | R Documentation

## Returns the position of the supplied ranges in the binning table associated to the Hi-C experiment.

### Description

`Brick_fetch_range_index` constructs a ranges object using `Brick_make_ranges`, creates an overlap operation using `GenomicRanges::findOverlaps`, where the constructed ranges is the subject and the Hi-C experiment associated binning table is the query. The return of this object is a list of ranges with their corresponding indices in the binning table.

### Usage

    Brick_fetch_range_index(Brick = NULL, chr = NULL, start = NULL,
        end = NULL, names = NULL, type = "any")

### Arguments

`Brick` | Required. A string specifying the path to the Brick store created with CreateBrick.
`chr` | Required. A character vector of length N specifying the chromosomes to select from the ranges.
`start` | Required. A numeric vector of length N specifying the start positions in the chromosome
`end` | Required. A numeric vector of length N specifying the end positions in the chromosome
`names` | Optional. A character vector of length N specifying the names of the chromosomes. If absent, names will take the form chr:start:end.
`type` | Optional. Default any Type of overlap operation to do. It should be one of two, any or within. any considers any overlap (atleast 1 bp) between the provided ranges and the binning table.

### Value

Returns a GenomicRanges object of same length as the chr, start, end vectors provided. The object is returned with an additional column, Indexes. Indexes is a column of class `IRanges::IntegerList`, which is part of the larger `IRanges::AtomicList` superset. This "Indexes" column can be accessed like a normal GRanges column with the additional list accessor [[]] in place of the normal vector accessor [].

### Examples

    Chrom <- c("chr19","chr19")
    Start <- c(1,40000)
    End <- c(1000000,2000000)
    Brick.file <- system.file("extdata", "test.hdf", package = "HiCBricks")
    Test_Run <- Brick_fetch_range_index(Brick = Brick.file, chr = Chrom,
    start = Start, end = End)
    Test_Run$Indexes[[1]]

[Package HiCBricks version 1.0.0 Index]