Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listSRAfile() fails for SRX accessions #23

Open
RoganGrant opened this issue Mar 12, 2019 · 0 comments
Open

listSRAfile() fails for SRX accessions #23

RoganGrant opened this issue Mar 12, 2019 · 0 comments

Comments

@RoganGrant
Copy link

RoganGrant commented Mar 12, 2019

On multiple machines, I keep getting the following error when attempting to get SRA runs from SRX experiment accessions:

Error in if (is.na(sra_acc$run[i])) { : argument is of length zero

I have tried multiple datasets, but here is a reproducible example:
library(SRAdb) srafile = getSRAdbFile() con = dbConnect(RSQLite::SQLite(),srafile) kangMeta$srx = substr(kangMeta$relation.1, regexpr("SRX", kangMeta$relation.1), nchar(as.character(kangMeta$relation.1))) kangfiles = listSRAfile(kangMeta$srx, con)

In this case, the SRX accessions are:

[1] "SRX4456604" "SRX4456605" "SRX4456606" "SRX4456607" "SRX4456608" "SRX4456609" "SRX4456610" "SRX4456611" "SRX4456612" "SRX4456613" "SRX4456614" "SRX4456615" "SRX4456616" "SRX4456617"
[15] "SRX4456618" "SRX4456619" "SRX4456620" "SRX4456621" "SRX4456622" "SRX4456623" "SRX4456624" "SRX4456625" "SRX4456626" "SRX4456627" "SRX4456628" "SRX4456629" "SRX4456630"

so there is not an issue with the IDs. Furthermore, this exact code ran without issue in the past.

R session info:

R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.3 (Maipo)

Matrix products: default
BLAS: /hpc/software/lapack/3.6.0_gcc/lib64/libblas.so.3.6.0
LAPACK: /hpc/software/lapack/3.6.0_gcc/lib64/liblapack.so.3.6.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] AnnotationDbi_1.44.0 DBI_1.0.0 SRAdb_1.44.0 RCurl_1.95-4.11 bitops_1.0-6 graph_1.60.0
[7] RSQLite_2.1.1 GEOquery_2.50.5 Matrix_1.2-15 cowplot_0.9.4 RPushbullet_0.3.1 doParallel_1.0.14
[13] DESeq2_1.22.2 stringr_1.4.0 dplyr_0.8.0.1 plyr_1.8.4 readxl_1.3.0 recount_1.8.2
[19] SummarizedExperiment_1.12.0 DelayedArray_0.8.0 BiocParallel_1.16.6 matrixStats_0.54.0 Biobase_2.42.0 GenomicRanges_1.34.0
[25] GenomeInfoDb_1.18.2 IRanges_2.16.0 S4Vectors_0.20.1 BiocGenerics_0.28.0 ggplot2_3.1.0 rlist_0.4.6.1
[31] doSNOW_1.0.16 snow_0.4-3 iterators_1.0.10 foreach_1.4.4 biomaRt_2.38.0

loaded via a namespace (and not attached):
[1] colorspace_1.4-0 qvalue_2.14.1 htmlTable_1.13.1 XVector_0.22.0 base64enc_0.1-3 rstudioapi_0.9.0 bit64_0.9-7
[8] xml2_1.2.0 codetools_0.2-16 splines_3.5.1 geneplotter_1.60.0 knitr_1.21 Formula_1.2-3 jsonlite_1.6
[15] Rsamtools_1.34.1 annotate_1.60.0 cluster_2.0.7-1 rentrez_1.2.1 readr_1.3.1 compiler_3.5.1 httr_1.4.0
[22] backports_1.1.3 assertthat_0.2.0 lazyeval_0.2.1 limma_3.38.3 acepack_1.4.1 htmltools_0.3.6 prettyunits_1.0.2
[29] tools_3.5.1 gtable_0.2.0 glue_1.3.0 GenomeInfoDbData_1.2.0 reshape2_1.4.3 doRNG_1.7.1 Rcpp_1.0.0
[36] cellranger_1.1.0 bumphunter_1.24.5 Biostrings_2.50.2 rtracklayer_1.42.1 xfun_0.4 rngtools_1.3.1 XML_3.98-1.17
[43] zlibbioc_1.28.0 scales_1.0.0 BSgenome_1.50.0 VariantAnnotation_1.28.11 hms_0.4.2 derfinderHelper_1.16.1 RColorBrewer_1.1-2
[50] yaml_2.2.0 curl_3.3 memoise_1.1.0 gridExtra_2.3 downloader_0.4 pkgmaker_0.27 rpart_4.1-13
[57] latticeExtra_0.6-28 stringi_1.3.1 genefilter_1.64.0 checkmate_1.9.1 GenomicFeatures_1.34.3 bibtex_0.4.2 rlang_0.3.1
[64] pkgconfig_2.0.2 GenomicFiles_1.18.0 lattice_0.20-38 purrr_0.3.0 GenomicAlignments_1.18.1 htmlwidgets_1.3 bit_1.1-14
[71] tidyselect_0.2.5 magrittr_1.5 R6_2.4.0 Hmisc_4.2-0 pillar_1.3.1 foreign_0.8-71 withr_2.1.2
[78] survival_2.43-3 nnet_7.3-12 tibble_2.0.1 crayon_1.3.4 derfinder_1.16.1 progress_1.2.0 locfit_1.5-9.1
[85] grid_3.5.1 data.table_1.12.0 blob_1.1.1 digest_0.6.18 xtable_1.8-3 tidyr_0.8.2 munsell_0.5.0
[92] registry_0.5

saketkc added a commit to saketkc/pysradb that referenced this issue Jul 18, 2019
SRAdb seems to be lagging in some cases (seandavi/SRAdb#24)
or missing datasets in other cases (seandavi/SRAdb#23).
This commit introduces a fallback mechanism to deal with samples
that are not in the database or if the database is not required at all.
The detailed and expand tags are not supported yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant