Pipe FASTQ files to SeuratObject and DESeqDataSet.
Usage
Fastq2R(
sample.dir,
ref,
method = c("CellRanger", "STAR"),
localcores = 4,
localmem = 16,
thread = 4,
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
Directory contains all samples.
- ref
Path of folder containing 10x-compatible transcriptome
RunCellRanger
STARRunSTAR
reference.- method
Mapping methods, choose from CellRanger (10x Genomics) and STAR (Smart-seq2 or bulk RNA-seq). Default: CellRanger.
- localcores
The max cores used
RunCellRanger
. Default: 4.- localmem
The max memory (GB) used
RunCellRanger
. Default: 16.- thread
The number of threads to use
RunSTAR
. Default: 4.- out.folder
Output folder. Default: NULL (current working directory).
- st.path
Path to
STAR
orcellranger
. Default: NULL (conduct automatic detection).- st.paras
Parameters for
STAR
orcellranger
. Default: "--chemistry=auto --jobmode=local".- merge
Logical, whether to merge the SeuratObjects, use when
method
is CellRanger. Default: TRUE.- count.col
Column contains used count data (2: unstranded; 3:
stranded=yes
; 4:stranded=reverse
), use whenmethod
is STAR. Default: 2.- meta.data
Dataframe contains sample information for DESeqDataSet, use when
method
is STAR. Default: NULL.- fmu
Column of
meta.data
contains group information. Default: NULL.
Examples
if (FALSE) {
# run CellRanger (10x Genomics)
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)
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"
)
}