Entering edit mode
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.
intronsByTranscript
is exported in ensembldb version 2.6.6 which will be available in a few days.