plotZmap | R Documentation |
Plots a Z-map given a matrix of z-scores that maps onto a specified base image.
plotZmap( zmap, bgimage = "", sigma, threshold = 3, mask = NULL, decoration = T, targetpath = "zmaps", filename = "zmap", size = 512, ... )
zmap |
A matrix containing z-scores that map onto a given base image. zmap and baseimage must have the same dimensions. |
bgimage |
A matrix containing the grayscale image to use as a background. This should be either the base image or the final CI. If not this argument is not given, only the Z-map will be drawn. |
sigma |
The sigma of the smoothing that was applied to the CI to create the Z-map. |
threshold |
Integer specifying the threshold z-score (default: 3). Z-scores below the threshold will not be plotted on the z-map. |
mask |
Optional. A boolean matrix with the same dimensions as zmap. If a cell evaluates to TRUE, the corresponding zmap pixel will be masked. Can also be the filename (as a string) of a black and white PNG image to be converted to a matrix (black = masked). |
decoration |
Optional boolean specifying whether the Z-map should be plotted with margins, text (sigma, threshold) and a scale (default: TRUE). |
targetpath |
String specifying path to save the Z-map PNG to. |
filename |
Optional string to specify a file name for the Z-map PNG. |
size |
Integer specifying the width and height of the PNG image (default: 512). |
... |
Additional arguments to be passed to raster::plot. Only applied when decoration is TRUE. |
This function takes in a matrix of z-scores (as returned by generateCI) and an Rdata file containing a base image. It returns a Z-map image in PNG format.
Unlisted additional arguments will be passed to raster::plot. For example, a different color palette can be specified using the col
argument. See raster::plot for details.
Nothing. It writes a Z-map image.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.