Skip to contents

Extract Run, Distinguish RNA-seq Type, Download Fastq, Perform Read Mapping, Load Output to R.

Usage

DownloadFastq2R(
  gsm = NULL,
  acce = NULL,
  skip.gsm = NULL,
  force.type = NULL,
  star.ref = NULL,
  cellranger.ref = NULL,
  out.folder = NULL,
  timeout = 3.6e+07,
  star.path = NULL,
  cellranger.path = NULL,
  download.method = c("wget", "download.file", "ascp"),
  ascp.path = NULL,
  wget.path = NULL,
  star.paras = "--outBAMsortingThreadN 4 --twopassMode None",
  cellranger.paras = "--chemistry=auto --jobmode=local",
  localcores = 4,
  localmem = 16,
  count.col = 2
)

Arguments

gsm

GSM number. Default: NULL (use acce).

acce

GEO accession number. Default: NULL (use gsm). acce and gsm cannot be both NULL.

skip.gsm

Vector of GSM numbers to skip. Default: NULL.

force.type

Force the RNA-seq type, used when failing to automatically identify the RNA-seq type. Available value: "10x", "Smart-seq2", "bulk". If not NULL, skip automatic identification of RNA-seq type. Default: NULL.

star.ref

Path of folder containing STAR reference, used when bulk RNA-seq or Smart-seq2 scRNA-seq/mini-bulk RNA-seq. Default: NULL.

cellranger.ref

Path of folder containing 10x-compatible transcriptome reference, used when 10x Genomics scRNA-seq. Default: NULL.

out.folder

Output folder. Default: NULL (current working directory).

timeout

Maximum request time. Default: 36000000.

star.path

Path to STAR. Default: NULL (conduct automatic detection).

cellranger.path

Path to cellranger. Default: NULL (conduct automatic detection).

download.method

Method to download fastq files, chosen from "download.file", "ascp" and "wget". Default: "wget".

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

wget.path

Path to wget. Default: NULL (conduct automatic detection).

star.paras

Parameters for STAR. Default: "–outBAMsortingThreadN 4 –twopassMode None".

cellranger.paras

Parameters for cellranger. Default: "–chemistry=auto –jobmode=local".

localcores

Number of cores used, same as localcores for cellranger and runThreadN for STAR. Default: 4.

localmem

Set max GB the pipeline may request at one time. Default: 16.

count.col

Column contains used count data (2: unstranded; 3: stranded=yes; 4: stranded=reverse), use when bulk RNA-seq or Smart-seq2 scRNA-seq/mini-bulk RNA-seq. Default: 2.

Value

List of R objects.

Examples

if (FALSE) { # \dontrun{
# only bulk/Smart-seq2 RNA-seq
GSE127942.list <- DownloadFastq2R(
  acce = "GSE127942", star.ref = "/path/to/ref", out.folder = "/path/to/output",
  star.path = "/path/to/STAR", timeout = 3600000
)
# 10x Genomics scRNA-seq
GSE282929.list <- DownloadFastq2R(
  acce = "GSE282929", cellranger.ref = "/path/to/cellranger/ref",
  cellranger.path = "/path/to/cellranger",
  out.folder = "/path/to/output", timeout = 3600000
)
# mixture of 10x Genomics scRNA-seq and bulk RNA-seq
GSE305141.list <- DownloadFastq2R(
  acce = "GSE305141", skip.gsm = "SRR34932939", star.ref = "/path/to/star/ref", cellranger.ref = "/path/to/cellranger/ref",
  star.path = "/path/to/STAR", cellranger.path = "/path/to/cellranger",
  out.folder = "/path/to/output", timeout = 3600000
)
# given GSM number
GSE127942.list <- DownloadFastq2R(
  gsm = c("GSM3656922", "GSM3656923"), star.ref = "/path/to/ref", out.folder = "/path/to/output",
  star.path = "/path/to/STAR", timeout = 3600000
)
} # }