2016-04-27 56 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