lawremi / rtracklayer

R interface to genome annotation files and the UCSC genome browser
Other
28 stars 17 forks source link

“ucscCart” object: superclass "characterORconnection" not defined #50

Closed elaplant closed 3 years ago

elaplant commented 3 years ago

I’m trying to use rtracklayer 1.48.0 to search UCSC genome browser tables. When I try to set up the session and then add the appropriate genome I get an error:

session <- browserSession(object = "UCSC") # browserSession() gives the same results genome(session) <- "GRCh37" #hg19, hg18, mm10 all give the same issue Error in validObject(.Object) : invalid class “ucscCart” object: superclass "characterORconnection" not defined in the environment of the object's class

Session info below:

R version 4.0.0 (2020-04-24) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] forcats_0.5.0 stringr_1.4.0 purrr_0.3.4 tibble_3.0.1 tidyverse_1.3.0 dplyr_0.8.5 survminer_0.4.7 ggpubr_0.3.0
[9] survival_3.1-12 devtools_2.3.0 usethis_1.6.1 readr_1.3.1 data.table_1.12.8 EDec_0.9 tidyr_1.0.3 rtracklayer_1.48.0
[17] GenomicRanges_1.40.0 GenomeInfoDb_1.24.0 IRanges_2.24.1 S4Vectors_0.28.1 BiocGenerics_0.36.1 pROC_1.16.2 caret_6.0-86 ggplot2_3.3.0
[25] lattice_0.20-41 CTD_1.0.0 gmp_0.6-2 igraph_1.2.5

loaded via a namespace (and not attached): [1] readxl_1.3.1 backports_1.1.6 plyr_1.8.6 splines_4.0.0 BiocParallel_1.24.1 digest_0.6.25
[7] foreach_1.5.0 gdata_2.18.0 fansi_0.4.1 magrittr_1.5 memoise_1.1.0 openxlsx_4.2.2
[13] remotes_2.1.1 recipes_0.1.12 Biostrings_2.56.0 modelr_0.1.8 gower_0.2.1 matrixStats_0.56.0
[19] prettyunits_1.1.1 colorspace_1.4-1 blob_1.2.1 rvest_0.3.5 haven_2.3.0 xfun_0.14
[25] callr_3.4.3 crayon_1.3.4 RCurl_1.98-1.2 jsonlite_1.6.1 zoo_1.8-8 iterators_1.0.12
[31] glue_1.4.0 gtable_0.3.0 ipred_0.9-9 zlibbioc_1.34.0 XVector_0.28.0 DelayedArray_0.14.0
[37] car_3.0-8 pkgbuild_1.0.8 abind_1.4-5 scales_1.1.1 DBI_1.1.0 rstatix_0.5.0
[43] Rcpp_1.0.4.6 xtable_1.8-4 foreign_0.8-78 km.ci_0.5-2 lava_1.6.7 prodlim_2019.11.13
[49] httr_1.4.1 gplots_3.0.3 ellipsis_0.3.0 farver_2.0.3 pkgconfig_2.0.3 XML_3.99-0.3
[55] nnet_7.3-13 dbplyr_1.4.4 labeling_0.3 tidyselect_1.1.0 rlang_0.4.6 reshape2_1.4.4
[61] munsell_0.5.0 cellranger_1.1.0 tools_4.0.0 cli_2.0.2 generics_0.0.2 broom_0.5.6
[67] yaml_2.2.1 ModelMetrics_1.2.2.2 processx_3.4.2 knitr_1.28 fs_1.4.1 zip_2.0.4
[73] survMisc_0.5.5 caTools_1.18.0 nlme_3.1-147 xml2_1.3.2 compiler_4.0.0 rstudioapi_0.11
[79] curl_4.3 testthat_2.3.2 ggsignif_0.6.0 reprex_0.3.0 stringi_1.4.6 ps_1.3.3
[85] desc_1.2.0 Matrix_1.2-18 KMsurv_0.1-5 vctrs_0.3.0 pillar_1.4.4 lifecycle_0.2.0
[91] bitops_1.0-6 R6_2.4.1 KernSmooth_2.23-16 gridExtra_2.3 rio_0.5.16 sessioninfo_1.1.1
[97] codetools_0.2-16 MASS_7.3-51.6 gtools_3.8.2 assertthat_0.2.1 pkgload_1.0.2 SummarizedExperiment_1.18.2 [103] rprojroot_1.3-2 withr_2.2.0 GenomicAlignments_1.24.0 Rsamtools_2.4.0 GenomeInfoDbData_1.2.3 hms_0.5.3
[109] grid_4.0.0 rpart_4.1-15 timeDate_3043.102 class_7.3-16 carData_3.0-4 Biobase_2.50.0
[115] lubridate_1.7.8

sanchit-saini commented 3 years ago

Hi @elaplant This issue will get fixed in the upcoming release that is on 20 May(Bioconductor 3.13). BiocGenerics contains the characterORconnection which was renamed to character_OR_connection. Effectively it was also renamed in the rtracklayer package. But because of failed checks, it wasn't propagated on the Bioconductor.

lawremi commented 3 years ago

@sanchit-saini is there some way for us to fix this now, instead of waiting for the release?

sanchit-saini commented 3 years ago

@lawremi For now, I think the user can declare class union themself after importing rtracklayer with

setClassUnion("character_OR_connection", c("character", "connection"))
lawremi commented 3 years ago

How long will it take for the updated rtracklayer to propagate to the Bioconductor repository?

sanchit-saini commented 3 years ago

The changes are already present in the Bioconductor devel branch and I think this branch will be used for the next release. So therefore it will be propagated on 20 May.

elaplant commented 3 years ago

Setting the class union works so I'll be able to use that until the update. Thank you!