webinterface.pages.base_pages.quant module#
Streamlit-based web interface for ProteoBench.
- class webinterface.pages.base_pages.quant.QuantUIObjects(variables_quant: VariablesDDAQuant, ionmodule: DDAQuantIonModuleQExactive, parsesettingsbuilder: ParseSettingsBuilder)[source]#
Bases:
objectMain class for the Streamlit interface of ProteoBench quantification. This class handles the creation of the Streamlit UI elements, including the main page layout, input forms, results display, and data submission elements.
- Parameters:
variables_quant (VariablesDDAQuant) – The variables for the quantification module.
ionmodule (IonModule) – The quantification module.
parsesettingsbuilder (ParseSettingsBuilder) – The parse settings builder.
- clear_highlight_column() None[source]#
Remove the highlight column from the submission data if it exists.
- create_pull_request(params: Any) str | None[source]#
Submit the pull request with the benchmark results and returns the PR URL.
- Parameters:
params (Any) – The parameters object.
- Returns:
The URL of the pull request.
- Return type:
Optional[str]
- display_download_section(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.
- display_indepth_plots() None[source]#
Display the dataset selection dropdown and plot the selected dataset.
- display_public_submission_ui() None[source]#
Display the public submission section of the page in Tab 4.
- display_submission_form() None[source]#
Create the main submission form for the Streamlit UI in Tab 2.
- display_submitted_results() None[source]#
Display the results section of the page for submitted data.
- filter_data_main_slider() DataFrame[source]#
Filter the data points based on the slider value.
- Returns:
The filtered data points.
- Return type:
- filter_data_submitted_slider() DataFrame[source]#
Filter the data points based on the slider value.
- Returns:
The filtered data points.
- Return type:
pd.DataFrame
- generate_additional_parameters_fields() None[source]#
Create the additional parameters section of the form and initializes the parameter fields.
- generate_additional_parameters_fields_submission() None[source]#
Create the additional parameters section of the form and initializes the parameter fields.
- generate_confirmation_checkbox() None[source]#
Create the confirmation checkbox for metadata correctness.
- generate_indepth_plots(recalculate: bool, public_id: str | None, public_hash: str | None) Figure[source]#
Generate and return plots based on the current benchmark data in Tab 2.5.
- Parameters:
- Returns:
The generated plots for the selected dataset.
- Return type:
go.Figure
- generate_input_widget(input_format: str, content: dict, key: str = '', editable: bool = True) Any[source]#
Generate input fields in the Streamlit UI based on the specified format and content.
- generate_sample_name() str[source]#
Generate a unique sample name based on the input format, software version, and the current timestamp.
- Returns:
The generated sample name.
- Return type:
- generate_submission_button() str | None[source]#
Create a button for public submission and returns the PR URL if the button is pressed.
- Returns:
The URL of the pull request.
- Return type:
Optional[str]
- generate_submission_ui_elements() None[source]#
Create the UI elements necessary for data submission, including metadata uploader and comments section.
- generate_text_area_widget(input_format: str, content: dict, editable: bool = True) Any[source]#
Generate a text area input field.
- get_form_values() Dict[str, Any][source]#
Retrieve all user inputs from Streamlit session state and returns them as a dictionary.
- Returns:
A dictionary containing all user inputs.
- Return type:
Dict[str, Any]
- handle_submitted_table_edits() None[source]#
Callback function for handling edits made to the data table in the UI.
- initialize_main_data_points() None[source]#
Initialize the all_datapoints variable in the session state.
- initialize_submitted_data_points() None[source]#
Initialize the all_datapoints variable in the session state.
- load_user_parameters() Any[source]#
Read and process the parameter files provided by the user.
- Returns:
The parsed parameters.
- Return type:
Any
- process_submission_form() None[source]#
Handle the form submission logic.
- Returns:
Whether the submission was handled unsuccessfully.
- Return type:
bool, optional
- run_benchmarking_process()[source]#
Execute the benchmarking process and returns the results.
- Returns:
The benchmarking results, all data points, and the input data frame.
- Return type:
Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]
- save_intermediate_submission_data() None[source]#
Store intermediate and input data to the storage directory if available.
- set_highlight_column_in_submitted_data() None[source]#
Initialize the highlight column in the data points.
- show_submission_success_message(pr_url) None[source]#
Handle the UI updates and notifications after a successful submission.
- Parameters:
pr_url (str) – The URL of the pull request.
- submit_to_repository(params) str | None[source]#
Handle the submission process of the benchmark results to the ProteoBench repository.
- Parameters:
params (ProteoBenchParameters) – The parameters for the submission.
- Returns:
The URL of the pull request if the submission was successful.
- Return type:
str, optional