I am using ChIPseeker to annotate my differential peaks but getting an error:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘NSBS’ for signature ‘"SortedByQueryHits"’
I don't have any clue to solve this error. Any suggestion is highly appreciated.
Following are my commands :
dba.show(DBdata_count_contrast_DESeq2)
ID Condition Caller Intervals FRiP
1 C1_2485 C1 counts 108125 0.16
2 C1_3923 C1 counts 108125 0.61
3 C4_2753 C4 counts 108125 0.34
4 C4_1274 C4 counts 108125 0.44
5 C4_4133 C4 counts 108125 0.15
6 C4_4205 C4 counts 108125 0.48
7 C4_4206 C4 counts 108125 0.55
8 C4_4750 C4 counts 108125 0.44
9 C4_1602 C4 counts 108125 0.28
10 C4_1877 C4 counts 108125 0.20
11 C4_3012 C4 counts 108125 0.42
12 C4_3593 C4 counts 108125 0.16
13 C4_3672 C4 counts 108125 0.58
14 C4_4748 C4 counts 108125 0.57
peaks.C1<- peaks.consensus[DBdata_count_contrast_DESeq2$called[,1]==1 & DBdata_count_contrast_DESeq2$called[,2]==1]
peaks.C4<- peaks.consensus[DBdata_count_contrast_DESeq2$called[,3]==1 & DBdata_count_contrast_DESeq2$called[,4]==1 & DBdata_count_contrast_DESeq2$called[,5]==1 & DBdata_count_contrast_DESeq2$called[,6]==1& DBdata_count_contrast_DESeq2$called[,7]==1 & DBdata_count_contrast_DESeq2$called[,8]==1 & DBdata_count_contrast_DESeq2$called[,9]==1 & DBdata_count_contrast_DESeq2$called[,10]==1 & DBdata_count_contrast_DESeq2$called[,11]==1 & DBdata_count_contrast_DESeq2$called[,12]==1 & DBdata_count_contrast_DESeq2$called[,13]==1 & DBdata_count_contrast_DESeq2$called[,14]==1]
peaks.C1_ann<-annotatePeak(peaks.C1, tssRegion=c(-3000, 3000), TxDb=txdb, annoDb="org.Hs.eg.db")
preparing features information... 2019-09-13 11:34:44 identifying nearest features... 2019-09-13 11:34:45 calculating distance from peak to TSS... 2019-09-13 11:34:45 assigning genomic annotation... 2019-09-13 11:34:45 adding gene annotation... 2019-09-13 11:34:58 'select()' returned 1:many mapping between keys and columns assigning chromosome lengths 2019-09-13 11:34:58 done... 2019-09-13 11:34:58
peaks.C4_ann<-annotatePeak(peaks.C4, tssRegion=c(-3000, 3000), TxDb=txdb, annoDb="org.Hs.eg.db")
preparing features information... 2019-09-13 11:35:11 identifying nearest features... 2019-09-13 11:35:11 Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘NSBS’ for signature ‘"SortedByQueryHits"’
I think this may stil be the chr issue. try installing diffloop package
dbobject <- addchr(dbobject) and then re-run the annotatedPeak()
be careful, you have to use thee addchr() only once, as it will keep adding chr to the chromosome column.
Adding
chr
before the chromosome numbers fixed this issue. Thank you!