Entering edit mode
Hello,
I'm getting a subscript out of bound error when using plotvenn()
from ChIPseeker
on a list of GRanges objects:
# load libraries library(GenomicRanges) library(ChIPseeker) # get some GRanges objects example(GRanges) # check intersection intersect(some.gr, longGR) GRanges object with 7 ranges and 0 metadata columns: seqnames ranges strand <Rle> <IRanges> <Rle> [1] chr1 [6, 10] + [2] chr1 [5, 10] * [3] chr2 [2, 10] + [4] chr2 [1, 10] - [5] chr2 [4, 10] * [6] chr3 [7, 10] + [7] chr3 [9, 10] - ------- seqinfo: 3 sequences from mock1 genome # visualise intersection with Venn diagram vennplot(list(some.gr, longGR)) Error in ss[[1]] : subscript out of bounds > sessionInfo() R version 3.3.0 (2016-05-03) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux Server release 6.7 (Santiago) locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=C [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=C LC_PAPER=en_GB.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base other attached packages: [1] ChIPseeker_1.8.3 GenomicRanges_1.24.0 GenomeInfoDb_1.8.1 IRanges_2.6.1 S4Vectors_0.10.1 BiocGenerics_0.18.0 [7] nvimcom_0.9-16 BiocInstaller_1.22.3 colorout_1.0-2 setwidth_1.0-4 loaded via a namespace (and not attached): [1] Rcpp_0.12.5 RColorBrewer_1.1-2 plyr_1.8.4 [4] XVector_0.12.0 GenomicFeatures_1.24.2 bitops_1.0-6 [7] tools_3.3.0 zlibbioc_1.18.0 boot_1.3-18 [10] biomaRt_2.28.0 gridBase_0.4-7 RSQLite_1.0.0 [13] gtable_0.2.0 TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 DBI_0.4-1 [16] gridExtra_2.2.1 UpSetR_1.2.0 rtracklayer_1.32.0 [19] dplyr_0.4.3 caTools_1.17.1 gtools_3.5.0 [22] Biostrings_2.40.1 grid_3.3.0 Biobase_2.32.0 [25] R6_2.1.2 plotrix_3.6-2 AnnotationDbi_1.34.3 [28] XML_3.98-1.4 BiocParallel_1.6.2 gdata_2.17.0 [31] magrittr_1.5 ggplot2_2.1.0 gplots_3.0.1 [34] Rsamtools_1.24.0 scales_0.4.0 GenomicAlignments_1.8.0 [37] assertthat_0.1 SummarizedExperiment_1.2.2 colorspace_1.2-6 [40] KernSmooth_2.23-15 RCurl_1.95-4.8 munsell_0.4.3
Am I doing something wrong?
Thank you!
Thanks, however that doesn't really help because the example in the vignette is a list of gene IDs while here I'm using a list of GRanges.
The issue is that the list of GRanges has to be named (see my own answer). It might be worth adding it to the documentation.
thanks for your feedback. I have updated the code to throw error of 'input object should be a named list' if it is not.