Download FASTQ Files.
Usage
DownloadFastq(
gsm.df,
out.folder = NULL,
download.method = c("download.file", "ascp", "wget"),
quiet = FALSE,
timeout = 3600,
ascp.path = NULL,
max.rate = "300m",
parallel = TRUE,
use.cores = NULL,
wget.path = NULL,
format.10x = TRUE,
remove.raw = TRUE
)Arguments
- gsm.df
Dataframe contains GSM and Run numbers, obtained from
ExtractRun.- out.folder
Output folder. Default: NULL (current working directory).
- download.method
Method to download fastq files, chosen from "download.file", "ascp" and "wget". Default: "download.file".
- quiet
Logical value, whether to show downloading progress. Used when
download.methodis "download.file". Default: FALSE (show).- timeout
Maximum request time. Used when
download.methodis "download.file" or "wget". Default: 3600.- ascp.path
Path to ascp (/path/bin/ascp), please ensure that the relative path of asperaweb_id_dsa.openssh file (/path/bin/ascp/../etc/asperaweb_id_dsa.openssh). Default: NULL (conduct automatic detection).
- max.rate
Max transfer rate. Used when
download.methodis "ascp". Default: 300m.- parallel
Logical value, whether to download parallelly. Default: TRUE.
- use.cores
The number of cores used. Default: NULL (the minimum value of
nrow(gsm.df)andparallel::detectCores()).- wget.path
Path to wget. Default: NULL (conduct automatic detection).
- format.10x
Logical value, whether to format split fastqs to 10x standard format. Default: TRUE.
- remove.raw
Logical value, whether to remove old split fastqs (unformatted), used when
format.10xis TRUE. Default: TRUE.
Examples
if (FALSE) { # \dontrun{
GSE130636.runs <- ExtractRun(acce = "GSE130636", platform = "GPL20301")
# a small test
GSE130636.runs <- GSE130636.runs[GSE130636.runs$run %in% c("SRR9004325", "SRR9004326"), ]
# use download.file
download.file.res <- DownloadFastq(
gsm.df = gsm.df, out.folder = "/path/to/output", remove.raw = TRUE,
download.method = "download.file", parallel = TRUE, use.cores = 2
)
# use ascp
ascp.res <- DownloadFastq(
gsm.df = gsm.df, out.folder = "/path/to/output", remove.raw = TRUE,
download.method = "ascp", ascp.path = "~/.aspera/connect/bin/ascp",
parallel = TRUE, use.cores = 2
)
# use wget
wget.res <- DownloadFastq(
gsm.df = gsm.df, out.folder = "/path/to/output", remove.raw = TRUE,
download.method = "wget", wget.path = "/usr/bin/wget",
parallel = TRUE, use.cores = 2
)
} # }