RPeakAnno {esATAC} | R Documentation

## Annotate ATAC-seq Peak

### Description

This function annotates ATAC-seq peak by a given annotation database. For more information, please see `annotatePeak`.

### Usage

    atacPeakAnno(
      atacProc,
      peakInput = NULL,
      tssRegion = c(-1000, 1000),
      TxDb = NULL,
      level = "transcript",
      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",
      annoOutput = NULL,
      ...
    )

    ## S4 method for signature 'ATACProc'
    atacPeakAnno(
      atacProc,
      peakInput = NULL,
      tssRegion = c(-1000, 1000),
      TxDb = NULL,
      level = "transcript",
      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",
      annoOutput = NULL,
      ...
    )

    peakanno(
      peakInput,
      tssRegion = c(-1000, 1000),
      TxDb = NULL,
      level = "transcript",
      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",
      annoOutput = NULL,
      ...
    )

### Arguments

`atacProc` | `ATACProc-class` object scalar. It has to be the return value of upstream process: `atacPeakCalling`.
`peakInput` | `Character` scalar. Input peak file path. UCSC bed file is recommented. Other file should be able to import as `GRanges` objects through `import`.
`tssRegion` | Region range of TSS, default:c(-1000, 1000).
`TxDb` | TxDb object, annotation database.
`level` | "transcript" or "gene".
`genomicAnnotationPriority` | genomic annotation priority.
`annoDb` | Gene annotation database.
`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.
`annoOutput` | `Character` scalar. the output file path.
`...` | Additional arguments, currently unused.

### Value

An invisible `ATACProc-class` object scalar for downstream analysis.

### Author(s)

Wei Zhang

### References

Guangchuang Yu, Li-Gen Wang, Qing-Yu He. ChIPseeker: an R/Bioconductor package for ChIP peak annotation, comparison and visualization. Bioinformatics 2015, 31(14):2382-2383

### See Also

`atacPeakCalling` `atacGOAnalysis`

### Examples

    library(R.utils)
    library(TxDb.Hsapiens.UCSC.hg19.knownGene)
    p1bz <- system.file("extdata", "Example_peak1.bed.bz2", package="esATAC")
    peak1_path <- as.vector(bunzip2(filename = p1bz,
    destname = file.path(getwd(), "Example_peak1.bed"),
    ext="bz2", FUN=bzfile, overwrite=TRUE, remove = FALSE))
    #peakanno(peakInput = peak1_path, TxDb = TxDb.Hsapiens.UCSC.hg19.knownGene,
    #annoDb = 'org.Hs.eg.db')

[Package esATAC version 1.14.0 Index]