Hi
I want to make a GRangesList
containing exon,intron, promoter and TSS that I can subsequently use with the genomation::annotateWithGeneParts
function. Should be easy, however when I try do that starting from a GenomicFeatures
txdb package, extracting the parts I want and then try to make `GRangeList` I get the ERROR:
Error in combine_CompressedList_objects(class(x), objects, use.names = FALSE, : the objects to combine must be CompressedList objects (or NULLs)
Any help about how to solve this / what I am doing wrong is much appreciated :)
Thanks, Fabian
Reproducible example:
library(GenomicRanges) library(TxDb.Hsapiens.UCSC.hg19.knownGene) txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene ## needs to have 2 meta columns: score, name exo <- exonicParts(txdb, linked.to.single.gene.only=TRUE) mcols(exo) <- DataFrame("score" = exo$exon_rank, "name" = exo$gene_id) int <- intronicParts(txdb, linked.to.single.gene.only=TRUE) mcols(int) <- DataFrame("score" = rep(0, length(int$gene_id)), "name" = int$gene_id) grl <- GRangesList(exons=exo,introns=int) sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS release 6.9 (Final) Matrix products: default BLAS: /mnt/various/local/genome/packages/R/3.4.1/lib64/R/lib/libRblas.so LAPACK: /mnt/various/local/genome/packages/R/3.4.1/lib64/R/lib/libRlapack.so locale: [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C [3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8 [5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8 [7] LC_PAPER=en_US.utf8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets [8] methods base other attached packages: [1] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 [2] GenomicFeatures_1.28.5 [3] AnnotationDbi_1.38.2 [4] Biobase_2.36.2 [5] GenomicRanges_1.28.6 [6] GenomeInfoDb_1.12.3 [7] IRanges_2.10.5 [8] S4Vectors_0.14.7 [9] BiocGenerics_0.22.1 loaded via a namespace (and not attached): [1] Rcpp_0.12.13 XVector_0.16.0 [3] GenomicAlignments_1.12.2 zlibbioc_1.22.0 [5] BiocParallel_1.10.1 bit_1.1-12 [7] lattice_0.20-35 rlang_0.1.4 [9] blob_1.1.0 tools_3.4.1 [11] grid_3.4.1 SummarizedExperiment_1.6.5 [13] DBI_0.7 matrixStats_0.52.2 [15] bit64_0.9-7 digest_0.6.12 [17] tibble_1.3.4 Matrix_1.2-10 [19] GenomeInfoDbData_0.99.0 rtracklayer_1.36.6 [21] bitops_1.0-6 RCurl_1.95-4.8 [23] biomaRt_2.32.1 memoise_1.1.0 [25] RSQLite_2.0 DelayedArray_0.2.7 [27] compiler_3.4.1 Rsamtools_1.28.0 [29] Biostrings_2.44.2 XML_3.98-1.9 [31] pkgconfig_2.0.1