binOverGene: coverage of gene body

Description Usage Arguments Author(s) See Also Examples

View source: R/binOverGene.R

Description

calculate the coverage of gene body per gene per bin.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
binOverGene(
  cvglists,
  TxDb,
  upstream.cutoff = 0L,
  downstream.cutoff = upstream.cutoff,
  nbinsGene = 100L,
  nbinsUpstream = 20L,
  nbinsDownstream = nbinsUpstream,
  includeIntron = FALSE,
  minGeneLen = nbinsGene,
  maxGeneLen = Inf
)

Arguments

cvglists

A list of SimpleRleList or RleList. It represents the coverage for samples.

TxDb

An object of TxDb. It is used for extracting the annotations.

upstream.cutoff, downstream.cutoff

cutoff length for upstream or downstream of transcript.

nbinsGene, nbinsUpstream, nbinsDownstream

The number of bins for gene, upstream and downstream.

includeIntron

A logical value which indicates including intron or not.

minGeneLen, maxGeneLen

minimal or maximal length of gene.

Author(s)

Jianhong Ou

See Also

binOverRegions, plotBinOverRegions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
if(Sys.getenv("USER")=="jianhongou"){
path <- system.file("extdata", package="ChIPpeakAnno")
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(rtracklayer)
files <- dir(path, "bigWig")
if(.Platform$OS.type != "windows"){
cvglists <- lapply(file.path(path, files), import,
                   format="BigWig", as="RleList")
names(cvglists) <- sub(".bigWig", "", files)
d <- binOverGene(cvglists, TxDb.Hsapiens.UCSC.hg19.knownGene)
plotBinOverRegions(d)
}
}

LihuaJulieZhu/ChIPpeakAnno documentation built on Aug. 5, 2020, 12:02 a.m.