Plotting Markers

Description

The method beeswarm for MarkerList objects draws, separately for each cell-type, a stripchart of the markers' expression values in a reference data, highlighting the expression of their respective associated -- generally pure -- samples.

The method stripchart.MarkerList is an alias for beeswarm.MarkerList.

profplot is vectorised over arguments scale and legend.

screeplot plots the following diagnostic plots:

  • for marker lists with associated scores, it plots the total number of markers whose values are over/under a range of threshold, as well as, optionally their distribtuion amongst the different cell types;
  • a screeplot of the condition number of a deconvolution matrix for a varying (increasing) number of markers.

hist plots the histogram of numeric scores associated with each marker in a marker list, if any.

Usage

S3 (MarkerList)
`beeswarm`(x, data, types = NULL, tcol = "red", otcol = "#00000090", las = 2, 
  fold = FALSE, method = "square", corral = "wrap", pch = 19, pwcol = NULL, ylab = if (fold) "Fold changes" else "Expression values", 
      ...)

S3 (MarkerList)
`stripchart`(x, data, types = NULL, tcol = "red", otcol = "#00000090", 
      las = 2, fold = FALSE, method = "square", corral = "wrap", pch = 19, pwcol = NULL, 
      ylab = if (fold) "Fold changes" else "Expression values", ...)

S3 (MarkerList)
`profplot`(x, y, groups = NULL, scale = FALSE, col = NULL, legend = FALSE, 
      split = TRUE, ylab = NA, labels = NULL, ..., restore.gpar = TRUE)

S3 (MarkerList)
`screeplot`(x, data = NULL, breakdown = FALSE, range = NULL, xlab = NULL, 
      ylab = NULL, main = NULL, ..., plot = TRUE)

S3 (MarkerList)
`hist`(x, range = NULL, split = FALSE, xlab = "Marker scores", main = "Histogram of marker scores", 
      ..., restore.gpar = TRUE)

Arguments

x
an object of class MarkerList
data
a numeric matrix or an ExpressionSet object containing expression values from samples.
types
a factor giving the cell-type of each sample
tcol
type colour, used for the marker values in samples of their corresponding types.
otcol
out-of-type colour, used for maker values in samples that are not from their corresponding type.
las
specifies the orientation of the y-labels: 1 for horizontal, 2 for vertical. See par.
fold
logical that indicates if the plot should show the markers' plain expression values or their fold change against the maximum expression value in samples from other types.
...
extra parameters passed to subsequent calls to beeswarm, matplot, barplot, hist or plot, depending on the main calling function.
y
reference data matrix, that contains the marker expression values that are plotted.
groups
factor coercible vector that defines groups of samples, which are plotted using different point types.
scale
when split=FALSE, this is a logical that indicates if the marker expression profiles should be scaled into relative contribution (i.e., sum up to one), as in profplot. When split is not FALSE, then scale=TRUE indicates that the profiles should be normalised with the mean expression profile of all markers. If a single numeric, then it indicates the index of a specific marker that is used to normalise the expression profiles of other markers. Separate indexes for each cell type can be passed as a numeric vector or a list. This is useful to highlight groups of markers that should have equivalent cell-specific expression levels, given the -- mixed -- expression data in y. These groups are likely to provide better proportion/cell-specific estimates. Note: values are recycled if necessary.
col
colour specification for each cell types if split=FALSE, or for each marker in each cell type otherwise.
split
logical that indicates if one should draw a plot for each type separately. One can specify how to split the plots, by providing a 2-long vector that is used as par(mfrow=split).
ylab
label for the y-axis. If missing, a default label is generated, which, in particular, tells if the plot is scaled or not.
restore.gpar
logical that indicates if all graphical parameters should be restored on exit. It could be used to add things to the plots, especially when split=TRUE.
breakdown
logical that indicates if breakdowns of the number of markers over the given range of values should be shown. It may also be a single numberic that indicates the number of breakdowns to show.
range
specifies the range of values to plot. In hist, or in screeplot when data=NULL, it indicates a range over which the scores are used to computing the histogram. If NULL, then all values are used (Note: this might take a bit of time for long marker lists if breakdown=TRUE). Otherwise it must be a 2-long numeric vector giving the interval of values to use. If data is not NULL, it indicates which
plot
logical that indicates if the function should effectively produce a plot or only return the result. Otherwise, if data is not NULL, then it must be either a range of values
method
Method for arranging points (see Details).
corral
Method to adjust points that would be placed outside their own group region (see Details).
pch
Plotting characters and colors, specified by group (see Details).
pwcol
“Point-wise” plotting characters and colors, specified for each data point (see Details).
labels
Labels for each group. By default, these are inferred from the data.
xlab
Axis labels.
legend
a logical that specifies whether drawing the legend or not, or coordinates specifications passed to argument x of legend, that specifies the position of the legend.
main
graphics parameters.

Value

When data=NULL and breakdown is not FALSE this function returns a list with the result from the breakdown barplot and the breakdown (in element ‘breakdown’).

When data is not NULL, a MarkerList-class object made of the set of markers that achieve the least condition number is returned.