Learn R Programming

GREP2 (version 1.0.2)

get_fastq: Download fastq files

Description

get_fastq downloads fastq files using SRA toolkit. We recommend using Aspera for fast downloading. You need to install Aspera for using ascp option.

Usage

get_fastq(srr_id, library_layout = c("SINGLE", "PAIRED"),
  use_sra_file = FALSE, sra_files_dir = NULL, n_thread, destdir)

Arguments

srr_id

SRA run accession ID.

library_layout

layout of the library used. Either 'SINGLE' or 'PAIRED'.

use_sra_file

logical, whether to use downloaded SRA files to get fastq files or directly download fastq files.

sra_files_dir

directory where SRA files are saved. If you use use_sra_file=FALSE then sra_files_dir=NULL.

n_thread

number of cores to use.

destdir

directory where all the results will be saved.

Value

A single fastq file will be generated for SINGLE end reads and two files for PAIRED end reads.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
get_fastq(srr_id="SRR5890521",library_layout="SINGLE",
use_sra_file=FALSE,sra_files_dir=NULL,n_thread=2,
destdir=tempdir())
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab