troutpy.pl.top_bottom_probes#
- troutpy.pl.top_bottom_probes(sdata, metric, top_n=10, bottom_n=10, title=None, figures_path='', save=False, custom_plot_filename='', palette='Blues')#
Plot a horizontal bar chart of the top and bottom genes for a metric.
Bars are colored based on whether the gene is a control probe or not.
- Parameters:
sdata (
SpatialData) – SpatialData object that contains anxrna_metadatatable with avarDataFrame.metric (
str) – The metric to sort genes by. Must be a column insdata["xrna_metadata"].var.top_n (
int(default:10)) – Number of top genes to display.bottom_n (
int(default:10)) – Number of bottom genes to display.figures_path (
str(default:'')) – Directory path to save the figure.save (
bool(default:False)) – Whether to save the figure.custom_plot_filename (
str(default:'')) – Custom filename for saving the plot.palette (
str(default:'Blues')) – Color palette name, resolved viatroutpy.pl.get_palette(). Falls back to a Matplotlib colormap, then to grey/black, if neither is found.
- Return type:
- Returns:
None