CS番外4:自定义注释分类
上面是最近邮件的提问,而这个问题在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
所以呢在发行版中,早已支持,下面就是个简单的例子:
> 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
我们可以通过设置 options
来控制,但这只做用于总结结果,用于可视化, annotatePeak
总是会给出细节性的注释。
往期精彩