plotClustersWorkflow,ClusterExperiment-method {clusterExperiment} | R Documentation

## A plot of clusterings specific for clusterMany and workflow visualization

### Description

A realization of `plotClusters` call specific to separating out the results of `clusterMany` and other clustering results.

### Usage

    ## S4 method for signature 'ClusterExperiment'
    plotClustersWorkflow(
      object,
      whichClusters = c("mergeClusters", "makeConsensus"),
      whichClusterMany = NULL,
      nBlankLines = ceiling(nClusterings(object) * 0.05),
      existingColors = c("ignore", "all", "highlightOnly"),
      nSizeResult = ceiling(nClusterings(object) * 0.02),
      clusterLabels = TRUE,
      clusterManyLabels = TRUE,
      sortBy = c("highlighted", "clusterMany"),
      highlightOnTop = TRUE,
      ...
    )

### Arguments

`object` | A `ClusterExperiment` object on which `clusterMany` has been run
`whichClusters` | which clusterings to "highlight", i.e draw separately from the bulk of the plot, see argument `whichClusters` of `getClusterIndex` for description of format allowed.
`whichClusterMany` | indicate which clusterings to plot in the bulk of the plot, see argument `whichClusters` of `getClusterIndex` for description of format allowed.
`nBlankLines` | the number of blank (i.e. white) rows to add between the clusterMany clusterings and the highlighted clusterings.
`existingColors` | one of "ignore","all","highlightOnly". Whether the plot should use the stored colors in the `ClusterExperiment` object given. "highlightOnly" means only the highlighted clusters will use the stored colors, not the clusterMany clusterings.
`nSizeResult` | the number of rows each highlighted clustering should take up. Increasing the number increases the thickness of the rectangles representing the highlighted clusterings.
`clusterLabels` | either logical, indicating whether to plot the labels for the clusterings identified to be highlighted in the `whichClusters` argument, or a character vector of labels to use.
`clusterManyLabels` | either logical, indicating whether to plot the labels for the clusterings from clusterMany identified in the `whichClusterMany`, or a character vector of labels to use.
`sortBy` | how to align the clusters. If "highlighted" then the highlighted clusters indicated in the argument `whichClusters` are first in the alignment done by `plotClusters`. If "clusterMany", then the clusterMany results are first in the alignment. (Note this does not determine where they will be plotted, but how they are ordered in the aligning step done by `plotClusters`)
`highlightOnTop` | logical. Whether the highlighted clusters should be plotted on the top of clusterMany results or underneath.
`...` | arguments passed to the matrix version of `plotClusters`

### Details

This plot is solely intended to make it easier to use the `plotClusters` visualization when there are a large number of clusterings from a call to `clusterMany`. This plot separates out the `clusterMany` results from a designated clustering of interest, as indicated by the `whichClusters` argument (by default clusterings from a call to `makeConsensus` or `mergeClusters`). In addition the highlighted clusters are made bigger so that they can be easily seen.

### Value

A plot is produced, nothing is returned.

### See Also

`plotClusters`, `clusterMany`

### Examples

    #clustering using pam: try using different dimensions of pca and different k
    data(simData)

    cl <- clusterMany(simData, nReducedDims=c(5, 10, 50), reduceMethod="PCA",
    clusterFunction="pam", ks=2:4, findBestK=c(TRUE,FALSE),
    removeSil=c(TRUE,FALSE), makeMissingDiss=TRUE)
    cl <- makeConsensus(cl, proportion=0.7)
    plotClustersWorkflow(cl)

[Package clusterExperiment version 2.12.0 Index]