chipcompare: chipcompare.

Description Usage Format Value Constructor Methods Examples

Description

chipcompare.

This class allows to produce an overlap matrix of multiple genomic regions and it's visual representation in the heatmap format. For each pairs of regions, this object will calculate the percentage of overlapping regions.

Usage

1

Format

An overlap calculator

Value

chipcompare$new returns a chipcompare object that contains the GRangesList object(s) used to produce the overlap matrix and the overlap matrix.

Constructor

cc <- chipcompare$new(grl1, grl2 = NULL, heatmap=TRUE, index = TRUE, ...)

grl1:

A GRangesList object.

grl2:

A GRangesList object. If value is NULL, all the regions in grl1 will be compared against themselves. Default: NULL.

heatmap:

Print heatmap. Default: TRUE

cores:

Number of cores for parallel processing. Default: 1

FUN:

The function to compute the scores. Must take 2 GRanges as input and return a numeric as output.

index:

Index GRanges with the GNCList function? Default: TRUE.

...:

Extra options to pass to FUN.

Methods

m <- cc$get_matrix()

cc$print(...)

...:

Extra options to pass to heatmap.2 function.

pval <- cc$pvalue(baseline, sample_count = 1000)

baseline:

A GRanges object to use as backgroud.

sample_count:

The number of draw to use for bootstrap.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Prepare the GRangesList object
 gr1 <- GRanges("chr1", IRanges(c(1,100),c(10,110)))
 gr2 <- GRanges("chr1", IRanges(c(2,200),c(8,210)))
 gr3 <- GRanges(c("chr1", "chr2"), IRanges(c(1,100),c(10,110)))
 gr4 <- GRanges("chr3", IRanges(1,1000))
 grl <- GRangesList(gr1, gr2, gr3, gr4)

 # Create a chipcompare object
 cc <- chipcompare$new(grl, heatmap = FALSE)

 # Extract the overlap matrix
 m <- cc$get_matrix()
 mg <- metagene$new(regions, bam_files)

 # Draw a heatmap
 ## Not run: cc$print()
 ## Not run: cc

 # Calculate p-values. In this case we would need a GRanges object that
 # represent baseline values. For example, it could be a list of every
 # regions that were detected in the current cell line with other ChIP-Seq
 # experiments.
 ## Not run: pval <- cc$pvalue(baseline)

CharlesJB/chipcompare documentation built on May 6, 2019, 9:58 a.m.