cooler2sparse: Transform a .cool file to a sparse upper triangular matrix...

Description Usage Arguments Details Value Examples

View source: R/matrix_transformations.R

Description

Transform a .cool file to a sparse upper triangular matrix for input into hic_loess

Usage

1

Arguments

cooler

The plain text file from a .cool file loaded into an R data.frame object. See vignette for more details.

Details

The .cool format is linked a database of Hi-C experiments and allows access to many sets of Hi-C data which can be found at the Index of Coolers ftp://cooler.csail.mit.edu/coolers. Once a .cool file is dumped into a contact matrix in plain text it can be read into R. This function provides a method for converting the .cool matrix into a sparse upper triangular matrix ready to be entered into hic_loess.

Value

A Sparse upper triangular matrix or a list of sparse upper triangular matrices. If the .cool file contains data for more than one chromosome The function will split the data up into a list of matrices, one per chromosome.

Examples

1
2
3
data('cooler')
sparse <- cooler2sparse(cooler)
head(sparse)

dozmorovlab/HiCdiff documentation built on May 20, 2019, 11:13 a.m.