Question: problem with getSRAfile in SRAdb
gravatar for shidaxia
13 months ago by
shidaxia0 wrote:


Try to run the code in SRAdb vignette.  It seems getSRAfile only downloads a portion of .sra files (the actual file size for these two files are 280 and 422kB.  I've tried other files and the problem is still there.




> getSRAfile( c("SRR000648","SRR000657"), sra_con, fileType = 'sra' )
Files are saved to: 

trying URL ''
downloaded 72 KB

trying URL ''
downloaded 276 KB

        run     study    sample experiment
1 SRR000648 SRP000098 SRS000290  SRX000122
2 SRR000657 SRP000098 SRS000290  SRX000122
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
[1] SRAdb_1.36.0         RCurl_1.95-4.8       bitops_1.0-6         graph_1.54.0         BiocGenerics_0.22.0  RSQLite_2.0         
[7] RevoUtilsMath_10.0.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11     XML_3.98-1.6     digest_0.6.12    R6_2.2.0         DBI_0.6-1        stats4_3.4.0     httr_1.2.1      
 [8] rlang_0.1.1      blob_1.1.0       RevoUtils_10.0.4 tools_3.4.0      bit64_0.9-7      Biobase_2.36.2   bit_1.1-12      
[15] yaml_2.1.14      compiler_3.4.0   pkgconfig_2.0.1  memoise_1.1.0    GEOquery_2.42.0  tibble_1.3.3  

ADD COMMENTlink modified 13 months ago by Jack Zhu170 • written 13 months ago by shidaxia0

SRAdb just downloads the file from the link in your post, so this isn't really a problem with SRAdb specifically, I suspect. Could you try doing the download outside of R? Also, could you check the file size on your disk as well as the value reported by R?

ADD REPLYlink written 13 months ago by Sean Davis21k
gravatar for Jack Zhu
13 months ago by
Jack Zhu170
Jack Zhu170 wrote:

Hi Tao,

I tested the same code on a Windows and a Mac and both downloaded the files with correct size.  Are you using a 64-bit Windows?  Have you tried what Sean suggested?

> getSRAfile( in_acc = c("SRR000648","SRR000657"), sra_con = sra_con, destDir = getwd(), fileType = 'sra' )
Files are saved to: 

trying URL ''
downloaded 280 KB

trying URL ''
downloaded 422 KB

        run     study    sample experiment
1 SRR000648 SRP000098 SRS000290  SRX000122
2 SRR000657 SRP000098 SRS000290  SRX000122


ADD COMMENTlink written 13 months ago by Jack Zhu170
Please log in to add an answer.


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