View source: R/plotFeatureQC.R
plotFeatureQC | R Documentation |
Plotting functions for spatial transcriptomics data.
plotFeatureQC(
spe,
plot_type = c("histogram", "violin"),
x_metric = NULL,
annotate = NULL,
n_bins = 100,
point_size = 0.1,
scale_log1p = TRUE
)
spe |
Input data, assumed to be a |
plot_type |
Type of QC plot. Options are "histogram" and "violin". See Details for additional details. |
x_metric |
Name of column in |
annotate |
Name of column in |
n_bins |
Number of bins for histograms. Default = 100. Optional argument used for histograms. |
point_size |
Point size. Default = 0.1. Optional argument for violin plots. |
scale_log1p |
Whether to log1p-scale axes. Default = TRUE. |
Function to create quality control (QC) plots for spatial transcriptomics data.
The following types of QC plots are available for feature-level QC (see
plotSpotQC
for spot-level or cell-level QC):
Histogram (plot_type = "histogram"
) for a single QC metric, e.g.
total UMI counts across all spots per feature. The histogram can optionally
highlight selected features, e.g. low abundance features.
Violin (plot_type = "violin"
) for a single QC metric, e.g. total
UMI counts across all spots per feature. The violin plot can optionally
highlight selected features, e.g. low abundance features.
Returns a ggplot object, which may be further modified using ggplot functions.
Yixing E. Dong and Lukas M. Weber
library(STexampleData)
spe <- Visium_humanDLPFC()
rowData(spe)$feature_sum <- rowSums(counts(spe))
rowData(spe)$low_abundance <- rowSums(counts(spe) > 0) < 20
plotFeatureQC(spe, plot_type = "histogram",
x_metric = "feature_sum", annotate = "low_abundance")
plotFeatureQC(spe, plot_type = "violin",
x_metric = "feature_sum", annotate = "low_abundance")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.