Description Usage Arguments Details Value Author(s) Examples
View source: R/plotPlatePosition.R
Plots cells in their position on a plate, coloured by metadata variables or feature expression values from a SingleCellExperiment object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
object |
A SingleCellExperiment object. |
plate_position |
A character vector specifying the plate position for each cell (e.g., A01, B12, and so on, where letter indicates row and number indicates column).
If |
colour_by |
Specification of a column metadata field or a feature to colour by, see the |
size_by |
Specification of a column metadata field or a feature to size by, see the |
shape_by |
Specification of a column metadata field or a feature to shape by, see the |
by_exprs_values |
A string or integer scalar specifying which assay to obtain expression values from,
for use in point aesthetics - see the |
add_legend |
Logical scalar specifying whether a legend should be shown. |
theme_size |
Numeric scalar, see |
point_alpha |
Numeric scalar specifying the transparency of the points, see |
point_size |
Numeric scalar specifying the size of the points, see |
other_fields |
Additional cell-based fields to include in the data.frame, see |
swap_rownames |
Column name of |
This function expects plate positions to be given in a charcter format where a letter indicates the row on the plate and a numeric value indicates the column.
Each cell has a plate position such as "A01", "B12", "K24" and so on.
From these plate positions, the row is extracted as the letter, and the column as the numeric part.
Alternatively, the row and column identities can be directly supplied by setting plate_position
as a list of two factors.
A ggplot object.
Davis McCarthy, with modifications by Aaron Lun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | example_sce <- mockSCE()
example_sce <- logNormCounts(example_sce)
## define plate positions
example_sce$plate_position <- paste0(
rep(LETTERS[1:5], each = 8),
rep(formatC(1:8, width = 2, flag = "0"), 5)
)
## plot plate positions
plotPlatePosition(example_sce, colour_by = "Mutation_Status")
plotPlatePosition(example_sce, shape_by = "Treatment",
colour_by = "Gene_0004")
plotPlatePosition(example_sce, shape_by = "Treatment", size_by = "Gene_0001",
colour_by = "Cell_Cycle")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.