callPeak: Call peaks

Description Usage Arguments Value Examples

View source: R/callPeak.R

Description

Calling peaks from bam files

Usage

1
2
3
4
callPeak(bamfile, index = bamfile, inputBam = NULL,
  inputIndex = inputBam, txdb, genome, upstream = 50000,
  downstream = 50000, ideaPeakWidth = 200, FDRfilter = 0.05,
  direction = c("over", "less"))

Arguments

bamfile

bam file name

index

index file name

inputBam

input bam file name

inputIndex

index file name for input

txdb

TxDb object

genome

BSgenome object

upstream

peak scan start position from upstream of gene

downstream

peak scan end position till downstream of gene

ideaPeakWidth

ideally peak width, eg, ATAC-seq: 200bp

FDRfilter

cut off value of FDR.

direction

over or less. In most case, default over is OK. In some cases, such as cohesion, less may be what you want to try.

Value

a GRanage object indicates the peaks.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
path <- system.file("extdata", package = "diffPeaks", mustWork = TRUE)
bamfiles <- dir(path, "bam$", full.names = TRUE)
bamfile <- bamfiles[1]
index <- bamfile
library(TxDb.Drerio.UCSC.danRer10.refGene)
txdb <- TxDb.Drerio.UCSC.danRer10.refGene
library(BSgenome.Drerio.UCSC.danRer10)
genome <- Drerio
upstream <- downstream <- 50000L
ideaPeakWidth <- 200
direction <- "over"
x <- callPeak(bamfile, txdb=txdb, genome=genome)

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