查看原文
其他

CS番外4:自定义注释分类

Y叔叔 biobabble 2020-02-07

上面是最近邮件的提问,而这个问题在Bioconductor上最有人问过, https://support.bioconductor.org/p/104676/

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

所以呢在发行版中,早已支持,下面就是个简单的例子:

  1. > require(ChIPseeker)

  2. Loading required package: ChIPseeker


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


  4. If you use ChIPseeker in published research, please cite:

  5. 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

  6. > ff = getSampleFiles()[[4]]

  7. > options(ChIPseeker.ignore_1st_exon = TRUE)

  8. > options(ChIPseeker.ignore_1st_intron = TRUE)

  9. > options(ChIPseeker.ignore_downstream = TRUE)

  10. > options(ChIPseeker.ignore_promoter_subcategory = TRUE)

  11. > x = annotatePeak(ff)

  12. >> loading peak file...                         2018-01-09 11:36:33

  13. >> preparing features information...            2018-01-09 11:36:33

  14. >> identifying nearest features...              2018-01-09 11:36:34

  15. >> calculating distance from peak to TSS...     2018-01-09 11:36:34

  16. >> assigning genomic annotation...              2018-01-09 11:36:34

  17. >> assigning chromosome lengths                 2018-01-09 11:36:52

  18. >> done...                                      2018-01-09 11:36:52

  19. Warning message:

  20. In loadTxDb(TxDb) :

  21.  >> TxDb is not specified, use 'TxDb.Hsapiens.UCSC.hg19.knownGene' by default...

  22. > x

  23. Annotated peaks generated by ChIPseeker

  24. 1331/1331  peaks were annotated

  25. Genomic Annotation Summary:

  26.     Feature  Frequency

  27. 1   Promoter 58.7528174

  28. 2     5' UTR  0.3005259

  29. 3     3' UTR  2.1036814

  30. 4       Exon  3.0052592

  31. 5     Intron  7.9639369

  32. 6 Intergenic 27.8737791

我们可以通过设置 options来控制,但这只做用于总结结果,用于可视化, annotatePeak总是会给出细节性的注释。


往期精彩

    您可能也对以下帖子感兴趣

    文章有问题?点此查看未经处理的缓存