2016-04-27 76 views
1

我正在使用Bioconductor的SRAdb软件包。不幸的是,当试图下载SRAdb时,我遇到了sqliteSendQuery中的一个错误(见下文)。使用getSRAdbFile()会产生sqlite错误

有人建议安装最新的sqlite3版本。但问题依然存在。

sqlFile <- getSRAdbFile() 

--2016-04-27 16:08:52-- http://dl.dropbox.com/u/51653511/SRAmetadb.sqlite.gz 
Resolving dl.dropbox.com (dl.dropbox.com)... 108.160.172.6 
Connecting to dl.dropbox.com (dl.dropbox.com)|108.160.172.6|:80... connected. 
HTTP request sent, awaiting response... 302 FOUND 
Location: http://dl.dropboxusercontent.com/u/51653511/SRAmetadb.sqlite.gz [following] 
--2016-04-27 16:08:52-- http://dl.dropboxusercontent.com/u/51653511/SRAmetadb.sqlite.gz 
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 199.47.217.69 
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|199.47.217.69|:80... connected. 
HTTP request sent, awaiting response... 302 Moved 
Location: http://10.137.251.101:15871/cgi-bin/blockpage.cgi?ws-session=4060338223 [following] 
--2016-04-27 16:08:52-- http://10.137.251.101:15871/cgi-bin/blockpage.cgi?ws-session=4060338223 
Connecting to 10.137.251.101:15871... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 1513 (1.5K) [text/html] 
Saving to: ‘SRAmetadb.sqlite.gz’ 

    0K .              100% 208M=0s 

2016-04-27 16:08:52 (208 MB/s) - ‘SRAmetadb.sqlite.gz’ saved [1513/1513] 

Unzipping... 

Error in sqliteSendQuery(con, statement, bind.data) : 
    error in statement: file is encrypted or is not a database 
Error in sqliteSendQuery(con, statement, bind.data) : 
    error in statement: file is encrypted or is not a database 

这里是会话信息:

sessionInfo() 

R version 3.2.3 (2015-12-10) 
Platform: x86_64-redhat-linux-gnu (64-bit) 
Running under: Fedora 23 (Workstation Edition) 

locale: 
[1] LC_CTYPE=en_US.UTF-8  LC_NUMERIC=C    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 LC_PAPER=en_US.UTF-8  LC_NAME=C     
[9] LC_ADDRESS=C    LC_TELEPHONE=C    LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C  

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

other attached packages: 
[1] SRAdb_1.28.1 RCurl_1.95-4.8 bitops_1.0-6 graph_1.48.0 RSQLite_1.0.0 DBI_0.3.1  

loaded via a namespace (and not attached): 
[1] parallel_3.2.3  tools_3.2.3   GEOquery_2.36.0  Biobase_2.30.0  BiocGenerics_0.16.1 
[6] stats4_3.2.3  XML_3.98-1.4  

回答

3

我觉得有什么毛病getSRAdbFile()。它看起来像文件无法正常下载:

0K .              100% 208M=0s 

2016-04-27 16:08:52 (208 MB/s) - ‘SRAmetadb.sqlite.gz’ saved [1513/1513] 

我得到的东西通过下载使用相同的URL(http://dl.dropbox.com/u/51653511/SRAmetadb.sqlite.gz)的文件,用wget,与gzip解压缩,然后从开始像正常的连接工作在R内。

要保留在R内的所有内容,您可以使用system2download.fileR.utils::gunzip