How to use EnsDb in annotatePeak from package "ChIPseeker"
1
1
Entering edit mode
foehn ▴ 100
@foehn-16281
Last seen 2.6 years ago
United States

Hello,

I'm trying to use EnsDb.Hsapiens.v86 as the annotation database for function annotatePeak from package "ChIPseeker". Yet I met a problem that the argument TxDb doesn't accept an EnsDb object:

library(EnsDb.Hsapiens.v86)
library(ChIPseeker)
EnsHg38 <- EnsDb.Hsapiens.v86
seqlevelsStyle(EnsHg38) <- "UCSC"

> peaks
GRanges object with 10 ranges and 0 metadata columns:
       seqnames                 ranges strand
          <Rle>              <IRanges>  <Rle>
   [1]    chr15 [ 22664756,  22664905]      *
   [2]    chr16 [ 66483816,  66483965]      *
   [3]     chr9 [135561956, 135562105]      *
   [4]    chr14 [ 88163786,  88163935]      *
   [5]    chr20 [ 57498528,  57498677]      *
   [6]    chr19 [ 49097916,  49098065]      *
   [7]    chr10 [ 89374396,  89374545]      *
   [8]     chr6 [  4589811,   4589960]      *
   [9]     chr6 [134420636, 134420785]      *
  [10]     chr1 [173499905, 173500054]      *
  -------
  seqinfo: 25 sequences (1 circular) from hg38 genome

res <- annotatePeak(peaks, TxDb = EnsHg38) 
>> preparing features information...             2019-02-15 14:22:12 
>> identifying nearest features...               2019-02-15 14:22:12 
>> calculating distance from peak to TSS...      2019-02-15 14:22:13 
>> assigning genomic annotation...               2019-02-15 14:22:13 
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function 'intronsByTranscript' for signature '"EnsDb"'
In addition: Warning message:
In .Seqinfo.mergexy(x, y) :
  The 2 combined objects have no sequence levels in common. (Use
  suppressWarnings() to suppress this warning.)

I wonder if it is possible to use EnsDb instead of TxDb in annotatePeak? Thanks.

GRanges ChIPseeker annotatePeak TxDb EnsDb • 1.7k views
ADD COMMENT
2
Entering edit mode
Johannes Rainer ★ 2.0k
@johannes-rainer-6987
Last seen 7 weeks ago
Italy

The reason is that ensembldb doesn't have an intronsByTranscript method. I'll add that and it should work.

cheers, jo

ADD COMMENT
0
Entering edit mode

intronsByTranscript is exported in ensembldb version 2.6.6 which will be available in a few days.

ADD REPLY

Login before adding your answer.

Traffic: 589 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6