Pipe FASTQ files to SeuratObject and DESeqDataSet.
Usage
Fastq2R(
sample.dir,
ref,
method = c("CellRanger", "STAR"),
localcores = 4,
localmem = 16,
out.folder = NULL,
st.path = NULL,
st.paras = "--chemistry=auto --jobmode=local",
merge = TRUE,
count.col = 2,
meta.data = NULL,
fmu = NULL
)Arguments
- sample.dir
Vector of path to samples (contain fastq files), e.g. c("path/to/GSM1111", "path/to/GSM2222","path/to/GSM3333").
- ref
Path of folder containing 10x-compatible transcriptome
RunCellRangerSTARRunSTARreference.- method
Mapping methods, choose from CellRanger (10x Genomics) and STAR (Smart-seq2 or bulk RNA-seq). Default: CellRanger.
- localcores
The max cores/thread used
RunCellRanger/RunSTAR. Default: 4.- localmem
The max memory (GB) used
RunCellRanger. Default: 16.- out.folder
Output folder. Default: NULL (current working directory).
- st.path
Path to
STARorcellranger. Default: NULL (conduct automatic detection).- st.paras
Parameters for
STARorcellranger. Default: "–chemistry=auto –jobmode=local".- merge
Logical, whether to merge the SeuratObjects, use when
methodis CellRanger. Default: TRUE.- count.col
Column contains used count data (2: unstranded; 3:
stranded=yes; 4:stranded=reverse), use whenmethodis STAR. Default: 2.- meta.data
Dataframe contains sample information for DESeqDataSet, use when
methodis STAR. Default: NULL.- fmu
Column of
meta.datacontains group information. Default: NULL.
Examples
if (FALSE) { # \dontrun{
# run CellRanger (10x Genomics)
# the sample.dir (can be a vector) corresponding to sra.folder/GSMXXXX (SplitSRA) or out.folder/GSMXXXX (DownloadFastq)
seu <- Fastq2R(
sample.dir = "/path/to/fastq",
ref = "/path/to/10x/ref",
method = "CellRanger",
out.folder = "/path/to/results",
st.path = "/path/to/cellranger"
)
# run STAR (Smart-seq2 or bulk RNA-seq)
# the sample.dir (can be a vector) corresponding to sra.folder/GSMXXXX (SplitSRA) or out.folder/GSMXXXX (DownloadFastq)
deobj <- Fastq2R(
sample.dir = "/path/to/fastq",
ref = "/path/to/star/ref",
method = "STAR",
out.folder = "/path/to/results",
st.path = "/path/to/STAR",
st.paras = "--outBAMsortingThreadN 4 --twopassMode None"
)
} # }