-
Notifications
You must be signed in to change notification settings - Fork 22
pyNBS.pyNBS_plotting.cluster_color_assign
Justin Huang edited this page Jan 27, 2018
·
3 revisions
This is a helper function that constructs a color map for different patient clusters. The color map can then be used to color the rows or columns of a co-clustering matrix map, as constructed by plot_cc_map
.
cluster_color_assign(
cluster_assignments, name=None
)
-
cluster_assignments (required, pandas.Series): A pandas Series with an index of all patients and values as the cluster assignments for each patient. The
cluster_assign
output from theconsensus_hclust_hard
function is an appropriate input for this parameter. -
name (optional, str, default=None): This is simply a string identifier for the cluster assignment vector passed in. It will show up as the label for on the associated row or column color bar when the resulting
cluster_cmap
is passed toplot_cc_map
-
cluster_cmap (pandas.Series): A resulting mapping of each patient to an RGB color readable by the
plot_cc_map
function for either itsrow_color_map
or itscol_color_map
parameters.
This function currently uses the default 'hls'
color palette in Seaborn. Other color mapping functions are currently not implemented.