ascpR: Fasp file downloading using the ascp command line program

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function downloads files by fasp protocol using Aspera's ascp command line program, which is include in Aspera Connect software (http://www.asperasoft.com/).

Usage

1
ascpR( ascpCMD, ascpSource, destDir = getwd() )

Arguments

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).

ascpSource

character vector of fasp file sources for the ascp command, e.g. era-fasp@fasp.sra.ebi.ac.uk:vol1/fastq/SRR000/SRR000648/SRR000648.fastq.gz (EBI), anonftp@ftp-trace.ncbi.nlm.nih.gov:/sra/sra-instant/reads/ByRun/sra/SRR/SRR000/SRR000657/SRR000657.sra (NCBI).

destDir

destination directory to save downloaded files.

Details

The function takes advatage of Aspera's fasp transport technology (http://www.asperasoft.com/), which provides high-speed transfering large files over the Internet. Due to complexity with options with ascp and installation difference between different systems, this funciton asks users to supply main ascp comands. Users who are not familiar with ascp command line program should have IT support personnel to install the software and constrct main ascp comands.

Value

A data.frame containing all matched SRA accessions and ftp or fasp addresses.

Author(s)

Jack Zhu <zhujack@mail.nih.gov>

References

http://www.asperasoft.com/

See Also

ascpSRA, getSRAfile, getFASTQinfo, getSRAinfo

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
if( file.exists('SRAmetadb.sqlite') ) {
## Not run: 
	library( SRAdb )
	sra_dbname <- 'SRAmetadb.sqlite'	
	sra_con <- dbConnect(dbDriver("SQLite"), sra_dbname)
	rs <- getFASTQinfo (in_acc=c("SRR000648","SRR000657"), srcType='fasp')
	
	ascpSource <- rs$fasp
	ascpCMD <- 'ascp -QT -l 300m -i /usr/local/aspera/connect/etc/asperaweb_id_dsa.putty'
	## common ascpCMD in 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'"
	
	ascpR( ascpCMD, ascpSource, destDir = getwd() )
	dbDisconnect( sra_con )

## End(Not run)
} else {
	print( "Use getSRAdbFile() to get a copy of the SRAmetadb.sqlite file  and then rerun the example" )
}

seandavi/SRAdb documentation built on May 29, 2019, 4:33 p.m.