CreateBrick_from_mcool {HiCBricks} | R Documentation

## Create the entire HDF5 structure and load the bintable from a mcool file

### Description

`CreateBrick_from_mcool` is a wrapper on CreateBrick which creates the Brick data structure from an mcool file.

### Usage

    CreateBrick_from_mcool(Brick, mcool, binsize = NULL, chrs = NULL,
        remove.existing = FALSE)

### Arguments

`Brick` | Required. A string specifying the path to the Brick store created with CreateBrick.
`mcool` | Required. Path to an mcool file.
`binsize` | Optional. The binsize to select from an mcool file.
`chrs` | Optional. If provided will only create a Brick for these chromosomes (both cis & trans).
`remove.existing` | Optional. Default FALSE. If TRUE, will remove the HDF file with the same name and create a new one. By default, it will not replace existing files.

### Details

mcool are a standard 4D nucleome data structure for Hi-C data. Read more about the 4D nucleome project here.

### Value

This function will generate the target Brick file. Upon completion, the function will provide the path to the created/tracked HDF file.

### See Also

`Brick_load_data_from_mcool` to load data from the mcool to a Brick store.

### Examples

    ## Not run:
    require(curl)
    curl_download(url = paste("https://data.4dnucleome.org/"
    "files-processed/4DNFI7JNCNFB/"
    "@download/4DNFI7JNCNFB.mcool",sep = ""),
    destfile = file.path(temp.dir(),"H1-hESC-HiC-4DNFI7JNCNFB.mcool"))

    Output.brick <- file.path(tempdir(),
    "H1-hESC-HiC-4DNFI7JNCNFB-10000-ICE-normalised-chr1.brick")
    mcool <- file.path(temp.dir(),"H1-hESC-HiC-4DNFI7JNCNFB.mcool")

    CreateBrick_from_mcool(Brick = Output.brick,
    mcool = mcool,
    binsize = 10000,
    chrs = "chr1")

    ## End(Not run)

[Package HiCBricks version 1.2.0 Index]