View source: R/combine_analyses.R
plotOverlay | R Documentation |
This function returns a list of plots or one plot, displaying the localization of spots, objects in groups of cells - either as projections, demographs or as histograms.
plotOverlay(meshdata,
spotdata,
objectdata,
by="both",
type="all",
quantiles = 1,
quantiles_by = "max_um",
equal_groups=TRUE,
mag,
objectcolor=c("#E69F00", "#56B4E9", "#009E73", "#F0E442"),
spotcolor = c("#0072B2", "#D55E00", "#CC79A7", "000000"),
histogram_outline = NA,
his_scales = "free",
transparency = 0.05,
meshcolor = "black",
dotsize=1,
summaryquant = FALSE)
meshdata |
A |
spotdata |
A |
objectdata |
A |
by |
Either "both", "channel" or "condition", indicating which variables are to be plotted. |
type |
The type of output plot. Options are: "histogram", "length", "width", "projection" or "all". Examples of each plot are given below. |
quantiles |
When "projection" or "all" is chosen, the cells can be split into groups by |
quantiles_by |
see |
equal_groups |
when set to TRUE, the number of cells in each group is equal (for instance, 3 equally-sized groups grouped by size). when set to FALSE, the cells are grouped by bin (for instance, from 0-1 micron, from 1-2 micron and from 2-3 micron). |
mag |
magnification convertion factor, needed when cell values are not yet converted to microns. See |
objectcolor |
Indicates the color(s) of the objects (if included). Default colorset is a range of 4 colors ("#E69F00", "#56B4E9", "#009E73" and "#F0E442"). |
spotcolor |
Indicates the color(s) of the spot data (if included). Default colorset is a range of 4 colors ("#0072B2", "#D55E00", "#CC79A7" and "000000"). |
histogram_outline |
By default, the histograms displayed have no outlines. Indicate a hex value or a colorname to change this. |
his_scales |
Inherited from ggplot2::geom_facet_grid(): when cells are grouped into different groups, by default, the histograms y-axis is scaled free per group. Setting |
transparency |
Change this value to set the transparency of the plotted objects. |
meshcolor |
By defaults, the cells are black. change this here. |
dotsize |
Change this value to change the size of the plotted spots. |
summaryquant |
To receive a summary of each quantile (defined by quantiles_by) with the projection, set this to TRUE. |
A plot or a list of plots:
histogram |
Histogram plot of the localization distribution, if |
length |
Dotplot showing the localization of the spots and/or objects on the cell's length axis on the y-axis, and the cells ordered by cell length on the x-axis. |
width |
Dotplot showing the localization of the spots and/or objects on the cell's width axis on the y-axis, and the cells ordered by cell length on the x-axis. |
projection |
Cell projections showing the relative object localization, spot localization and cell shape; if |
Renske van Raaphorst
## Not run:
##get data from BactMAP examples: https://veeninglab.com/f/examples_datasets.zip
#condition one: wild type
load("VanFL_objWT")
load("VanFL_meshWT")
load("VanFL_objDM")
load("VanFL_meshDM")
comboMesh <- combineDataframes( list(VanFL_meshWT, VanFL_meshDM),
listofconditions=list("WildType", "DeltaMapZ"))
comboObjects <- combineDataframes(list(VanFL_objWT, VanFL_objDM),
listofconditions=list("WildType", "DeltaMapZ"))
plotOverlay(meshdata=comboMesh$finalframe,
objectdata=comboObjects$finalframe,
by="condition",
quantiles=4,
type="projection")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.