ChIPseeker (version 1.8.6)

annotatePeak: annotatePeak

Description

Annotate peaks

Usage

annotatePeak(peak, tssRegion = c(-3000, 3000), TxDb = NULL, level = "transcript", assignGenomicAnnotation = TRUE, genomicAnnotationPriority = c("Promoter", "5UTR", "3UTR", "Exon", "Intron", "Downstream", "Intergenic"), annoDb = NULL, addFlankGeneInfo = FALSE, flankDistance = 5000, sameStrand = FALSE, ignoreOverlap = FALSE, ignoreUpstream = FALSE, ignoreDownstream = FALSE, overlap = "TSS", verbose = TRUE)

Arguments

peak
peak file or GRanges object
tssRegion
Region Range of TSS
TxDb
TxDb object
level
one of transcript and gene
assignGenomicAnnotation
logical, assign peak genomic annotation or not
genomicAnnotationPriority
genomic annotation priority
annoDb
annotation package
addFlankGeneInfo
logical, add flanking gene information from the peaks
flankDistance
distance of flanking sequence
sameStrand
logical, whether find nearest/overlap gene in the same strand
ignoreOverlap
logical, whether ignore overlap of TSS with peak
ignoreUpstream
logical, if True only annotate gene at the 3' of the peak.
ignoreDownstream
logical, if True only annotate gene at the 5' of the peak.
overlap
one of 'TSS' or 'all', if overlap="all", then gene overlap with peak will be reported as nearest gene, no matter the overlap is at TSS region or not.
verbose
print message or not

Value

data.frame or GRanges object with columns of:all columns provided by input.annotation: genomic feature of the peak, for instance if the peak is located in 5'UTR, it will annotated by 5'UTR. Possible annotation is Promoter-TSS, Exon, 5' UTR, 3' UTR, Intron, and Intergenic.geneChr: Chromosome of the nearest genegeneStart: gene startgeneEnd: gene endgeneLength: gene lengthgeneStrand: gene strandgeneId: entrezgene IDdistanceToTSS: distance from peak to gene TSSif annoDb is provided, extra column will be included:ENSEMBL: ensembl ID of the nearest geneSYMBOL: gene symbolGENENAME: full gene name

See Also

plotAnnoBar plotAnnoPie plotDistToTSS

Examples

Run this code
## Not run: 
# require(TxDb.Hsapiens.UCSC.hg19.knownGene)
# txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
# peakfile <- system.file("extdata", "sample_peaks.txt", package="ChIPseeker")
# peakAnno <- annotatePeak(peakfile, tssRegion=c(-3000, 3000), TxDb=txdb)
# peakAnno
# ## End(Not run)

Run the code above in your browser using DataLab