plot_genes_violin | R Documentation |
Accepts a subset of a cell_data_set and an attribute to group cells by, and produces a ggplot2 object that plots the level of expression for each group of cells.
plot_genes_violin(
cds_subset,
group_cells_by = NULL,
min_expr = 0,
nrow = NULL,
ncol = 1,
panel_order = NULL,
label_by_short_name = TRUE,
normalize = TRUE,
log_scale = TRUE,
pseudocount = 0
)
cds_subset |
Subset cell_data_set to be plotted. |
group_cells_by |
NULL of the cell attribute (e.g. the column of colData(cds)) to group cells by on the horizontal axis. If NULL, all cells are plotted together. |
min_expr |
the minimum (untransformed) expression level to be plotted. 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
|
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. |
log_scale |
Logical, whether or not to scale data logarithmically. Default is TRUE. |
pseudocount |
A pseudo-count added to the gene expression. Default is 0. |
a ggplot2 plot object
cds <- load_a549()
cds_subset <- cds[row.names(subset(rowData(cds),
gene_short_name %in% c("ACTA1", "ID1", "CCNB2"))),]
plot_genes_violin(cds_subset, group_cells_by="culture_plate", ncol=2,
min_expr=0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.