This function will generate a combination of plots basing on the correction done by SoupX. For each sample, there will be a UMAP with cluster labeling, followed by a number of UMAPs showing the change in selected top markers. The cluster labeling is what should be used for SoupX to estimate the contamination. The Soup Fraction is calculated by subtracting the gene expression value of the output corrected matrix from that of the original input matrix, and then devided by the input.
plotSoupXResults(
inSCE,
sample = NULL,
background = FALSE,
reducedDimName = NULL,
plotNCols = 3,
plotNRows = 2,
baseSize = 8,
combinePlot = c("all", "sample", "none"),
xlab = NULL,
ylab = NULL,
dim1 = NULL,
dim2 = NULL,
labelClusters = FALSE,
clusterLabelSize = 3.5,
defaultTheme = TRUE,
dotSize = 0.5,
transparency = 1,
titleSize = NULL,
axisLabelSize = NULL,
axisSize = NULL,
legendSize = NULL,
legendTitleSize = NULL
)
A SingleCellExperiment object. With
runSoupX
already applied.
Character vector. Indicates which sample each cell belongs to.
Default NULL
.
Logical. Whether background
was applied when
running runSoupX
. Default FALSE
.
Character. The embedding to use for plotting. Leave it
NULL
for using the sample-specific UMAPs generated when running
runSoupX
. Default NULL
.
Integer. Number of columns for the plot grid per sample.
Will determine the number of top markers to show together with
plotNRows
. Default 3
.
Integer. Number of rows for the plot grid per sample. Will
determine the number of top markers to show together with plotNCols
.
Default 2
.
Numeric. The base font size for all text. Default 12. Can be
overwritten by titleSize, axisSize, and axisLabelSize, legendSize,
legendTitleSize. Default 8
.
Must be either "all"
, "sample"
, or
"none"
. "all"
will combine all plots into a single
.ggplot
object, while "sample"
will output a list of plots
separated by sample. Default "all"
.
Character vector. Label for x-axis. Default NULL
.
Character vector. Label for y-axis. Default NULL
.
See plotSCEDimReduceColData
. Default NULL
.
See plotSCEDimReduceColData
. Default NULL
.
Logical. Whether the cluster labels are plotted. Default
FALSE
.
Numeric. Determines the size of cluster label when
labelClusters
is set to TRUE
. Default 3.5
.
Logical. Adds grid to plot when TRUE
. Default
TRUE
.
Numeric. Size of dots. Default 0.5
.
Numeric. Transparency of the dots, values will be from 0
to 1. Default 1
.
Numeric. Size of title of plot. Default 15
.
Numeric. Size of x/y-axis labels. Default NULL
.
Numeric. Size of x/y-axis ticks. Default NULL
.
Numeric. Size of legend. Default NULL
.
Numeric. Size of legend title. Default NULL
.
ggplot object of the combination of UMAPs. See description.
data(scExample, package = "singleCellTK")
sce <- subsetSCECols(sce, colData = "type != 'EmptyDroplet'")
if (FALSE) {
# SoupX does not work for toy example,
# can be tested with `sce <- importExampleData("pbmc3k")`
sce <- runSoupX(sce, sample = "sample")
plotSoupXResults(sce)
}