plotDecontXMarkerPercentage | R Documentation |
Generates a barplot that shows the percentage of
cells within clusters or cell types that have detectable levels
of given marker genes. Can be used to view the expression of
marker genes in different cell types before and after
decontamination with decontX
.
plotDecontXMarkerPercentage(
x,
markers,
groupClusters = NULL,
assayName = c("counts", "decontXcounts"),
z = NULL,
threshold = 1,
exactMatch = TRUE,
by = "rownames",
ncol = round(sqrt(length(markers))),
labelBars = TRUE,
labelSize = 3
)
x |
Either a SingleCellExperiment or a matrix-like object of counts. |
markers |
List. A named list indicating the marker genes
for each cell type of
interest. Multiple markers can be supplied for each cell type. For example,
|
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 |
threshold |
Numeric. Markers greater than or equal to this value will be considered detected in a cell. Default 1. |
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 |
ncol |
Integer. Number of columns to make in the plot.
Default |
labelBars |
Boolean. Whether to display percentages above each bar
Default |
labelSize |
Numeric. Size of the percentage labels in the barplot. Default 3. |
Returns a ggplot
object.
Shiyi Yang, Joshua Campbell
See decontX
for a full example of how to estimate
and plot contamination.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.