pyani.pyani_graphics.sns package¶
Module contents¶
Code to implement Seaborn graphics output for ANI analyses.
-
pyani.pyani_graphics.sns.
add_labels
(fig, params)[source]¶ Add labels to Seaborn heatmap axes, in-place.
Parameters: - fig –
- params –
-
pyani.pyani_graphics.sns.
distribution
(dfr, outfilename, matname, title=None)[source]¶ Return seaborn distribution plot for matrix.
Parameters: - drf – DataFrame with results matrix
- outfilename – Path to output file for writing
- matname – str, type of matrix being plotted
- title – str, optional title
-
pyani.pyani_graphics.sns.
get_clustermap
(dfr, params, title=None, annot=True)[source]¶ Return a Seaborn clustermap for the passed dataframe.
Parameters: - dfr –
- params –
- title – str, plot title
- annot – Boolean, add text for cell values?
-
pyani.pyani_graphics.sns.
get_colorbar
(dfr, classes)[source]¶ Return a colorbar representing classes, for a Seaborn plot.
Parameters: - dfr –
- classes –
The aim is to get a pd.Series for the passed dataframe columns, in the form: 0 colour for class in col 0 1 colour for class in col 1 … colour for class in col … n colour for class in col n
-
pyani.pyani_graphics.sns.
heatmap
(dfr, outfilename=None, title=None, params=None)[source]¶ Return seaborn heatmap with cluster dendrograms.
Parameters: - dfr – pandas DataFrame with relevant data
- outfilename – path to output file (indicates output format)
- title –
- params –
-
pyani.pyani_graphics.sns.
scatter
(dfr1, dfr2, outfilename=None, matname1='identity', matname2='coverage', title=None, params=None)[source]¶ Return seaborn scatterplot.
Parameters: - dfr1 – pandas DataFrame with x-axis data
- dfr2 – pandas DataFrame with y-axis data
- outfilename – path to output file (indicates output format)
- matname1 – name of x-axis data
- matname2 – name of y-axis data
- title – title for the plot
- params – a list of parameters for plotting: [colormap, vmin, vmax]