ascpSRA | R Documentation |
This function downloads SRA data files (fastq, sra ) by fasp protocol using Aspera's ascp command line program, which is included in Aspera Connect software (http://www.asperasoft.com/).
ascpSRA ( in_acc, sra_con, ascpCMD, fileType = 'sra', destDir = getwd() )
in_acc |
character vector of SRA accessions, which should be in same SRA data type, either submission, study, sample, experiment or run. |
sra_con |
connection to the SRAmetadb SQLite database. |
ascpCMD |
ascp main commands, which should be constructed by a user according to the actual installation of Aspera Connect in the system, with proper options to be used. Example commands: "ascp -QT -l 300m -i /usr/local/aspera/connect/etc/asperaweb_id_dsa.putty" (Linux) or "'/Applications/Aspera Connect.app/Contents/Resources/ascp' -QT -l 300m -i '/Applications/Aspera Connect.app/Contents/Resources/asperaweb_id_dsa.putty'" (Mac OS X). More about ascp please see the help ('ascp -h' in a shell). |
fileType |
type of SRA data files, which should be "sra", or "fastq" ('litesra' has phased out ). |
destDir |
destination directory to save downloaded files. |
This function will get fasp file sources first using funciton listSRAfile
and then download data files using function ascpR
.
A data.frame of all matched SRA accessions and ftp or fasp file addresses.
Jack Zhu <zhujack@mail.nih.gov>
http://www.asperasoft.com/
ascpR
, listSRAfile
, getSRAfile
, getFASTQinfo
, getSRAinfo
## Using the SRAmetadb demo database ## Not run: library(SRAdb) sra_dbname <- file.path(system.file('extdata', package='SRAdb'), 'SRAmetadb_demo.sqlite') sra_con <- dbConnect(dbDriver("SQLite"), sra_dbname) in_acc <- c("SRR000648","SRR000657") ascpCMD <- 'ascp -QT -l 300m -i /usr/local/aspera/connect/etc/asperaweb_id_dsa.putty' ## common ascpCMD for a system with Mac OS X: #ascpCMD <- "'/Applications/Aspera Connect.app/Contents/Resources/ascp' -QT -l 300m -i '/Applications/Aspera Connect.app/Contents/Resources/asperaweb_id_dsa.putty'" sraFiles <- ascpSRA( in_acc, sra_con, ascpCMD, fileType = 'sra', destDir=getwd() ) dbDisconnect(sra_con) ## End(Not run) ## The actual SRAmetadb sqlite database can be downloaded using function: getSRAdbFile. Warning: the actual SRAmetadb sqlite database is pretty large (> 35GB as of May, 2018) after uncompression. So, downloading and uncompressing of the actual SRAmetadb sqlite could take quite a few minutes depending on your network bandwidth. Direct links for downloading the SRAmetadb sqlite database: https://s3.amazonaws.com/starbuck1/sradb/SRAmetadb.sqlite.gz https://gbnci-abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.