Brick_return_region_position {HiCBricks} | R Documentation

## Provides the overlapping position (within) from the bintable.

### Description

`Brick_return_region_position` takes as input a human-readable coordinate format of the form chr:start:end and outputs the overlapping bintable positions. This module does a "within" operation. So only bins which overlap completely with the region will be returned. This is not an iterable module, so the user has to make iterative calls to the module itself.

### Usage

    Brick_return_region_position(Brick, region)

### Arguments

`Brick` | Required. A string specifying the path to the Brick store created with CreateBrick.
`region` | Required. A character vector of length 1 specifying the region to overlap. It must take the form chr:start:end.

### Value

Returns a 1 dimensional vector containing the position of the overlapping regions in the bintable associated the Brick store.

### Design choice

This may seem to be a poor design choice at first glance, but I do not think this to be the case. By not being iterable, this function circumvents the problem of how to structure the data for the user. If one more element was accepted, the return object would have become a list, which increases the data structure complexity significantly for users who are just starting out with R. Therefore this problem is left for the users themselves to deal with.

### Examples

    Coordinate <- "chr19:1:1000000"
    Brick.file <- system.file("extdata", "test.hdf", package = "HiCBricks")
    Test_Run <- Brick_return_region_position(Brick = Brick.file,
    region = Coordinate)

    ## Not run:

    Coordinate <- c("chr19:1:1000000","chr19:40000:2000000")
    Brick.file <- system.file("extdata", "test.hdf", package = "HiCBricks")
    Test_Run <- Brick_return_region_position(Brick = Brick.file,
    region = Coordinate)

    This will generate an error because the module itself expects as input a
    vector of length 1.

    ## End(Not run)

[Package HiCBricks version 1.2.0 Index]