R/plot_decontx.R
plotDecontXMarkerExpression.Rd
Generates a violin plot that shows the counts of marker
genes in cells across specific clusters or cell types. Can be used to view
the expression of marker genes in different cell types before and after
decontamination with decontX
.
plotDecontXMarkerExpression( x, markers, groupClusters = NULL, assayName = c("counts", "decontXcounts"), z = NULL, exactMatch = TRUE, by = "rownames", log1p = FALSE, ncol = NULL, plotDots = FALSE, dotSize = 0.1 )
x | Either a SingleCellExperiment or a matrix-like object of counts. |
---|---|
markers | Character Vector or List. A character vector or list of character vectors with the names of the marker genes of interest. |
groupClusters | List. A named list that allows
cell clusters labels coded in
|
assayName | Character vector. Name(s) of the assay(s) to
plot if |
z | Character, Integer, or Vector.
Indicates the cluster labels for each cell.
If |
exactMatch | Boolean. Whether to only identify exact matches
for the markers or to identify partial matches using |
by | Character. Where to search for the markers if |
log1p | Boolean. Whether to apply the function |
ncol | Integer. Number of columns to make in the plot.
Default |
plotDots | Boolean. If |
dotSize | Numeric. Size of points if |
Returns a ggplot
object.
See decontX
for a full example of how to estimate
and plot contamination.
Shiyi Yang, Joshua Campbell