Learn R Programming

GREP2 (version 1.0.2)

get_srr: Download SRA run files

Description

get_srr downloads SRA files using Aspera or FTP. We recommend using Aspera for fast downloading. You need to install Aspera for using ascp option.

Usage

get_srr(srr_id, destdir, ascp, prefetch_workspace, ascp_path)

Arguments

srr_id

SRA run accession ID.

destdir

directory where all the results will be saved.

ascp

logical, whether to use Aspera for downloading SRA files.

prefetch_workspace

directory where SRA run files will be downloaded. This parameter is needed if ascp=TRUE. The location of this directory can be found by going to the aspera directory (/.aspera/connect/bin/) and typing 'vdb-config -i'. A new window will pop-up and under the 'Workspace Name', you will find the location. Usually the default is '/home/username/ncbi/public'.

ascp_path

path to the Aspera software.

Value

SRA run accession file with extension ".sra". If you use ascp=TRUE, then downloaded files will be saved under '/prefetch_workspace/sra' directory. If ascp=FALSE, then files will be saved in the 'destdir'

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
get_srr(srr_id="SRR5890521", destdir=tempdir(),ascp=FALSE,
prefetch_workspace=NULL, ascp_path=NULL)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab