proteobench.plotting package#
Plotting module for ProteoBench.
- class proteobench.plotting.LFQHYEPlotGenerator[source]#
Bases:
PlotGeneratorBasePlot generator for LFQ HYE (Human-Yeast-Ecoli) quantification modules. Used by DIA/DDA ion modules that use the HYE benchmark dataset.
- generate_in_depth_plots(performance_data: DataFrame, parse_settings: any, **kwargs) Dict[str, Figure][source]#
Generate standard LFQ HYE plots.
- Parameters:
- Returns:
Dictionary mapping plot names to plotly figures
- Return type:
Dict[str, go.Figure]
- get_in_depth_plot_layout() list[source]#
Define layout for LFQ HYE plots.
- Returns:
List of in-depth plot configurations defining how plots should be displayed
- Return type:
- plot_main_metric(result_df: DataFrame, metric: str = 'Median', mode: str = 'Species-weighted', colorblind_mode: bool = False, software_colors: Dict[str, str] = {'AlphaDIA': '#1D2732', 'AlphaPept': '#cc6777', 'Custom': '#000000', 'DIA-NN': '#999934', 'FragPipe': '#342288', 'FragPipe (DIA-NN quant)': '#F89008', 'MSAID': '#bfef45', 'MSAngel': '#147733', 'MaxQuant': '#88ccef', 'MetaMorpheus': '#637C7A', 'PEAKS': '#f032e6', 'ProlineStudio': '#ddcc77', 'Proteome Discoverer': '#911eb4', 'Sage': '#671100', 'Spectronaut': '#007548', 'WOMBAT': '#44aa9a', 'i2MassChroQ': '#aa4599', 'quantms': '#f5e830'}, software_markers: Dict[str, str] = {'AlphaDIA': 'star-triangle-up', 'AlphaPept': 'square', 'Custom': 'star-square', 'DIA-NN': 'star', 'FragPipe': 'x', 'FragPipe (DIA-NN quant)': 'circle-x', 'MSAID': 'square-cross', 'MSAngel': 'cross', 'MaxQuant': 'circle', 'MetaMorpheus': 'asterisk', 'PEAKS': 'diamond-wide', 'ProlineStudio': 'diamond', 'Proteome Discoverer': 'hash', 'Sage': 'triangle-down', 'Spectronaut': 'diamond-tall', 'WOMBAT': 'pentagon', 'i2MassChroQ': 'triangle-up', 'quantms': 'hexagram'}, mapping: Dict[str, str] = {'new': 20, 'old': 10}, highlight_color: str = '#d30067', label: str = '', legend_name_map: Dict[str, str] = {'AlphaPept': 'AlphaPept (legacy tool)'}, annotation: str = '', **kwargs) Figure[source]#
Generate the main performance metric plot for LFQ HYE modules.
- Parameters:
result_df (pd.DataFrame) – DataFrame containing the results to plot.
metric (str, optional) – Metric to plot, either “Median” or “Mean”.
mode (str, optional) – Mode of calculation, either, “Species-weighted” or “Global”. Case-insensitive.
colorblind_mode (Bool, optional) – If True, use different shapes for workflows.
software_colors (Dict[str, str]) – Mapping of software names to colors.
software_markers (Dict[str, str]) – Mapping of software names to markers.
mapping (Dict[str, str]) – Mapping for renaming software versions.
highlight_color (str) – Color to use for highlighting a specific software/tool.
label (str) – Label for the highlighted software/tool.
legend_name_map (Dict[str, str]) – Mapping for legend names.
hide_annot (bool) – Whether to hide annotations on the plot.
**kwargs (dict) – Additional module-specific parameters.
- Returns:
Plotly figure with the main performance metric plot.
- Return type:
go.Figure
- class proteobench.plotting.PlotGeneratorBase[source]#
Bases:
ABCAbstract base class for module-specific plot generators. Each module can extend this to define its own in-depth plots.
- abstractmethod generate_in_depth_plots(performance_data: DataFrame, **kwargs) Dict[str, Figure][source]#
Generate module-specific plots.
- Parameters:
performance_data (pd.DataFrame) – The performance data to plot
**kwargs (dict) –
Additional module-specific parameters. Common parameters include: - parse_settings: ParseSettings - module-specific parse settings (may be optional for some modules) - metric: str - metric to display (e.g., “Median”, “Mean”) - mode: str - calculation mode (e.g., “Global”, “Species-weighted”) - colorblind_mode: bool - whether to use colorblind-friendly visualization
Each implementation should document which parameters it accepts.
- Returns:
Dictionary mapping plot names to plotly figures
- Return type:
Dict[str, go.Figure]
Notes
Implementations may add parse_settings as an explicit positional parameter for consistency with generic tab code, even if not used by the module.
- abstractmethod get_in_depth_plot_descriptions() Dict[str, str][source]#
Get descriptions for each plot.
- abstractmethod get_in_depth_plot_layout() list[source]#
Define the layout configuration for displaying plots.
- Returns:
List of plot configurations, e.g.: [
{“plots”: [“logfc”, “cv”], “columns”: 2, “title”: “Distribution Plots”}, {“plots”: [“ma_plot”], “columns”: 1, “title”: “MA Plot”}
]
- Return type:
Submodules#
- proteobench.plotting.plot_denovo module
DeNovoPlotGeneratorDeNovoPlotGenerator.generate_in_depth_plots()DeNovoPlotGenerator.get_in_depth_plot_descriptions()DeNovoPlotGenerator.get_in_depth_plot_layout()DeNovoPlotGenerator.get_modification_scores()DeNovoPlotGenerator.plot_main_metric()DeNovoPlotGenerator.plot_ptm_overview()DeNovoPlotGenerator.plot_ptm_specific()DeNovoPlotGenerator.plot_species_overview()DeNovoPlotGenerator.plot_species_specific()DeNovoPlotGenerator.plot_spectrum_feature()
flatten_results_column()
- proteobench.plotting.plot_generator_base module
- proteobench.plotting.plot_generator_lfq_HYE module