View source: R/matrix_transformations.R
cooler2sparse | R Documentation |
Transform a .cool file to a sparse upper triangular matrix for input into hic_loess
cooler2sparse(cooler)
cooler |
The plain text file from a .cool file loaded into an R data.frame object. See vignette for more 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.
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.
data('cooler')
sparse <- cooler2sparse(cooler)
head(sparse)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.