proteobench.datapoint.datapoint_base module#

Abstract base class for datapoint modules.

class proteobench.datapoint.datapoint_base.DatapointBase[source]#

Bases: ABC

Abstract base class for benchmark datapoints.

This class defines the interface that all datapoint types must implement, allowing for modular and extensible datapoint handling for different benchmarking modules.

Subclasses should define their own attributes specific to their benchmarking module.

abstractmethod static generate_datapoint(intermediate: DataFrame, input_format: str, user_input: dict, **kwargs) Series[source]#

Generate a datapoint object containing metadata and results from the benchmark run.

Parameters:
  • intermediate (pd.DataFrame) – The intermediate DataFrame containing benchmark results.

  • input_format (str) – The format of the input data (e.g., software tool name).

  • user_input (dict) – User-defined input values for the benchmark.

  • **kwargs (dict) – Additional module-specific parameters.

Returns:

A Pandas Series containing the datapoint’s attributes as key-value pairs.

Return type:

pd.Series

abstractmethod generate_id() None[source]#

Generate a unique ID for the benchmark run.

This ID should uniquely identify each run of the benchmark.

abstractmethod static get_metrics(df: DataFrame, **kwargs) Dict[int, Dict[str, float]][source]#

Compute statistical metrics from the provided DataFrame.

Parameters:
  • df (pd.DataFrame) – DataFrame containing the intermediate results.

  • **kwargs (dict) – Additional module-specific parameters.

Returns:

Dictionary mapping quantification cutoffs to their computed metrics.

Return type:

Dict[int, Dict[str, float]]