YuLab-SMU / ChIPseeker

:dart: ChIP peak Annotation, Comparison and Visualization
https://onlinelibrary.wiley.com/share/author/GYJGUBYCTRMYJFN2JFZZ?target=10.1002/cpz1.585
220 stars 74 forks source link

How to combine csAnno object ? #157

Open yuanlizhanshi opened 3 years ago

yuanlizhanshi commented 3 years ago

In sometimes, we need ChIPseeker to annotate the data about the genome loci, usually, we are not considering the strand of the peak, but when I confront with some methylation sequencing data, I need to have considered the strand information of CpG and split it to annotate, so there are two csAnno objects were created. but I want to perform the subsequent visualization by ChIPseeker, but it only to input a single csAnno object, Could it be possible to add a function to combine the information of two or multiple csAnno objects?

yuanlizhanshi commented 3 years ago

I want to combine the two or more csAnno object, as you code provided before, you creat two csAnno object and plot two figures. But i want to combind the information of two csAnno object,and display in one figure. For example, avarage the promoter percent of two object and the other genomic features which stored in the @.***' method, just combine and recalculate the percentage, so i can do some visualization at downsteam.

------------------ 原始邮件 ------------------ 发件人: "YuLab-SMU/ChIPseeker" @.>; 发送时间: 2021年9月14日(星期二) 晚上6:35 @.>; @.**@.>; 主题: Re: [YuLab-SMU/ChIPseeker] How to combine csAnno object ? (#157)

I can hardly get your point, or maybe you can just upload a sample file to explain your question in details. According to the message you have declared, your problem can be solved by inputing a csAnno list files to do the subsequent visualization.

For example, you can reguard the files[[4]] and files[[5]] as the different strand informations. And you can get two csAnno object. You can input the csAnno list files like c(x,x1) to the plotAnnoBar() function to combine the visualization of two csAnno objects. library(ChIPseeker) library(TxDb.Hsapiens.UCSC.hg19.knownGene) files <- getSampleFiles() txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene x <- annotatePeak(TxDb = txdb, files[[4]]) x1 <- annotatePeak(TxDb = txdb, files[[5]]) plotAnnoBar(c(x,x1))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.