convertClusterLegend: Convert clusterLegend into useful formats

Description Usage Arguments Details Value

Description

Function for converting the information stored in the clusterLegend slot into other useful formats.

Usage

1
2
3
4
## S4 method for signature 'ClusterExperiment'
convertClusterLegend(object,
  output = c("plotAndLegend", "aheatmapFormat", "matrixNames",
  "matrixColors"))

Arguments

object

a ClusterExperiment object.

output

character value, indicating desired type of conversion.

Details

convertClusterLegend pulls out information stored in the clusterLegend slot of the object and returns it in useful format.

Value

If output="plotAndLegend", "convertClusterLegend" will return a list that provides the necessary information to color samples according to cluster and create a legend for it:

  • "colorVector" A vector the same length as the number of samples, assigning a color to each cluster of the primaryCluster of the object.

  • "legendNames" A vector the length of the number of clusters of primaryCluster of the object giving the name of the cluster.

  • "legendColors" A vector the length of the number of clusters of primaryCluster of the object giving the color of the cluster.

If output="aheatmap" a conversion of the clusterLegend to be in the format requested by aheatmap. The column 'name' is used for the names and the column 'color' for the color of the clusters.

If output="matrixNames" or "matrixColors" a matrix the same dimension of clusterMatrix(object), but with the cluster color or cluster name instead of the clusterIds, respectively.



clusterExperiment documentation built on May 20, 2017, 10:26 p.m.
Search within the clusterExperiment package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.