Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 gene

geneStart: gene start

geneEnd: gene end

geneLength: gene length

geneStrand: gene strand

geneId: entrezgene ID

distanceToTSS: distance from peak to gene TSS

if annoDb is provided, extra column will be included:

ENSEMBL: ensembl ID of the nearest gene

SYMBOL: gene symbol

GENENAME: full gene name

Author(s)

G Yu

See Also

Examples

## 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)

ChIPseeker

ChIPseeker for ChIP peak Annotation, Comparison, and Visualization

v1.26.2
Artistic-2.0
Authors
Guangchuang Yu [aut, cre] (<https://orcid.org/0000-0002-6485-8781>), Yun Yan [ctb], Hervé Pagès [ctb], Michael Kluge [ctb], Thomas Schwarzl [ctb], Zhougeng Xu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.