convertClusterLegend: Convert clusterLegend into useful formats

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:

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.


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

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