Hi,
I am using ChIPseeker to find the enrichment of genomic annotations in several Chip peak experiments. I would like to specify my own TxDB and I have used GenomicFeatures to create this (function: makeTxDbFromGRanges). Also, I have used readPeakFile to read all my peaks and save them in a list as the Vignette shows.
Everything seems to work fine until I try to find enrichment of different genomic annotations within the peaks. I get the following error when I try the command copied below, so it seems as the txdb is not specified correctly (I am trying both the file path for the database and the txdb that I had created). I tried to specify the path both as a file where the sqlite is saved and after loading it using loadDb, but neither works. What am I doing wrong? txdb worked fine when I used it in annotatePeak, so I don't know why it is not working here...
Also, the Vignette shows the use of GRanges directly for other functions in this package (so for example peaks as a list of GRange object), can I also specify GRanges directly in this function too, instead of BED files for this function?
Thank you.
enrichPeakOverlap(queryPeak=genomicAnnotationsBed, targetPeak=pathBedPeaks,TxDB=txdb, pAdjustMethod = "BH", nShuffle =1000, chainFile= NULL, verbose = FALSE)
# Error using the self-specified txdb:
Error in enrichOverlap.peak.internalquery.gr, target.gr, TxDb, nShuffle, :
unused argument (TxDB = <S4 object of class "TxDb">)
In addition: Warning message:
In loadTxDb(TxDb) :
>> TxDb is not specified, use 'TxDb.Hsapiens.UCSC.hg19.knownGene' by default...
# Error when trying the sqlite path for the txdb:
Error in enrichOverlap.peak.internalquery.gr, target.gr, TxDb, nShuffle, :
unused argument (TxDB = "txdb.sqlite")
In addition: Warning message:
In loadTxDb(TxDb) :
>> TxDb is not specified, use 'TxDb.Hsapiens.UCSC.hg19.knownGene' by default...
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] XVector_0.6.0 ChIPseeker_1.5.11 GenomicFeatures_1.18.7
[4] AnnotationDbi_1.28.2 Biobase_2.28.0 GenomicRanges_1.18.4
[7] GenomeInfoDb_1.2.5 IRanges_2.0.1 S4Vectors_0.4.0
[10] BiocGenerics_0.12.1
loaded via a namespace (and not attached):
[1] BBmisc_1.9
[2] BatchJobs_1.6
[3] BiocParallel_1.0.3
[4] Biostrings_2.34.1
[5] DBI_0.3.1
[6] GenomicAlignments_1.2.2
[7] KernSmooth_2.23-13
[8] MASS_7.3-35
[9] R6_2.1.1
[10] RColorBrewer_1.1-2
[11] RCurl_1.95-4.7
[12] RSQLite_1.0.0
[13] Rcpp_0.12.1
[14] Rsamtools_1.18.3
[15] TxDb.Hsapiens.UCSC.hg19.knownGene_3.0.0
[16] UpSetR_0.0.5
[17] XML_3.98-1.3
[18] assertthat_0.1
[19] base64enc_0.1-3
[20] biomaRt_2.24.1
[21] bitops_1.0-6
[22] boot_1.3-13
[23] brew_1.0-6
[24] caTools_1.17.1
[25] checkmate_1.6.2
[26] codetools_0.2-9
[27] colorspace_1.2-6
[28] digest_0.6.8
[29] dplyr_0.4.3
[30] fail_1.3
[31] foreach_1.4.2
[32] gdata_2.17.0
[33] ggplot2_1.0.1
[34] gplots_2.17.0
[35] grid_3.1.2
[36] gridBase_0.4-7
[37] gridExtra_2.0.0
[38] gtable_0.1.2
[39] gtools_3.5.0
[40] iterators_1.0.7
[41] magrittr_1.5
[42] munsell_0.4.2
[43] plotrix_3.5-12
[44] plyr_1.8.3
[45] proto_0.3-10
[46] reshape2_1.4.1
[47] rtracklayer_1.26.3
[48] scales_0.3.0
[49] sendmailR_1.2-1
[50] stringi_0.5-5
[51] stringr_1.0.0
[52] tools_3.1.2
[53] zlibbioc_1.12.0
The ellipsis parameter is only used to specify mc.cores and whether verbose info will be printed.
I will remove the ellipsis parameter as you suggested.
Thanks!
Guangchuang