splicejac.plot.sankey_plots
functions for Sankey diagrams
Module Contents
Functions
|
Plot a Sankey diagram of the top transition genes involved in different cell state transitions |
- splicejac.plot.sankey_plots.tg_bif_sankey(adata, start, end, gene_colormap=plt.cm.Set3.colors, width=400, height=600, font_size=15, pad=0, thickness=40, label_columns=True, showfig=True, savefig=None, format='pdf')
Plot a Sankey diagram of the top transition genes involved in different cell state transitions
More details about static export of images in python can be found at: https://plotly.com/python/static-image-export/ More details about the arguments of plotly objects can be fount at: https://plotly.com/python/graph-objects/
- adata: ~anndata.AnnData
count matrix
- start: str
starting cell state
- end: list
list of final cell states
- gene_colormap: pyplot colormap (default: plt.cm.Set3.colors)
Colormap for transition genes on the left side of the Sankey diagram. To use another colormap, provide argument following the same syntax: plt.cm. + chosen_colormap + .colors. A list of accepted colormaps can be found at: https://matplotlib.org/stable/tutorials/colors/colormaps.html
- width: int (default=400)
width of plotly figure
- height: int (default=600)
height of plotly figure
- font_size: int (default: 15)
font size of figure
- pad: float (default: 0)
vertical gap between nodes of the Sankey plot
- thickness: float (default: 40)
line thickness of the Sankey plot
- label_columns: Bool (default=True)
if True, label the diagram columns
- showfig: Bool (default=True)
if True, show the figure
- savefig: Bool or None (default=None)
if True, save the figure using the savefig path
- format: str (default=’pdf’)
format of saved figure
None