Bioconductor / AnnotationHub

Client for the Bioconductor AnnotationHub web resource
17 stars 13 forks source link

"reason: this db is of type Inparanoid8Db but this is not a defined class" #35

Open KMS-Rock opened 2 years ago

KMS-Rock commented 2 years ago

Hi, I need to retrieve database AH10587 from hub which belongs to Streptomyces coelicolor, but it shows "reason: this db is of type Inparanoid8Db but this is not a defined class". Although data provider function recognize Inparanoid as class. Please suggest. Thanks

lshep commented 2 years ago

Thank you. I saw your email on the maintainer@bioconductor.org. I will look into it.

KMS-Rock commented 2 years ago

Dear Ishep, Thanks for your prompt and kind response. Regards

KMS-Rock commented 2 years ago

Dear Ishep, Kindly inform me here whenever you find something fixed with (Org.Sco.eg.db) or annotationHub (Inparanoid8), I'll be waiting for your response. Thanks

lshep commented 2 years ago

The issue is Bioconductor stopped support for the Inparanoid class when it was realized the data had stopped being updated in 2013. We removed the class support in the accompanied packages and therefore it effects the loading of this resource. It pointed out a problem that we should be checking and validating the resources in the hub to make sure they are downloadable and loadable in R. As we decide internally how to handle this situation; if you would like to use the existing hub file you could do something like the following:

library(RSQLite)

download.file("https://bioconductorhubs.blob.core.windows.net/annotationhub/inparanoid8/Orthologs/hom.Streptomyces_coelicolor.inp8.sqlite", "annoTest.sqlite")

con <- dbConnect(SQLite(), dbname="annoTest.sqlite")
dbListTables(con)
dbGetQuery(conn=con, statement="select * from Torulaspora_delbrueckii limit 1")
dbDisconnect(con)

FWIW: To get the end point url to manually download: I did a getInfoOnIds to get the fetch_id and then a curlGetHeaders to see the redirect to the end point location

library(AnnotationHub)
ah = AnnotationHub()
getInfoOnIds(ah, "AH10587")

curlGetHeaders("https://annotationhub.bioconductor.org/fetch/10587")
KMS-Rock commented 2 years ago

Dear Ishpe, Thanks a lot for the information and given link. its really a great help, I have downloaded the SQLITE file manually, although it is not executable in the clusterprofiler, which requires a database like (org.Sco.eg.db) for which I wrote to maintainer@bioconductor, I request is there any update about org.Sco.eg.db ? I am new to R might be I missing about using SQLite files. kindly suggest if possible. Thanks

lshep commented 2 years ago

https://www.bioconductor.org/about/removed-packages/ org.Sco.eg.db was removed back in Bioc 3.5. You can check out AnnotationForge that provides functions to make your own orgDb.

KMS-Rock commented 2 years ago

Yes, It was removed but, Thanks for the information, FORGE needs to maintain the database I think? Well, I will try to prepare. Thanks & Regards

KMS-Rock commented 2 years ago

Dear Ishep Through file you shared I tried to get database from following function

library(AnnotationDbi) ## if not already loaded txdb <- loadDb("/locationToFile/mytxdb.sqlite")

but it still through same error "Error in .attach_supporting_pkg(conn, db_type) : this db is of type Inparanoid8Db but this is not a defined class"

even I removed "inp8" from downloaded file but didn't work.

Looking for your suggestion Thanks

lshep commented 2 years ago

Do not load with the AnnotationDbi::loadDb, you would have to load it with a different sqlite load method which is why I suggest RSQLite

KMS-Rock commented 2 years ago

Thanks for your comment. I tried but it shows "database disk image is malformed"

library(RSQLite) download.file("https://bioconductorhubs.blob.core.windows.net/annotationhub/inparanoid8/Orthologs/hom.Streptomyces_coelicolor.inp8.sqlite", "annoTest.sqlite") trying URL 'https://bioconductorhubs.blob.core.windows.net/annotationhub/inparanoid8/Orthologs/hom.Streptomyces_coelicolor.inp8.sqlite' Content type 'binary/octet-stream' length 5018624 bytes (4.8 MB) downloaded 4.8 MB

con <- dbConnect(SQLite(), dbname="annoTest.sqlite") Warning message: Couldn't set synchronous mode: database disk image is malformed Use synchronous = NULL to turn off this warning.

lshep commented 2 years ago

That is very odd as it does not for me

> 
> download.file("https://bioconductorhubs.blob.core.windows.net/annotationhub/inparanoid8/Orthologs/hom.Streptomyces_coelicolor.inp8.sqlite", "annoTest.sqlite")
trying URL 'https://bioconductorhubs.blob.core.windows.net/annotationhub/inparanoid8/Orthologs/hom.Streptomyces_coelicolor.inp8.sqlite'
Content type 'binary/octet-stream' length 5018624 bytes (4.8 MB)
==================================================
downloaded 4.8 MB

> con <- dbConnect(SQLite(), dbname="annoTest.sqlite")

What is your sessionInfo()

> sessionInfo()
R version 4.2.1 Patched (2022-09-28 r82935)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS:   /home/shepherd/R-Installs/bin/R-4-2-branch/lib/libRblas.so
LAPACK: /home/shepherd/R-Installs/bin/R-4-2-branch/lib/libRlapack.so

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RSQLite_2.2.18      praise_1.0.0        BiocManager_1.30.18

loaded via a namespace (and not attached):
 [1] bit_4.0.4       compiler_4.2.1  fastmap_1.1.0   cli_3.4.1      
 [5] DBI_1.1.3       memoise_2.0.1   Rcpp_1.0.9      bit64_4.0.5    
 [9] vctrs_0.5.0     cachem_1.0.6    blob_1.2.3      pkgconfig_2.0.3
[13] rlang_1.0.6    
> 
KMS-Rock commented 2 years ago

R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19044)

Matrix products: default

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

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

other attached packages: [1] RSQLite_2.2.18 AnnotationHub_3.4.0 BiocFileCache_2.4.0
[4] dbplyr_2.2.1 AnnotationForge_1.38.1 AnnotationDbi_1.58.0
[7] IRanges_2.30.1 S4Vectors_0.34.0 Biobase_2.56.0
[10] BiocGenerics_0.42.0

loaded via a namespace (and not attached): [1] KEGGREST_1.36.3 tidyselect_1.2.0
[3] purrr_0.3.5 BiocVersion_3.15.2
[5] vctrs_0.4.2 generics_0.1.3
[7] htmltools_0.5.3 yaml_2.3.5
[9] utf8_1.2.2 interactiveDisplayBase_1.34.0 [11] blob_1.2.3 XML_3.99-0.11
[13] rlang_1.0.6 later_1.3.0
[15] pillar_1.8.1 withr_2.5.0
[17] glue_1.6.2 DBI_1.1.3
[19] rappdirs_0.3.3 bit64_4.0.5
[21] GenomeInfoDbData_1.2.8 lifecycle_1.0.3
[23] zlibbioc_1.42.0 Biostrings_2.64.1
[25] memoise_2.0.1 fastmap_1.1.0
[27] httpuv_1.6.6 GenomeInfoDb_1.32.4
[29] curl_4.3.3 fansi_1.0.3
[31] Rcpp_1.0.9 xtable_1.8-4
[33] promises_1.2.0.1 filelock_1.0.2
[35] BiocManager_1.30.18 cachem_1.0.6
[37] XVector_0.36.0 mime_0.12
[39] bit_4.0.4 png_0.1-7
[41] digest_0.6.29 dplyr_1.0.10
[43] shiny_1.7.2 cli_3.4.1
[45] tools_4.2.1 bitops_1.0-7
[47] magrittr_2.0.3 RCurl_1.98-1.9
[49] tibble_3.1.8 crayon_1.5.2
[51] pkgconfig_2.0.3 ellipsis_0.3.2
[53] assertthat_0.2.1 httr_1.4.4
[55] rstudioapi_0.14 R6_2.5.1
[57] compiler_4.2.1