vizGeneCounts | R Documentation |
Visualize one gene at a time.
vizGeneCounts(
df,
gene,
groups = NA,
group_cols = NA,
winsorize = 0,
size = 7,
stroke = 0.5,
alpha = 1,
plotTitle = NA,
showLegend = TRUE
)
df |
data.frame where rows are spots and columns must be at least: "x", "y" for spot positions in space and "gene" column that is counts of a gene for each spot. |
gene |
column name of the gene counts in df to be visualized |
groups |
colors the spots lines based on a group or cell layer they belong to. Needs to be a character vector in the order of the spot rows in df. Ex: c("0", "1", "0", ...) |
group_cols |
color labels for the groups. Ex: c("0" = "gray", "1" = "red") |
winsorize |
Winsorization quantile |
size |
size of the geom_points to plot (default: 7) |
stroke |
thickness of the geom_point lines to help in emphasizing groups (default: 0.5) |
alpha |
alpha value of colored pixels (default: 1) |
plotTitle |
option to add a title to the plot |
showLegend |
Boolean to show the plot legend |
a plot where each point is a pixel colored by the expression level of the selected gene
data(mOB)
pos <- mOB$pos
cd <- mOB$counts
counts <- cleanCounts(cd, min.lib.size = 100)
df <- merge(as.data.frame(pos), as.data.frame(t(as.matrix(counts))), by = 0)
vizGeneCounts(df = df, gene = "Sox11",
size = 3, stroke = 0.1, plotTitle = "Sox11",
winsorize = 0.05, showLegend = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.