Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BenLangmead/f40ff161c3be517b5b4d8867479fe4ee to your computer and use it in GitHub Desktop.
Save BenLangmead/f40ff161c3be517b5b4d8867479fe4ee to your computer and use it in GitHub Desktop.
gathering human rna-seq w/ sradbv2
> query=paste(
+ 'sample_taxon_id:9606',
+ 'experiment_library_strategy:"rna seq"',
+ 'experiment_library_source:transcriptomic',
+ 'experiment_platform:illumina')
> st <- 0
> SZ <- 500
> df <- sra_full_search(q=query, start=st, size=SZ); st <- st + SZ
https://api-omicidx.cancerdatasci.org/sra/1.0/search/full?q=sample_taxon_id%3A9606%20experiment_library_strategy%3A%22rna%20seq%22%20experiment_library_source%3Atranscriptomic%20experiment_platform%3Aillumina&start=0&size=500
> print(paste('ncol for batch', st, '=', ncol(df)))
[1] "ncol for batch 500 = 88"
> fulldf <- df
> while(nrow(df) > 0) {
+ df <- sra_full_search(q=query, start=st, size=SZ); st <- st + SZ
+ print(paste('ncol for batch', st, '=', ncol(df)))
+ fulldf <- rbind(fulldf, df)
+ }
https://api-omicidx.cancerdatasci.org/sra/1.0/search/full?q=sample_taxon_id%3A9606%20experiment_library_strategy%3A%22rna%20seq%22%20experiment_library_source%3Atranscriptomic%20experiment_platform%3Aillumina&start=500&size=500
[1] "ncol for batch 1000 = 88"
https://api-omicidx.cancerdatasci.org/sra/1.0/search/full?q=sample_taxon_id%3A9606%20experiment_library_strategy%3A%22rna%20seq%22%20experiment_library_source%3Atranscriptomic%20experiment_platform%3Aillumina&start=1000&size=500
[1] "ncol for batch 1500 = 88"
https://api-omicidx.cancerdatasci.org/sra/1.0/search/full?q=sample_taxon_id%3A9606%20experiment_library_strategy%3A%22rna%20seq%22%20experiment_library_source%3Atranscriptomic%20experiment_platform%3Aillumina&start=1500&size=500
[1] "ncol for batch 2000 = 84"
Error in rbind(deparse.level, ...) :
numbers of columns of arguments do not match
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment