使用 getSRAdbFile() 会产生 sqlite 错误

Using getSRAdbFile() yields sqlite error

我正在使用 Bioconductor 的 SRAdb 包。不幸的是,在尝试下载 SRAdb 时,我 运行 在 sqliteSendQuery 中出错(见下文)。

有人建议安装最新的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     

我认为 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 一起使用。