proteobench.plotting.plot_quant module#

Module for plotting quantitative proteomics data.

class proteobench.plotting.plot_quant.PlotDataPoint[source]#

Bases: object

Class for plotting data points.

static plot_CV_violinplot(result_df: DataFrame) Figure[source]#

Plot the coefficient of variation (CV) for A and B groups using a violin plot.

Parameters:

result_df (pd.DataFrame) – The results DataFrame containing the CV data.

Returns:

A Plotly figure object representing the violin plot.

Return type:

go.Figure

static plot_fold_change_histogram(result_df: DataFrame, species_ratio: Dict[str, Dict[str, str]]) Figure[source]#

Plot a histogram of log2 fold changes using Plotly, color-coded by species.

Parameters:
  • result_df (pd.DataFrame) – The results DataFrame containing fold changes and species data.

  • species_ratio (Dict[str, Dict[str, str]]) – A dictionary mapping species to their respective colors and ratios.

Returns:

A Plotly figure object representing the histogram.

Return type:

go.Figure

static plot_ma_plot(result_df: DataFrame, species_ratio: Dict[str, Dict[str, str]]) Figure[source]#

Plot a MA plot using Plotly.

Parameters:
  • result_df (pd.DataFrame) – The results DataFrame containing the MA plot data.

  • species_ratio (Dict[str, Dict[str, str]]) – A dictionary mapping species to their respective colors and ratios.

Returns:

A Plotly figure object representing the MA plot.

Return type:

go.Figure

static plot_metric(benchmark_metrics_df: DataFrame, metric: str = 'Median', software_colors: Dict[str, str] = {'AlphaDIA': '#1D2732', 'AlphaPept': '#17212b', 'Custom': '#000000', 'DIA-NN': '#d42f2f', 'FragPipe': '#F89008', 'FragPipe (DIA-NN quant)': '#F89008', 'MSAID': '#bfef45', 'MSAngel': '#C0FA7D', 'MaxQuant': '#8bc6fd', 'PEAKS': '#f032e6', 'ProlineStudio': '#8b26ff', 'Proteome Discoverer': '#911eb4', 'Sage': '#E43924', 'Spectronaut': '#007548', 'WOMBAT': '#663200', 'i2MassChroQ': '#108E2E', 'quantms': '#f5e830'}, mapping: Dict[str, int] = {'new': 20, 'old': 10}, highlight_color: str = '#d30067', label: str = 'None', legend_name_map: Dict[str, str] = {'AlphaPept': 'AlphaPept (legacy tool)'}) Figure[source]#

Plot mean metrics in a scatter plot with Plotly, highlighting specific data points.

Parameters:
  • benchmark_metrics_df (pd.DataFrame) – The DataFrame containing benchmark metrics data.

  • metric (str, optional) – The metric to plot, either “Median” or “Mean”, by default “Median”.

  • software_colors (Dict[str, str], optional) – A dictionary mapping software names to their colors, by default predefined colors.

  • mapping (Dict[str, int], optional) – A dictionary mapping categories to scatter plot sizes, by default {“old”: 10, “new”: 20}.

  • highlight_color (str, optional) – The color used for highlighting certain points, by default “#d30067”.

  • label (str, optional) – The column name for labeling data points, by default “None”.

  • legend_name_map (Dict[str, str], optional) – A dictionary mapping software names to legend names, by default None. If None, the software names will be used as legend names.

Returns:

A Plotly figure object representing the scatter plot.

Return type:

go.Figure