read.cool: Read .cool/.mcool sparse matrix into a GInteractions Object

Description Usage Arguments Value

View source: R/coolR.R

Description

This function reads a compressed sparse row (CSR) storage scheme for a matrix created by the cooler application (https://github.com/mirnylab/cooler) stored in a HDF5 data storage. This utility can read the matrix or only specfic region of the genome eihter from one pair or a pair of region. If using a multi-dimension dataset (ie .mcool), the resolution needed need to be specified.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
read.cool(
  file,
  res = NULL,
  chr1 = NULL,
  start1 = NULL,
  end1 = NULL,
  chr2 = NULL,
  start2 = NULL,
  end2 = NULL
)

Arguments

file

Path to a HDF5 stored cool (uni-dimension) or mcool (multi-dimension sparse matrix). If using a multi-dimesion, the resolution of one of the dimension need to be passed to res

res

'NULL' if using a uni-dimensional cool file or the resolution of one of layer in the mcool file

chr1

'NULL' or the chromosome name of the first pairs to return

start1

'NULL' or the start of a region within chr1 to return the pairs from. If chr1 is set and start1 is NULL this will be set to 1 by default

end1

'NULL' or the end of a region within chr1 to return the pairs from. If chr1 is set and end1 is NULL this will be set to the lenght of chr1 by default

chr2

'NULL' or the chromosome name of the first pairs to return

start2

'NULL' or the start of a region within chr2 to return the pairs from. If chr1 is set and start1 is NULL this will be set to 1 by default

end2

'NULL' or the end of a region within chr1 to return the pairs from. If chr2 is set and end1 is NULL this will be set to the lenght of chr2 by default

Value

A GInteraction object of the contact matrix dataset


dovetail-genomics/coolR documentation built on Oct. 7, 2020, 1:33 a.m.