webinterface.pages.base_pages.utils.metricplot module#
- webinterface.pages.base_pages.utils.metricplot.render_metric_plot(data: DataFrame, metric: str, mode: str, label: str, colorblind_mode: bool, key, plot_generator, slider_id_uuid: str = None, annotation: str = '') str | None[source]#
Displays the metric plot and returns the ProteoBench ID of the selected point (if any).
- Parameters:
data (pd.DataFrame) – The filtered dataset to plot.
metric (str) – Metric to plot (“Median” or “Mean”).
mode (str) – Mode to plot (“Species-weighted” or “Global”).
label (str) – The label for the data points.
colorblind_mode (bool) – Whether to use colorblind-safe colors.
key (str) – Unique key for the plot in the Streamlit session state.
plot_generator (PlotGeneratorBase) – The plot generator instance for the module.
slider_id_uuid (str, optional) – The UUID for the slider to retrieve the min_nr_observed value.
annotation (str, optional) – Optional annotation to display on the plot.
- Returns:
ProteoBench ID of the selected data point, if any.
- Return type:
str or None