Brick_call_compartments {HiCBricks} | R Documentation

## Identify compartments in the Hi-C data

### Description

`Brick_call_compartments` identifies compartments in Hi-C data. Reference Lieberman-Aiden et al. 2009.

### Usage

    Brick_call_compartments(Brick, chr, resolution)

### Arguments

`Brick` | Required. A string specifying the path to the Brick store created with Create_many_Brick.
`chr` | Required. A string specifying the chromosome for the cis Hi-C matrix from which values will be retrieved at a certain distance.
`resolution` | Optional. Default NA When an object of class BrickContainer is provided, resolution defines the resolution on which the function is executed

### Value

A dataframe containing the chromosome genomic coordinates and the first three principal components.

### Examples

    Bintable.path <- system.file(file.path("extdata", "Bintable_100kb.bins"),
    package = "HiCBricks")

    out_dir <- file.path(tempdir(), "get_vector_val_test")
    if(!file.exists(out_dir)){
        dir.create(out_dir)
    }

    My_BrickContainer <- Create_many_Bricks(BinTable = Bintable.path,
        bin_delim = " ", output_directory = out_dir, file_prefix = "Test",
        experiment_name = "Vignette Test", resolution = 100000,
        remove_existing = TRUE)

    Matrix_file <- system.file(file.path("extdata",
    "Sexton2012_yaffetanay_CisTrans_100000_corrected_chr2L.txt.gz"),
    package = "HiCBricks")

    Brick_load_matrix(Brick = My_BrickContainer, chr1 = "chr2L",
    chr2 = "chr2L", matrix_file = Matrix_file, delim = " ",
    remove_prior = TRUE, resolution = 100000)

    Compartments_df <- Brick_call_compartments(Brick = My_BrickContainer,
    chr = "chr2L", resolution = 100000)

[Package HiCBricks version 1.10.0 Index]