plot_percent_cells_positive | R Documentation |
@description Accepts a subset cell_data_set and the parameter
group_cells_by
, used for dividing cells into groups. Returns one or
more bar graphs (one graph for each gene in the cell_data_set). Each graph
shows the percentage (or number) of cells that express a gene in each
sub-group in the cell_data_set.
plot_percent_cells_positive(
cds_subset,
group_cells_by = NULL,
min_expr = 0,
nrow = NULL,
ncol = 1,
panel_order = NULL,
plot_as_count = FALSE,
label_by_short_name = TRUE,
normalize = TRUE,
plot_limits = NULL,
bootstrap_samples = 100,
conf_int_alpha = 0.95
)
cds_subset |
Subset cell_data_set to be plotted. |
group_cells_by |
the cell attribute (e.g. the column of colData(cds)) to group cells by on the horizontal axis. If NULL, all cells plotted as one group. |
min_expr |
the minimum (untransformed) expression level to consider the gene 'expressed'. Default is 0. |
nrow |
the number of panels per row in the figure. |
ncol |
the number of panels per column in the figure. |
panel_order |
the order in which genes should be laid out
(left-to-right, top-to-bottom). Should be gene_short_name if
|
plot_as_count |
Logical, whether to plot as a count of cells rather than a percent. Default is FALSE. |
label_by_short_name |
label figure panels by gene_short_name (TRUE) or feature id (FALSE). Default is TRUE. |
normalize |
Logical, whether or not to normalize expression by size factor. Default is TRUE. |
plot_limits |
A pair of number specifying the limits of the y axis. If
|
bootstrap_samples |
The number of bootstrap replicates to generate when plotting error bars. Default is 100. |
conf_int_alpha |
The size of the confidence interval to use when plotting error bars. Default is 0.95. |
a ggplot2 plot object
cds <- load_a549()
cds_subset <- cds[row.names(subset(rowData(cds),
gene_short_name %in% c("NDRG4", "HBG2"))),]
plot_percent_cells_positive(cds_subset, group_cells_by="culture_plate")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.