countTable: Counting reads in features

Description Usage Arguments Value Author(s) Examples

View source: R/countTable.R

Description

Counting reads in giving features.

Usage

1
2
countTable(features, bamfiles, colData, samples = bamfiles,
  windowSize = 200L, mode = IntersectionNotStrict, ...)

Arguments

features

an object of GRanges

bamfiles

filenames of aligned reads

colData

a DataFrame or data.frame with at least a single column. Rows of colData correspond to bamfiles

samples

names of samples, could be same length with bamfiles

windowSize

the size of windows for counts

mode

mode of counts. See summarizeOverlaps for details. Default is IntersectionNotStrict.

...

parameters could be passed to summarizeOverlaps

Value

a list of RangedSummarizedExperiment

Author(s)

Jianhong Ou

Examples

1
2
3
4
5
6
path <- system.file("extdata", package = "diffPeaks", mustWork = TRUE)
bamfiles <- dir(path, "bam$")
peaks <- dir(path, "bed$")
p <- mergePeaks(file.path(path, peaks))
colData <- DataFrame(samples=bamfiles, condition=sub(".rep..bam", "", bamfiles))
cnt <- countTable(p, file.path(path, bamfiles), colData)

jianhong/diffPeaks documentation built on May 22, 2019, 12:37 p.m.