binOverRegions: coverage of chromosome regions

Description Usage Arguments Author(s) See Also Examples

View source: R/binOverRegions.R

Description

calculate the coverage of 5'UTR, CDS and 3'UTR per transcript per bin.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
binOverRegions(
  cvglists,
  TxDb,
  upstream.cutoff = 1000L,
  downstream.cutoff = upstream.cutoff,
  nbinsCDS = 100L,
  nbinsUTR = 20L,
  nbinsUpstream = 20L,
  nbinsDownstream = nbinsUpstream,
  includeIntron = FALSE,
  minCDSLen = nbinsCDS,
  minUTRLen = nbinsUTR,
  maxCDSLen = Inf,
  maxUTRLen = 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.

nbinsCDS, nbinsUTR, nbinsUpstream, nbinsDownstream

The number of bins for CDS, UTR, upstream and downstream.

includeIntron

A logical value which indicates including intron or not.

minCDSLen, minUTRLen

minimal length of CDS or UTR of transcript.

maxCDSLen, maxUTRLen

maximal length of CDS or UTR of transctipt.

Author(s)

Jianhong Ou

See Also

binOverGene, 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 <- binOverRegions(cvglists, TxDb.Hsapiens.UCSC.hg19.knownGene)
plotBinOverRegions(d)
}
}

ChIPpeakAnno documentation built on April 1, 2021, 6:01 p.m.