webinterface.pages.base_pages.tab1_results module#

webinterface.pages.base_pages.tab1_results.configure_aggrid(df: DataFrame)[source]#

Configures the styling and options for AgGrid based on column category.

Parameters:

df (pd.DataFrame) – The display-ready DataFrame.

Returns:

AgGrid gridOptions dictionary.

Return type:

dict

webinterface.pages.base_pages.tab1_results.display_download_section(variables_quant, reset_uuid=False) None[source]#

Render the selector and area for raw data download.

Parameters:

reset_uuid (bool, optional) – Whether to reset the UUID, by default False.

webinterface.pages.base_pages.tab1_results.display_existing_results(variables_quant, ionmodule) None[source]#

Orchestrates the full display of quantification results in Streamlit, including plotting and interactive tabular output with styling.

Parameters:
  • variables_quant (object) – Object containing quantification variables including data points, slider/selectbox UUIDs, and configuration flags.

  • ionmodule (object) – Module responsible for filtering and transforming ion data.

webinterface.pages.base_pages.tab1_results.display_metric_selector() str[source]#
webinterface.pages.base_pages.tab1_results.generate_main_selectbox(variables_quant, selectbox_id_uuid) None[source]#

Create the selectbox for the Streamlit UI.

webinterface.pages.base_pages.tab1_results.generate_main_slider(slider_id_uuid: str, description_slider_md: str, default_val_slider: float) None[source]#

Create a slider input.

webinterface.pages.base_pages.tab1_results.get_style_js(bg_color: str) JsCode[source]#

Generates JavaScript for styling cells with a background color.

Parameters:

bg_color (str) – Hex color string to use as the background.

Returns:

A JavaScript code block that defines the style.

Return type:

JsCode

webinterface.pages.base_pages.tab1_results.initialize_and_filter_data(variables_quant, ionmodule)[source]#
webinterface.pages.base_pages.tab1_results.initialize_main_data_points(all_datapoints: str, obtain_all_data_points: Callable) None[source]#

Initialize the all_datapoints variable in the session state.

webinterface.pages.base_pages.tab1_results.initialize_main_slider(slider_id_uuid: str, default_val_slider: float) None[source]#

Initialize the slider for the main data.

We use a slider uuid and associate a defalut value with it. - self.variables_quant.slider_id_uuid - self.variables_quant.default_val_slider

webinterface.pages.base_pages.tab1_results.offer_download(df: DataFrame, filename: str = 'quantification_results.csv') None[source]#

Adds a download button to export the displayed DataFrame as a CSV file.

Parameters:
  • df (pd.DataFrame) – The DataFrame to be downloaded.

  • filename (str, optional) – The name of the file to download, by default “quantification_results.csv”.

webinterface.pages.base_pages.tab1_results.prepare_display_dataframe(df: DataFrame, highlight_id: str | None) DataFrame[source]#

Prepares the DataFrame for display, including column filtering, ordering, row highlighting, and numeric formatting.

Parameters:
  • df (pd.DataFrame) – The filtered dataset for display.

  • highlight_id (str or None) – The ProteoBench ID to highlight (adds a marker in the ‘selected’ column).

Returns:

A formatted and sorted DataFrame ready for rendering.

Return type:

pd.DataFrame

webinterface.pages.base_pages.tab1_results.render_aggrid(df: DataFrame, grid_options)[source]#
webinterface.pages.base_pages.tab1_results.render_metric_plot(data: DataFrame, variables_quant, metric: 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.

  • variables_quant (object) – Contains session state and selectbox identifier.

  • metric (str) – Metric to plot (“Median” or “Mean”).

Returns:

ProteoBench ID of the selected data point, if any.

Return type:

str or None