plotPCStructure: Overlay the tissue samples with corresponding support...

Description Usage Arguments Value Examples

Description

plotPCStructure plots the tissue sample rasters and overlays them with the support structure(s) used in downstream modeling.

Usage

1
2
3
4
5
plotPCStructure(structureObj, removeBackground = TRUE,
  marginProp = 0.1, titleSize = 11, supSiteSize = 3,
  supSiteLegendSize = 5, rastLegendSize = 30,
  rasterColors = c("gray75", "gray20"), supSiteColors = c("royalblue",
  "red"), plotCols = NULL)

Arguments

structureObj

An object of class structureList.

removeBackground

A TRUE/FALSE argument specifying if the background, including the x- and y-axes, should be removed.

marginProp

An argument specifying the size of the margins. It is a proportion of the largest distance from the origin to the outermost support sites. This is used to help separate plots.

titleSize

The font size of each title specifying the sample number.

supSiteSize

The size of the support point dots.

supSiteLegendSize

The size of the support sites in the legend.

rastLegendSize

The size of the rasters in the legend.

rasterColors

The color of the rasters. This is a concatenated character string that must have at least two elements. Each element specifies an accepted color in R. The plotPCStructure function uses the colorRampPalette function, which generates smooth transitions between the colors provided. If the number of colors provided is equal to the number of levels of the spatial variable, then the plotted colors will be the same as those provided. However, if the number of colors provided does not equal the number of levels of the spatial variable, then the plotted colors will be interpolated from those provided.

supSiteColors

The color of the support sites. This is a concatenated character string that must have at least two elements. The colors are generated in the same way as the rasterColors.

Value

A gridded plot of all tissue samples. If a spatial variable was provided in the estRange function, then each sample will be colored by the levels of that variable. Using a separate set of colors, the support sites will also be colored according to the levels of the spatial variable. If no spatial variable was provided, then both the sample rasters and the support sites will each be represented by a single color. The last cell in the grid of plots is the legend, showing which colors are used to represent the rasters and support sites.

Examples

1
2
3
4
5
6
7
8
9
data("TAMdata")
# The dataset is trimmed only for the speed of the example
TAMdata <- TAMdata[TAMdata$subject < 3, ]
TAMdata <- rScale(TAMdata, subjectVar = 'subject', sampleVar = 'ROI',
                  xCoord = 'x', yCoord = 'y')
rangs <- estRange(TAMdata, outcome = 'X1282.auc', spatialVar = 'TAM',
                  semivEst = 'modulus', logTransform = TRUE)
structs <- chooseStructures(rangs)
plotPCStructure(structs, supSiteSize = 1.5, marginProp = 0.25)

cammiller/imagingPC documentation built on June 28, 2019, 12:04 a.m.