plotRaw | R Documentation |
To check segmentation, view TIFF images and/or show the localization of spots inside cells. ggplot2-based, so other geoms and theme layers can be added.
plotRaw(tiffdata,
meshdata,
spotdata,
frameN = 1,
xrange,
yrange,
viridisoption = "inferno",
meshcolor = "white",
spotcolor = "yellow",
valuerange,
legend=FALSE)
tiffdata |
(list of) dataframe(s) containing *x* and *y* coordinates of pixels and their *values*. Can be generated by loading a TIFF into R using bactMAP::extr_OriginalStack() |
meshdata |
dataframe containing (at least) *X* and *Y* coordinates of cells outlines, the *frame* number of the image and *cell* numbers. |
spotdata |
dataframe containing (at least) *x* and *y* coordinates of spots and the *frame* number of the image. |
frameN |
number of the frame to be displayed. default = 1. |
xrange |
vector with minimum and maximum x coordinates to be displayed (by default all is shown). |
yrange |
vector with minimum and maximum y coordinates to be displayed (by default all is shown). |
viridisoption |
one of the viridis color scale options (default = "inferno") for the displayed TIFF. options: "magma", "viridis", "cividis", "plasma" and "inferno" |
meshcolor |
color of the cell outlines. default = "white" |
spotcolor |
color for displayed spots. default = "yellow" |
valuerange |
vector with minumum and maximum pixel values to show TIFF, use this option to increase contrast |
legend |
displays a figure legend when legend==TRUE |
A plot showing either a TIFF, mesh outlines, spot coordinates or a combination of the three.
Renske van Raaphorst
extr_Original
, viridis
## Not run:
#load TIF image from BactMAP examples. go to veeninglab.com/bactmap to download.
TIF_image <- file.choose()
#use extr_-function to turn into list of dataframes
TIF_df <- bactMAP::extr_OriginalStack(TIF_image)
#plot image
plotRaw(TIF_image)
require(ggplot2)
#zoom in and add title
plotRaw(TIF_image, xrange=(c(200,500)), yrange=c(400,600)) + ggplot2::ggtitle("This is a TIF image")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.