proteobench.plotting.plot_denovo module#

Module for plotting results of de novo models

class proteobench.plotting.plot_denovo.DeNovoPlotGenerator[source]#

Bases: PlotGeneratorBase

Plot generator for de novo sequencing data points. Implements the PlotGeneratorBase interface for consistent module plotting.

generate_in_depth_plots(performance_data: DataFrame, parse_settings: any = None, **kwargs) Dict[str, Figure][source]#

Generate module-specific in-depth plots.

Parameters:
  • performance_data (pd.DataFrame) – The performance data to plot.

  • parse_settings (any, optional) – Parse settings for the module (not used by de novo, included for signature compatibility).

  • **kwargs (dict) – Additional parameters: - mod_labels: List[str] - list of PTM modification labels - mod_label: str - specific PTM label for detailed plot - feature: str - spectrum feature to plot - evaluation_type: str - evaluation type (“mass” or “exact”)

Returns:

Dictionary mapping plot names to plotly figures.

Return type:

Dict[str, go.Figure]

get_in_depth_plot_descriptions() Dict[str, str][source]#

Get descriptions for each in-depth plot.

Returns:

Dictionary mapping plot names to their descriptions.

Return type:

Dict[str, str]

get_in_depth_plot_layout() list[source]#

Define the layout configuration for displaying plots.

Returns:

List of plot configurations for organizing the UI display.

Return type:

list

static get_modification_scores(mod_dict, mod_labels)[source]#
plot_main_metric(result_df: DataFrame, **kwargs) Figure[source]#

Generate the main performance metric plot.

Parameters:
  • result_df (pd.DataFrame) – DataFrame containing the results to plot.

  • **kwargs (dict) – Additional parameters: - level: str (default “precision”) - metric type (“precision” or “recall”) - evaluation_type: str (default “mass”) - evaluation type (“mass” or “exact”) - colorblind_mode: bool (default False) - whether to use different shapes for software tools - software_colors: Dict[str, str] - color mapping for software tools - software_markers: Dict[str, str] - marker mapping for software tools (used when colorblind_mode is True) - mapping: Dict[str, int] - size mapping for old/new datapoints - highlight_color: str - color for highlighted datapoints - label: str - label field to display

Returns:

The generated plotly figure for the main performance metric.

Return type:

go.Figure

plot_ptm_overview(benchmark_metrics_df: DataFrame, mod_labels: List[str], software_colors: Dict[str, str] = {'AdaNovo': '#8b26ff', 'Casanovo': '#8bc6fd', 'DeepNovo': '#108E2E', 'PEAKS': '#f032e6', 'PepNet': '#F89008', 'Pi-HelixNovo': '#E43924', 'Pi-PrimeNovo': '#663200'})[source]#
plot_ptm_specific(benchmark_metrics_df, mod_label, software_colors: Dict[str, str] = {'AdaNovo': '#8b26ff', 'Casanovo': '#8bc6fd', 'DeepNovo': '#108E2E', 'PEAKS': '#f032e6', 'PepNet': '#F89008', 'Pi-HelixNovo': '#E43924', 'Pi-PrimeNovo': '#663200'})[source]#
plot_species_overview(benchmark_metrics_df, evaluation_type='mass', software_colors={'AdaNovo': '#8b26ff', 'Casanovo': '#8bc6fd', 'DeepNovo': '#108E2E', 'PEAKS': '#f032e6', 'PepNet': '#F89008', 'Pi-HelixNovo': '#E43924', 'Pi-PrimeNovo': '#663200', 'test': 'black'})[source]#
plot_species_specific()[source]#
plot_spectrum_feature(benchmark_metrics_df, feature, evaluation_type='mass', software_colors={'AdaNovo': '#8b26ff', 'Casanovo': '#8bc6fd', 'DeepNovo': '#108E2E', 'PEAKS': '#f032e6', 'PepNet': '#F89008', 'Pi-HelixNovo': '#E43924', 'Pi-PrimeNovo': '#663200', 'test': 'black'})[source]#
proteobench.plotting.plot_denovo.flatten_results_column(df)[source]#