Hi Guangchuang,

Is there a way to control annotations in the the annotatePeak function? For instance I would like to ignore “downstream” and consider those peaks “intergenic”. Or for instance combine “1st exon” with “other exon” so there is one category of “exon”.

Any help would be great, thanks for doing this!

-Andrew

https://support.bioconductor.org/p/104676/

> require(ChIPseeker)
Loading required package: ChIPseeker

ChIPseeker v1.16.0  For help: https://guangchuangyu.github.io/ChIPseeker

If you use ChIPseeker in published research, please cite:
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
> ff = getSampleFiles()[[4]]
> options(ChIPseeker.ignore_1st_exon = TRUE)
> options(ChIPseeker.ignore_1st_intron = TRUE)
> options(ChIPseeker.ignore_downstream = TRUE)
> options(ChIPseeker.ignore_promoter_subcategory = TRUE)
> x = annotatePeak(ff)
>> loading peak file...                 2018-01-09 11:36:33
>> preparing features information...         2018-01-09 11:36:33
>> identifying nearest features...         2018-01-09 11:36:34
>> calculating distance from peak to TSS...     2018-01-09 11:36:34
>> assigning genomic annotation...         2018-01-09 11:36:34
>> assigning chromosome lengths             2018-01-09 11:36:52
>> done...                     2018-01-09 11:36:52
Warning message:
In loadTxDb(TxDb) :
  >> TxDb is not specified, use 'TxDb.Hsapiens.UCSC.hg19.knownGene' by default...
> x
Annotated peaks generated by ChIPseeker
1331/1331  peaks were annotated
Genomic Annotation Summary:
     Feature  Frequency
1   Promoter 58.7528174
2     5' UTR  0.3005259
3     3' UTR  2.1036814
4       Exon  3.0052592
5     Intron  7.9639369
6 Intergenic 27.8737791

You can do it via options. Beware that annotatePeak always output detail annotations and such options only work for summarizing the result and visualization.