Brick_rangekey_exists: Check to see if the Brick contains a ranges with a certain...

View source: R/Brick_functions.R

Brick_rangekey_existsR Documentation

Check to see if the Brick contains a ranges with a certain name.

Description

Brick_rangekey_exists checks for the presence of a particular ranges with a certain name.

Usage

Brick_rangekey_exists(
    Brick,
    rangekey,
    resolution = NA,
    all_resolutions = FALSE
)

Arguments

Brick

Required. A string specifying the path to the Brick store created with Create_many_Brick.

rangekey

Required. A string specifying the name of the ranges to check for.

resolution

Optional. Default NA When an object of class BrickContainer is provided, resolution defines the resolution on which the function is executed

all_resolutions

Optional. Default FALSE If resolution is not defined and all_resolutions is TRUE, the resolution parameter will be ignored and the function is executed on all files listed in the Brick container

Value

A logical vector of length 1 with either TRUE or FALSE values.

Examples


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

out_dir <- file.path(tempdir(), "list_rangekeys_exists_test")

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)
Brick_rangekey_exists(Brick = My_BrickContainer, rangekey = "Bintable",
resolution = 100000)


koustav-pal/HiCLegos documentation built on Nov. 5, 2022, 5:49 p.m.