HiCdata2matrix: Creates a HiC matrix from a file (Rao et al., 2014)

View source: R/BiofeatureGraphics.R

HiCdata2matrixR Documentation

Creates a HiC matrix from a file (Rao et al., 2014)

Description

Creates a HiC matrix from Rao et al.,2014.

Usage

HiCdata2matrix( chr, start, end, bedFilePath)

Arguments

chr

The chromosome of interest

start

The starting position in the region of interest (the smallest value)

end

The end position in the region of interest (the largest value)

bedFilePath

The path of the BED file from Kheradpour and Kellis, 2014.

Value

An AnnotationTrack object of Gviz

Author(s)

Tiphaine Martin

References

http://bioconductor.org/packages/release/bioc/html/Gviz.html

Got to BindingMotifsBiomart binding motif biomart

Examples

library("corrplot")
gen <- "hg19"
chr<-"chr1"
start <- 5000000
end <- 9000000

extdata <- system.file("extdata", package="coMET",mustWork=TRUE)
bedFilePath <- file.path(extdata, "HiC/chr1_1mb.RAWobserved")

if(interactive()){
  matrix_HiC_Rao <- HiCdata2matrix(chr,start, end, bedFilePath)
cor_matrix_HiC <- cor(matrix_HiC_Rao)
diag(cor_matrix_HiC)<-1
corrplot(cor_matrix_HiC, method = "circle")
} else {
  data(matrix_HiC_Rao)
  cor_matrix_HiC <- cor(matrix_HiC_Rao)
diag(cor_matrix_HiC)<-1
corrplot(cor_matrix_HiC, method = "circle")
}


TiphaineCMartin/coMET documentation built on April 27, 2022, 6:45 a.m.