Question: AnnotationHub corrupt database
0
gravatar for Koen Van den Berge
3.8 years ago by
Ghent University, Belgium
Koen Van den Berge170 wrote:

I once loaded the AnnotationHub library and called the object through

hub = AnnotationHub()

But then I got in a rush and I forced the code to stop running and shut down R. Ever since, when I run the same code, I get the following error:

library(AnnotationHub)
> hub = AnnotationHub()
Error: 'AnnotationHub' database corrupt; remove it and try again
  database: ‘/Users/koenvandenberge/.AnnotationHub/annotationhub.sqlite3’
  reason: missing tables

I have tried removing the annotionhub sqlite database through Terminal, removing AnnotationHub package and reinstalling it, but it gives me the same error message.

Any ideas on how to fix this?

Thanks,

Koen

annotationhub • 1.7k views
ADD COMMENTlink modified 10 weeks ago by shepherl ♦♦ 1.4k • written 3.8 years ago by Koen Van den Berge170
Answer: AnnotationHub corrupt database
1
gravatar for Martin Morgan
3.8 years ago by
Martin Morgan ♦♦ 23k
United States
Martin Morgan ♦♦ 23k wrote:

Removing the data base should be sufficient. From within R

unlink('/Users/koenvandenberge/.AnnotationHub/annotationhub.sqlite3')
file.exists('/Users/koenvandenberge/.AnnotationHub/annotationhub.sqlite3')  # FALSE
hub = AnnotationHub()

The last line should trigger a download; does it? It might also help to include the output of hubCache() and sessionInfo().

ADD COMMENTlink written 3.8 years ago by Martin Morgan ♦♦ 23k

Yes, it does. Your code worked - thanks for the swift reply!

ADD REPLYlink written 3.8 years ago by Koen Van den Berge170

I am having a similar problem, but this did not resolve it.

library(AnnotationHub)
ah = AnnotationHub()

updating metadata: retrieving 1 resource
Error: database is corrupt; remove it and try again
  database: ‘/Users/mtang1/.AnnotationHub/annotationhub.sqlite3’
  reason: missing tables
In addition: Warning message:
download failed
  hub path: ‘https://annotationhub.bioconductor.org/metadata/annotationhub.sqlite3’
  cache path: ‘/Users/mtang1/.AnnotationHub/annotationhub.sqlite3’
  reason: Couldn't resolve host name 

Then I tried:

unlink('/Users/mtang1/.AnnotationHub/annotationhub.sqlite3')
> file.exists('/Users/mtang1/.AnnotationHub/annotationhub.sqlite3')
[1] FALSE
> ah = AnnotationHub()
updating metadata: retrieving 1 resource
Error: database is corrupt; remove it and try again
  database: ‘/Users/mtang1/.AnnotationHub/annotationhub.sqlite3’
  reason: missing tables
In addition: Warning message:
download failed
  hub path: ‘https://annotationhub.bioconductor.org/metadata/annotationhub.sqlite3’
  cache path: ‘/Users/mtang1/.AnnotationHub/annotationhub.sqlite3’
  reason: Couldn't resolve host name 

 

Thanks in advance!

 sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] AnnotationHub_2.4.2 BiocGenerics_0.19.2

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.7                   IRanges_2.7.15                digest_0.6.10                
 [4] mime_0.5                      R6_2.1.3                      xtable_1.8-2                 
 [7] DBI_0.5-1                     stats4_3.3.1                  RSQLite_1.0.0                
[10] BiocInstaller_1.22.3          httr_1.2.1                    curl_2.1                     
[13] S4Vectors_0.11.15             tools_3.3.1                   Biobase_2.33.3               
[16] shiny_0.14                    httpuv_1.3.3                  rsconnect_0.4.3              
[19] AnnotationDbi_1.35.4          htmltools_0.3.5               knitr_1.14                   
[22] interactiveDisplayBase_1.11.3
ADD REPLYlink written 2.7 years ago by tangming2005130

I think this was a misconfiguration on our side, can you try again?

Also, most of your Bioconductor packages are 'devel' packages (odd-numbered 'y' in x.y.z version number), but AnnotationHub is 'release'. Does BiocInstaller::biocValid() report problems with your installation? Can you fix them, e.g., with BiocInstaller::biocLite()?

ADD REPLYlink written 2.7 years ago by Martin Morgan ♦♦ 23k

Hi,

Thanks! I was using devel brach for `recount` package. how should I revert back to released version?

Now the `annotationHub` works fine, but got an error for another package.

BiocInstaller::biocLite()
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.3 (BiocInstaller 1.22.3), R 3.3.1 (2016-06-21).
Old packages: 'slam'
Update all/some/none? [a/s/n]: 
a

  There is a binary version available but the source version is later:
     binary source needs_compilation
slam 0.1-37 0.1-38              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘slam’

trying URL 'https://cran.rstudio.com/src/contrib/slam_0.1-38.tar.gz'
Content type 'application/x-gzip' length 49366 bytes (48 KB)
==================================================
downloaded 48 KB

* installing *source* package ‘slam’ ...
** package ‘slam’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c apply.c -o apply.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c grouped.c -o grouped.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c sparse.c -o sparse.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c util.c -o util.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o slam.so apply.o grouped.o sparse.o util.o -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2 -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [slam.so] Error 1
ERROR: compilation failed for package ‘slam’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/slam’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/slam’

The downloaded source packages are in
    ‘/private/var/folders/79/x06wz9v560q10gw881n9c_z0x7m0vl/T/RtmpxqlTc6/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘slam’ had non-zero exit status
> library(AnnotationHub)
> ah = AnnotationHub()
updating metadata: retrieving 1 resource
  |==========================================================================================| 100%
snapshotDate(): 2016-08-15

 

 

ADD REPLYlink written 2.7 years ago by tangming2005130
1

To revert

BiocInstaller::useDevel(FALSE)
BiocInstaller::biocValid()

and then follow directions.

For recount, short answer, choose 'n' instead of 'y' for install from source. Long answer install Mac build tools as described at http://r.research.att.com/. Also, often a newer source than binary means that the Mac-specific binary build failed, and it will fail for you if trying to build from source. But decide on this after you have reverted, since whether there is a newer source than binary version is package-specific. 

ADD REPLYlink written 2.7 years ago by Martin Morgan ♦♦ 23k

Hello Please, I have this problem with AnnotationHub and a have tried alot of solutions including these; but are not resolve my problem :

library(AnnotationHub)
ah = AnnotationHub()
Error: failed to connect to local data base
  database: ‘/home/krian//.AnnotationHub/annotationhub.sqlite3’
  reason: invalid version specification ‘3,8’

Thanks! Kinza

ADD REPLYlink written 10 weeks ago by rian.kinza10
Answer: AnnotationHub corrupt database
1
gravatar for rian.kinza
10 weeks ago by
rian.kinza10
spain
rian.kinza10 wrote:

Hi, I found the solution for ;

Error: failed to connect to local data base
   database: ‘/home/krian//.AnnotationHub/annotationhub.sqlite3’
   reason: invalid version specification ‘3,8’

I changed the local variable LCNUMERIC from 'esES.UTF-8 ' to 'C':

Sys.setlocale('LC_NUMERIC', 'C')

to check if is changed :

Sys.getlocale()
ADD COMMENTlink written 10 weeks ago by rian.kinza10
Answer: AnnotationHub corrupt database
0
gravatar for shepherl
10 weeks ago by
shepherl ♦♦ 1.4k
United States
shepherl ♦♦ 1.4k wrote:

@rian.kinza

We felt like this should be accounted for in the code as well. We have made a fix and you should be able to use AnnotationHub without changing your default LC_NUMERIC. Available in Release version: 2.14.5 and Devel version: 2.15.8 of AnnontationHub. Those versions of the package should be available through BiocManager::install within the next 2 days.

Cheers!

ADD COMMENTlink written 10 weeks ago by shepherl ♦♦ 1.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 141 users visited in the last hour