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

Yes, it does. Your code worked - thanks for the swift reply!
I am having a similar problem, but this did not resolve it.
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 nameThanks in advance!
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., withBiocInstaller::biocLite()?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-15To revert
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.
Hello Please, I have this problem with AnnotationHub and a have tried alot of solutions including these; but are not resolve my problem :
Thanks! Kinza