View source: R/Seurat.Utils.Visualization.R
PctCellsAboveX | R Documentation |
This function calculates the percentage of cells above a specified threshold for a given feature in a Seurat object. It can subset the data based on a specified identity and values.
PctCellsAboveX(
obj = combined.obj,
feature = "TOP2A",
ident = GetNamedClusteringRuns(obj = obj, v = FALSE)[1],
threshold = 2,
suffix = ppp(substitute_deparse(obj), ncol(obj), "thr", threshold),
box = FALSE,
ident.box = NULL,
subset_ident = NULL,
subset_values = NULL,
omit.na = TRUE,
assay = "RNA",
plot = TRUE,
caption = NULL,
ylab = "% cells above threshold",
...
)
obj |
A Seurat object. Default: combined.obj. |
feature |
The feature to evaluate. |
ident |
The identity class to split the data by. Default: GetNamedClusteringRuns(obj)1. |
threshold |
The threshold value to evaluate the feature against. Default: 2. |
box |
Logical value indicating whether to plot the boxplot. Default: |
subset_ident |
The identity class to subset the data by. Default: NULL. |
subset_values |
The values of the identity class to keep in the subset. Default: NULL. |
omit.na |
Logical value indicating whether to omit NA values. Default: |
assay |
The assay to use for feature extraction. Default: 'RNA'. |
plot |
Logical value indicating whether to plot the results. Default: |
ylab |
The label for the y-axis of the plot. Default: "% cells above threshold". |
... |
Additional parameters to pass to the plotting function. |
box.ident |
The identity class to split the data by for individual dots in the boxplot. Ident will be used for the boxes displayed (matching the barplot). Default: NULL. |
A named vector with the percentage of cells above the threshold for each identity class.
## Not run:
PctCellsAboveX(obj = seurat_object, feature = "GeneA", ident = "CellType", threshold = 1.5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.