Closed biobenkj closed 4 years ago
Hi Ben, @biobenkj
I suspect that the issue may not stem from RaggedExperiment
.
Can you provide a minimally reproducible example?
This would make it easier to see where the issue is coming from.
Best, Marcel
Any updates? @biobenkj
Yes, here is a minimal reproducible example using the RaggedExperiment example.
## Create a couple of GRanges objects with row ranges names
sample1 <- GRanges(
c(a = "chr1:1-10:-", b = "chr1:11-18:+"),
score = 1:2)
sample2 <- GRanges(
c(c = "chr2:1-10:-", d = "chr2:11-18:+"),
score = 3:4)
## Include column data
colDat <- DataFrame(id = 1:2)
## Make a GRangesList
grl <- as(list(sample1, sample2), "GRangesList")
## Convert to RaggedExperiment
## Works
re1 <- RaggedExperiment(sample1=sample1, sample2=sample2, colData = colDat)
re1
#class: RaggedExperiment
#dim: 4 2
#assays(1): score
#rownames(4): a b c d
#colnames(2): sample1 sample2
#colData names(1): id
## Breaks
re2 <- RaggedExperiment(grl, colData = colDat)
Error in as(objects[[1L]], "CompressedGRangesList", strict = FALSE) :
no method or default for coercing “SimpleGRangesList” to “CompressedGRangesList”
Session info
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] compartmap_1.65.7
[2] bsseq_1.21.1
[3] BiocSingular_1.1.7
[4] BSgenome.Mmusculus.UCSC.mm9_1.4.0
[5] Mus.musculus_1.3.1
[6] TxDb.Mmusculus.UCSC.mm10.knownGene_3.4.7
[7] org.Mm.eg.db_3.8.2
[8] BSgenome.Hsapiens.UCSC.hg38_1.4.1
[9] BSgenome_1.53.2
[10] rtracklayer_1.45.6
[11] Biostrings_2.53.2
[12] XVector_0.25.0
[13] Homo.sapiens_1.3.1
[14] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
[15] org.Hs.eg.db_3.8.2
[16] GO.db_3.8.2
[17] OrganismDbi_1.27.1
[18] GenomicFeatures_1.37.4
[19] AnnotationDbi_1.47.1
[20] RaggedExperiment_1.9.1
[21] SummarizedExperiment_1.15.9
[22] DelayedArray_0.11.7
[23] BiocParallel_1.19.3
[24] matrixStats_0.55.0
[25] Biobase_2.45.1
[26] GenomicRanges_1.37.16
[27] GenomeInfoDb_1.21.2
[28] IRanges_2.19.16
[29] S4Vectors_0.23.25
[30] BiocGenerics_0.31.6
loaded via a namespace (and not attached):
[1] bitops_1.0-6 bit64_0.9-7 RColorBrewer_1.1-2
[4] progress_1.2.2 httr_1.4.1 tools_3.6.1
[7] backports_1.1.5 R6_2.4.0 irlba_2.3.3
[10] HDF5Array_1.13.9 lazyeval_0.2.2 DBI_1.0.0
[13] colorspace_1.4-1 permute_0.9-5 gridExtra_2.3
[16] tidyselect_0.2.5 prettyunits_1.0.2 bit_1.1-14
[19] curl_4.2 compiler_3.6.1 graph_1.63.0
[22] scales_1.0.0 pbapply_1.4-2 RBGL_1.61.0
[25] askpass_1.1 rappdirs_0.3.1 stringr_1.4.0
[28] digest_0.6.21 Rsamtools_2.1.6 R.utils_2.9.0
[31] pkgconfig_2.0.3 dbplyr_1.4.2 limma_3.41.17
[34] rlang_0.4.0 impute_1.59.0 RSQLite_2.1.2
[37] DelayedMatrixStats_1.7.2 gtools_3.8.1 R.oo_1.22.0
[40] dplyr_0.8.3 RCurl_1.95-4.12 magrittr_1.5
[43] GenomeInfoDbData_1.2.1 Matrix_1.2-17 Rcpp_1.0.2
[46] munsell_0.5.0 Rhdf5lib_1.7.5 viridis_0.5.1
[49] R.methodsS3_1.7.1 stringi_1.4.3 zlibbioc_1.31.0
[52] rhdf5_2.29.3 BiocFileCache_1.9.1 grid_3.6.1
[55] blob_1.2.0 crayon_1.3.4 lattice_0.20-38
[58] hms_0.5.1 locfit_1.5-9.1 zeallot_0.1.0
[61] pillar_1.4.2 igraph_1.2.4.1 biomaRt_2.41.9
[64] XML_3.98-1.20 glue_1.3.1 data.table_1.12.4
[67] BiocManager_1.30.4 vctrs_0.2.0 gtable_0.3.0
[70] RANN_2.6.1 openssl_1.4.1 purrr_0.3.2
[73] assertthat_0.2.1 ggplot2_3.2.1 rsvd_1.0.2
[76] viridisLite_0.3.0 tibble_2.1.3 GenomicAlignments_1.21.7
[79] memoise_1.1.0
The above example works for both re1 and re2 using Bioc 3.9
Thanks Ben! @biobenkj
I've filed an issue in GenomicRanges
. I will wait for Hervé's response.
Please see the issue linked above for more details.
Thanks.
Awesome! Thanks so much @LiNk-NY!
Seems like Hervé made the fix. I've gone through and checked with the patched version of GRanges and explicitly setting as(list(sample1, sample2), "CompressedGRangesList") works. I had no idea there was such a thing as a "CompressedGRangesList" object. Thanks again for all your help! Feel free to close.
@biobenkj Note that you should not be required to know about the existence of CompressedGRangesList and doing as(list(sample1, sample2), "GRangesList")
should just work. It was not, but with GenomicRanges 1.37.17 now it should. Please let me know if you still run into problems with this new version of GenomicRanges. Thanks!
Hi Ben, @biobenkj I've made the constructor function more robust to list inputs. d8b1ae5309f2afa53dd36935a344f850905fcc5e
Thank you for reporting and providing a reproducible example. Best, Marcel
Thanks so much for RaggedExperiment! They are truly amazing for multi-omic and genomics in general.
I'm encountering a new error that is only occurring in the Bioc-devel branch of Bioconductor packages when converting a GRangesList object to a RaggedExperiment.
A reproducible example can be shown using the existing Bioconductor release (3.9) and upcoming release (3.10 - currently devel).
Passing in 3.9
The session info:
The failing version for 3.10
The session info:
The code in question here takes a list object that is output from lapply, converts it to a GRangesList object using:
and converts to a RaggedExperiment, where it fails (or passes).
Any idea what might have changed or is the issue?
Thanks so much!