Sankey diagram¶
This visualization function can be launched from class DigitalCellSorter at the stage of post-processing.
From submodule VisualizationFunctions:
-
class
VisualizationFunctions
(dataName='dataName', saveDir='', matplotlibMode='Agg', safePlotting=True, verbose=1)[source] Class of visualization functions for DigitalCellSorter
-
makeSankeyDiagram
(*args, **kwargs)[source]¶ Make a Sankey diagram, also known as ‘river plot’ with two groups of nodes
- Parameters:
- df: pandas.DataFrame
With counts (overlaps)
- colormapForIndex: dictionary, Default None
Colors to use for nodes specified in the DataFrame index
- colormapForColumns: dictionary, Default None
Colors to use for nodes specified in the DataFrame columns
- linksColor: str, Default ‘rgba(100,100,100,0.6)’
Color of the non-overlapping links
- title: str, Default ‘’
Title to print on the diagram
- interactive: boolean , Default False
Whether to launch interactive JavaScript-based graph
- quality: int, Default 4
Proportional to the resolution of the figure to save
- nodeLabelsFontSize: int, Default 15
Font size for node labels
- nameAppend: str, Default ‘_Sankey_diagram’
Name to append to the figure file
- Returns:
None
- Usage:
DCS = DigitalCellSorter.DigitalCellSorter()
DCS.makeSankeyDiagram(df)
-
Example output: