problem with getSRAfile in SRAdb
1
0
Entering edit mode
shidaxia • 0
@shidaxia-6966
Last seen 5.8 years ago

Hi,

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.

Thanks!

Tao

 

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

trying URL 'ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000648/SRR000648.sra'
downloaded 72 KB

trying URL 'ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000657/SRR000657.sra'
downloaded 276 KB

        run     study    sample experiment
1 SRR000648 SRP000098 SRS000290  SRX000122
2 SRR000657 SRP000098 SRS000290  SRX000122
                                                                                                            ftp
1 ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000648/SRR000648.sra
2 ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000657/SRR000657.sra
> 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

locale:
[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  

SRAdb • 2.2k views
ADD COMMENT
0
Entering edit mode

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 REPLY
1
Entering edit mode
Jack Zhu ▴ 170
@jack-zhu-3338
Last seen 7.1 years ago

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: 
'C:/Users/zhujack/Documents/R_WD'

trying URL 'ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000648/SRR000648.sra'
downloaded 280 KB

trying URL 'ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000657/SRR000657.sra'
downloaded 422 KB

        run     study    sample experiment
1 SRR000648 SRP000098 SRS000290  SRX000122
2 SRR000657 SRP000098 SRS000290  SRX000122
                                                                                                            ftp
1 ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000648/SRR000648.sra
2 ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX000/SRX000122/SRR000657/SRR000657.sra

Jack

ADD COMMENT
0
Entering edit mode

Hi Jack and Sean,

Just re-visit this problem. With newer R and SRAdb package, everything is fine now. Have no idea what happened. :-(

Tao

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

trying URL 'ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR000/SRR000648/SRR000648.sra'
downloaded 280 KB

trying URL 'ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR000/SRR000657/SRR000657.sra'
downloaded 422 KB

        run     study    sample experiment                                                                                                 ftp
1 SRR000648 SRP000098 SRS000290  SRX000122 ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR000/SRR000648/SRR000648.sra
2 SRR000657 SRP000098 SRS000290  SRX000122 ftp://ftp-trace.ncbi.nlm.nih.gov/sra/sra-instant/reads/ByRun/sra/SRR/SRR000/SRR000657/SRR000657.sra
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[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.42.2         RCurl_1.95-4.11      bitops_1.0-6         graph_1.58.0         BiocGenerics_0.26.0  RSQLite_2.1.1        RevoUtils_11.0.0    
[8] RevoUtilsMath_11.0.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.18     compiler_3.5.0   pillar_1.3.0     bindr_0.1.1      tools_3.5.0      digest_0.6.16    bit_1.1-14       memoise_1.1.0   
 [9] tibble_1.4.2     pkgconfig_2.0.2  rlang_0.2.2      DBI_1.0.0        GEOquery_2.48.0  rstudioapi_0.7   bindrcpp_0.2.2   dplyr_0.7.6     
[17] xml2_1.2.0       hms_0.4.2        stats4_3.5.0     bit64_0.9-7      tidyselect_0.2.4 glue_1.3.0       Biobase_2.40.0   R6_2.2.2        
[25] limma_3.36.3     purrr_0.2.5      readr_1.1.1      tidyr_0.8.1      blob_1.1.1       magrittr_1.5     assertthat_0.2.0 crayon_1.3.4
ADD REPLY

Login before adding your answer.

Traffic: 746 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6