hom.Hs.inp_dbschema of the Inparanoid annotation package not working properly
1
0
Entering edit mode
@burak-kutlu-10728
Last seen 8.1 years ago
Seattle

Hello, 

I came across the following bug that prevents printing of schema definition of the human or mouse inparanoid annotation db packages. 

library(hom.Hs.inp.db)
hom.Hs.inp_dbschema()

Warning message:
In max(ii) : no non-missing arguments to max; returning -Inf


​Changing some lines (135-138) in the AnnDbObj-lowAPI.R fixed the issue for me. using toLower for tableName seems to be the issue.

setMethod("dbschema", "DBIConnection",
    function(x, file="", show.indices=FALSE)
    {
        schema <- dbmeta(x, "DBSCHEMA")
        version <- dbmeta(x, "DBSCHEMAVERSION")
        file <- system.file("DBschemas",
                            paste0("schemas_", version),
                            paste0(schema, ".sql"),
                            package="AnnotationDbi")
        lines <- readLines(file)
        organism <- dbmeta(x, "ORGANISM")
        if(schema == "INPARANOID_DB" && organism != 'Homo sapiens'){
            tableName <- sub(" ", "_", organism)
            ii <- grep(tableName, lines)
            ii <- c(ii[1], ii[1]+1:5, ii[2],ii[3])
            lines <- lines[-ii]
        }

 

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] hom.Hs.inp.db_3.1.2  AnnotationDbi_1.34.2 IRanges_2.6.0        S4Vectors_0.10.0    
[5] Biobase_2.32.0       BiocGenerics_0.18.0  BiocInstaller_1.22.2

loaded via a namespace (and not attached):
[1] DBI_0.4-1     tools_3.3.0   RSQLite_1.0.0

 

Many thanks

-burak

 

 

software error annotationdbi • 840 views
ADD COMMENT
1
Entering edit mode
@herve-pages-1542
Last seen 10 hours ago
Seattle, WA, United States

Thanks Burak for reporting this. Should be fixed in AnnotationDbi 1.34.3 (release) and 1.35.3 (devel).

Cheers,

H.

ADD COMMENT

Login before adding your answer.

Traffic: 409 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6