Calculate Differential Abundance with FET
diffAbundanceFET(inSCE, cluster, variable, control, case, analysisName)
A SingleCellExperiment
object.
A single character
, specifying the name to store the
cluster label in colData
.
A single character
, specifying the name to store the
phenotype labels in colData
.
character
. Specifying one or more categories that can
be found in the vector specified by variable
.
character
. Specifying one or more categories that can
be found in the vector specified by variable
.
A single character
. Will be used for naming the
result table, which will be saved in metadata slot.
The original SingleCellExperiment
object with metadata(inSCE)
updated with a list
diffAbundanceFET
, containing a new data.frame
for the analysis
result, named by analysisName
. The data.frame
contains columns
for number and fraction of cells that belong to different cases, as well as
"Odds_Ratio", "PValue" and "FDR".
This function will calculate the cell counting and fraction by dividing all cells to groups specified by the arguments, together with statistical summary by performing Fisher Exact Tests (FET).
data("mouseBrainSubsetSCE", package = "singleCellTK")
mouseBrainSubsetSCE <- diffAbundanceFET(inSCE = mouseBrainSubsetSCE,
cluster = "tissue",
variable = "level1class",
case = "oligodendrocytes",
control = "microglia",
analysisName = "diffAbundFET")