Split SRA to fastq Files and Format to 10x Standard Style.
Usage
SplitSRA(
sra.folder = NULL,
sra.path = NULL,
fastq.type = c("10x", "other"),
split.cmd.path = NULL,
sratools.path = NULL,
split.cmd.paras = NULL,
split.cmd.threads = NULL,
format.10x = TRUE,
remove.raw = FALSE
)
Arguments
- sra.folder
Folder contains all sras, obtained from
DownloadSRA
. Default: NULL.- sra.path
Paths of sras.
sra.folder
andsra.path
cannot be both NULL. Default: NULL.- fastq.type
The source of fastq files, choose from 10x (use
--split-files
to split sra) or other (use--split-3
to split sra). Default: 10x.- split.cmd.path
The full command path used to split, can be path to parallel-fastq-dump, fasterq-dump and fastq-dump. Default: NULL (conduct automatic detection).
- sratools.path
Path to sratoolkit bin. When
split.cmd.path
is path to parallel-fastq-dump, it requires sratoolkit. Default: NULL (conduct automatic detection).- split.cmd.paras
Parameters for
split.cmd.path
. Default: NULL.- split.cmd.threads
Threads, used when
split.cmd.path
is path to parallel-fastq-dump or fasterq-dump. Default: NULL (1).- 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.10x
is TRUE. Default: FALSE.
Examples
if (FALSE) {
# need users to provide the prefetch.path, sra.folder, split.cmd.path, sratools.path and out.folder
GSE186003.runs <- ExtractRun(acce = "GSE186003", platform = "GPL24247")
GSE186003.down <- DownloadSRA(
gsm.df = GSE186003.runs, prefetch.path = "/path/to/prefetch",
out.folder = "/path/to/output"
)
GSE186003.split <- SplitSRA(
sra.folder = "/path/to/output",
split.cmd.path = "/path/to/parallel-fastq-dump",
sratools.path = "/path/to/sra/bin", fastq.type = "10x",
split.cmd.threads = 4
)
}