Skip to content

Instantly share code, notes, and snippets.

@astatham
Created March 25, 2014 03:03
Show Gist options
  • Save astatham/9754516 to your computer and use it in GitHub Desktop.
Save astatham/9754516 to your computer and use it in GitHub Desktop.
Example to download an SRA study wholly within R on wolfpack (our internal cluster)
# wolfpack modules required: hugfre/R/3.0.2 fabbus/aspera/3.1.1.70290
ascpCMD <- "ascp -QT -l1000M -i /share/ClusterShare/software/contrib/fabbus/aspera/3.1.1.70290/asperaweb_id_dsa.putty"
library(SRAdb)
if (!file.exists("../SRAmetadb.sqlite")) db <- getSRAdbFile("../") else db <- "../SRAmetadb.sqlite"
con <- dbConnect(dbDriver("SQLite"), db) # load the SRA database
accession <- "SRP026604"
ascpSRA(accession, con, ascpCMD, "sra")
@astatham
Copy link
Author

This example downloads 'sra' files, but if available can directly download 'sralite' or 'fastq' files by changing the parameter to ascpSRA()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment