Condition specification allows two methods:
1. Index level selection. Arguments index1
and index2
will be
used.
2. Annotation level selection. Arguments class
, classGroup1
and
classGroup2
will be used.
runMAST( inSCE, useAssay = "logcounts", index1 = NULL, index2 = NULL, class = NULL, classGroup1 = NULL, classGroup2 = NULL, analysisName, groupName1, groupName2, covariates = NULL, onlyPos = FALSE, log2fcThreshold = NULL, fdrThreshold = 0.05, overwrite = FALSE, check_sanity = TRUE )
inSCE | SingleCellExperiment inherited object. |
---|---|
useAssay | character. A string specifying which assay to use for MAST.
The assay should be a log-transformed normalized assay. Default
|
index1 | Any type of indices that can subset a
SingleCellExperiment inherited object by cells. Specifies
which cells are of interests. Default |
index2 | Any type of indices that can subset a
SingleCellExperiment inherited object by cells. specifies
the control group against those specified by |
class | A vector/factor with |
classGroup1 | a vector specifying which "levels" given in |
classGroup2 | a vector specifying which "levels" given in |
analysisName | A character scalar naming the DEG analysis. Required |
groupName1 | A character scalar naming the group of interests. Required. |
groupName2 | A character scalar naming the control group. Required. |
covariates | A character vector of additional covariates to use when
building the model. All covariates must exist in
|
onlyPos | Whether to only output DEG with positive log2_FC value.
Default |
log2fcThreshold | Only out put DEGs with the absolute values of log2FC
greater than this value. Default |
fdrThreshold | Only out put DEGs with FDR value less than this
value. Default |
overwrite | A logical scalar. Whether to overwrite result if exists.
Default |
check_sanity | Logical scalar. Whether to perform MAST's sanity check
to see if the counts are logged. Default |
The input SingleCellExperiment object with
metadata(inSCE)$diffExp
updated with the results: a list named by
analysisName
, with $groupNames
containing the naming of the
two conditions, $useAssay
storing the assay name that was used for
calculation, $select
storing the cell selection indices (logical) for
each condition, $result
storing a data.frame
of
the DEGs summary, and $method
storing "MAST"
.
data(scExample, package = "singleCellTK") sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'") sce <- scaterlogNormCounts(sce[,seq(20)], assayName = "logcounts") sce <- runMAST(inSCE = sce, groupName1 = "Sample1", groupName2 = "Sample2", index1 = seq(10), index2 = seq(11,20), analysisName = "MAST")#>#> #>#>#>#>#>#> #>