Equivalent of plot_violin with a numeric x-axis.

plot_expr_by_numeric_var(
  sce,
  numeric_var = "p_tau",
  subset_var = "cluster_celltype",
  subset_group = "Oligo",
  gene = "PLP1",
  alpha = 0.05,
  size = 0.01,
  label_angle = 0
)

Arguments

sce

a SingleCellExperiment object

numeric_var

The colData variable for x-axis groups. Default is p_tau

subset_var

The colData variable to subset on

subset_group

The specific subset_var group to subset

gene

The gene of interest

alpha

point alpha

size

point size

label_angle

The angle of x-axis labels (e.g. 0, 45)

Value

p a ggplot object

Details

Generates a scatter plot of log2(counts+1) expression against numeric var. An additional plot of proportion of cells with non-zero counts per sample. Fits a linear model with confidence intervals for each plot.

See also

Other plotting functions: plot_reduced_dim(), plot_reduced_dim_gene(), plot_violin()