-
Notifications
You must be signed in to change notification settings - Fork 22
pyNBS.pyNBS_plotting.plot_cc_map
Justin Huang edited this page Jan 27, 2018
·
2 revisions
This function plots the co-clustering map, which is a visual representation of the outputs from the consensus_hclust_hard
function. Examples of what the co-clustering map image looks like can be found in the example Jupyter notebooks described here.
plot_cc_map(
cc_table, linkage, row_color_map=None, col_color_map=None, verbose=True, **save_args
)
-
cc_hard_sim_table (required, pandas.DataFrame): The patient-by-patient co-clustering matrix. This is the
cc_hard_sim_table
output of theconsensus_hclust_hard
function. The co-clustering proportions in this matrix color the main grid of the co-clustering map. -
Z (required, numpy.ndarray): This is a linkage map of patients. This is the
Z
output of theconsensus_hclust_hard
function. This linkage map is used to construct the dendrogram on the top of the co-clustering map figure. -
row_color_map (optional, pandas.Series, default=None): A mapping of each patient/sample to an RGB color. If passed, this parameter will generate a color bar along the rows of the co-clustering map indicating by color which cluster each patient for the clustering defined by the name of the pandas Series. This color map can be generated by the
cluster_color_assign
function. -
col_color_map (optional, pandas.Series, default=None): A mapping of each patient/sample to an RGB color. If passed, this parameter will generate a color bar along the columns of the co-clustering map indicating by color which cluster each patient for the clustering defined by the name of the pandas Series. This color map can be generated by the
cluster_color_assign
function. - verbose (optional, bool, default=True): Verbosity flag to indicate when the function is done running.
-
**save_args (optional, dict, default=None): Dictionary of strings for saving results.
-
save_args['outdir']
: A string containing the directory path of which to save the co-clustering map. If this parameter is given within **save_args, the function will automatically write the co-clustering map as a .png to this location. -
save_args['job_name']
: A string containing a file prefix for the co-clustering map saved insave_args['outdir']
. Otherwise the base file name will default tocc_map.png
. Thejob_name
will also show up in the title of the plot.
-
- None: This function does not return anything, it will only plot the co-clustering map and save it to file.
This function is only currently produces .png files. Other image file extensions are not currently supported.