man/runSCMerge.Rd
e624033d
 % Generated by roxygen2: do not edit by hand
c7edcb60
 % Please edit documentation in R/runBatchCorrection.R
e624033d
 \name{runSCMerge}
 \alias{runSCMerge}
 \title{Apply scMerge batch effect correction method to SingleCellExperiment object}
 \usage{
64d3a71f
 runSCMerge(
   inSCE,
5e61389e
   useAssay = "logcounts",
   batch = "batch",
64d3a71f
   assayName = "scMerge",
93e2414e
   hvgExprs = "counts",
64d3a71f
   seg = NULL,
5e61389e
   kmeansK = NULL,
93e2414e
   cellType = NULL,
   BPPARAM = BiocParallel::SerialParam()
64d3a71f
 )
e624033d
 }
 \arguments{
93e2414e
 \item{inSCE}{Input \linkS4class{SingleCellExperiment} object}
e624033d
 
51f3b3a3
 \item{useAssay}{A single character indicating the name of the assay requiring
 batch correction. Default \code{"logcounts"}.}
e624033d
 
51f3b3a3
 \item{batch}{A single character indicating a field in
6fe21ae1
 \code{\link{colData}} that annotates the batches.
51f3b3a3
 Default \code{"batch"}.}
e624033d
 
51f3b3a3
 \item{assayName}{A single characeter. The name for the corrected assay. Will
93e2414e
 be saved to \code{\link{assay}}. Default \code{"scMerge"}.}
 
 \item{hvgExprs}{A single characeter. The assay that to be used for highly
 variable genes identification. Default \code{"counts"}.}
e624033d
 
51f3b3a3
 \item{seg}{A vector of gene names or indices that specifies SEG (Stably
 Expressed Genes) set as negative control. Pre-defined dataset with human and
93e2414e
 mouse SEG lists is available with \code{\link[scMerge]{segList}} or
 \code{\link[scMerge]{segList_ensemblGeneID}}. Default
51f3b3a3
 \code{NULL}, and this value will be auto-detected by default with
 \code{\link[scMerge]{scSEGIndex}}.}
e624033d
 
51f3b3a3
 \item{kmeansK}{An integer vector. Indicating the kmeans' K-value for each
 batch (i.e. how many subclusters in each batch should exist), in order to
d6c4f292
 construct pseudo-replicates. The length of \code{kmeansK} needs to be the same
51f3b3a3
 as the number of batches. Default \code{NULL}, and this value will be
 auto-detected by default, depending on \code{cellType}.}
e624033d
 
51f3b3a3
 \item{cellType}{A single character. A string indicating a field in
 \code{colData(inSCE)} that defines different cell types. Default
 \code{'cell_type'}.}
e624033d
 
93e2414e
 \item{BPPARAM}{A \linkS4class{BiocParallelParam} object specifying whether
 should be parallelized. Default \code{BiocParallel::SerialParam()}.}
e624033d
 }
 \value{
51f3b3a3
 The input \linkS4class{SingleCellExperiment} object with
 \code{assay(inSCE, assayName)} updated.
e624033d
 }
 \description{
51f3b3a3
 The scMerge method leverages factor analysis, stably expressed genes (SEGs)
 and (pseudo-) replicates to remove unwanted variations and merge multiple
e624033d
 scRNA-Seq data.
 }
 \examples{
 data('sceBatches', package = 'singleCellTK')
7494c956
 \dontrun{
93e2414e
 logcounts(sceBatches) <- log1p(counts(sceBatches))
679e2352
 sceCorr <- runSCMerge(sceBatches)
e624033d
 }
7494c956
 }
e624033d
 \references{
 Hoa, et al., 2020
 }