getHiCMatrix: Grab a specific sparse Hi-C matrix

Description Usage Arguments Value Examples

Description

getHiCMatrix takes a sparseHiCdatum object and returns a single matrix. Thus, the length of chr and res must be 1

Usage

1
2
3
4
5
6
7
getHiCMatrix(obj, chr, res, sampleName)

## S4 method for signature 'sparseHiCdatum'
getHiCMatrix(obj, chr, res, sampleName)

## S4 method for signature 'sparseHiCdata'
getHiCMatrix(obj, chr, res, sampleName)

Arguments

obj

A sparseHiCdatum object

chr

Chromosome desired

res

Resolution desired

sampleName

When accessing a matrix with multiple samples in the object

Value

Returns a Hi-C Matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
chr <- "chr21"
res <- "1000000"

#Single sample
rds<-paste(system.file('rds',package='sparseHiC'),'hESCdatum1.rds',sep='/')
hESCdatum1 <- readRDS(rds)
r <- getHiCMatrix(hESCdatum1,chr = chr, res = res) 

rdsA<-paste(system.file('rds',package='sparseHiC'),'hESCdata.rds',sep='/')
hESCdata <- readRDS(rdsA)
getHiCMatrix(hESCdata, chr = chr, res = res, sampleName = "hESC2") 

aryeelab/sparseHiC documentation built on May 12, 2019, 3:43 a.m.