Brick_get_matrix {HiCBricks} | R Documentation

## Return a matrix subset.

### Description

`Brick_get_matrix` will fetch a matrix subset between row values ranging from min(x.vector) to max(x.vector) and column values ranging from min(x.vector) to max(x.vector)

### Usage

    Brick_get_matrix(Brick, chr1, chr2, x.vector, y.vector, force = FALSE,
        FUN = NULL)

### Arguments

`Brick` | Required. A string specifying the path to the Brick store created with CreateBrick.
`chr1` | Required. A character vector of length 1 specifying the chromosome corresponding to the rows of the matrix
`chr2` | Required. A character vector of length 1 specifying the chromosome corresponding to the columns of the matrix
`x.vector` | Required. A one-dimensional numeric vector specifying the rows to subset.
`y.vector` | Required. A one-dimensional numeric vector specifying the columns to subset.
`force` | Optional. Default FALSE If true, will force the retrieval operation when matrix contains loaded data until a certain distance.
`FUN` | Optional. If provided a data transformation with FUN will be applied before the matrix is returned.

### Value

Returns a matrix of dimension x.vector length by y.vector length. This may differ based on the operations with FUN.

### See Also

`Brick_get_matrix_within_coords` to get matrix by using matrix genomic coordinates, `Brick_get_values_by_distance` to get values separated at a certain distance, `Brick_fetch_row_vector` to getvalues in a certain row/col and subset them, `Brick_get_vector_values` to get values using matrix coordinates.

### Examples

    Brick.file <- system.file("extdata", "test.hdf", package = "HiCBricks")
    Brick_get_matrix(Brick = Brick.file, chr1 = "chr19", chr2 = "chr19",
    x.vector = c(1:10), y.vector = c(1:10))

[Package HiCBricks version 1.2.0 Index]