Skip to content

Commit

Permalink
Merge pull request #440 from Proteobench/DDA-quant-peptidoform
Browse files Browse the repository at this point in the history
Show peptidoform DDA quant module
  • Loading branch information
RobbinBouwmeester authored Nov 15, 2024
2 parents 6f8ac03 + 4119bb2 commit 3541fe7
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 9 deletions.
4 changes: 4 additions & 0 deletions webinterface/.streamlit/pages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ name = "Home"
path = "pages/DDA_Quant_ion.py"
name = "DDA Quant Ion Level -BETA-"

[[pages]]
path = "pages/DDA_Quant_peptidoform.py"
name = "DDA Quant Peptidoform Level -BETA-"

[[pages]]
path = "pages/DIA_Quant_ion.py"
name = "DIA Quant Ion Level -BETA-"
84 changes: 77 additions & 7 deletions webinterface/pages/DDA_Quant_peptidoform.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from pages.texts.generic_texts import WebpageTexts

from proteobench.io.parsing.parse_settings_peptidoform import ParseSettingsBuilder
from proteobench.modules.dda_quant_peptidoform.dda_quant_peptidoform_module import DDAQuantPeptidoformModule
from proteobench.modules.dda_quant_peptidoform.dda_quant_peptidoform_module import (
DDAQuantPeptidoformModule,
)


class StreamlitUI:
Expand Down Expand Up @@ -42,14 +44,82 @@ def _main_page(self) -> None:
Sets up the main page layout for the Streamlit application.
This includes the title, module descriptions, input forms, and configuration settings.
"""
self.quant_uiobjects.create_text_header()
self.quant_uiobjects.create_main_submission_form()
self.quant_uiobjects.init_slider()
# Create tabs
(
tab_results_all,
tab_submission_details,
tab_indepth_plots,
tab_results_new,
tab_public_submission,
) = st.tabs(
[
"Public Benchmark Runs",
"Submit New Data",
"Results In-Depth",
"Results New Data",
"Public Submission",
]
)

with tab_results_all:
st.title(self.variables_dda_quant.texts.ShortMessages.title)
st.write(
f"The full description of the module is available [here]({self.variables_dda_quant.texts.ShortMessages.doc_url})"
)
if self.variables_dda_quant.beta_warning:
st.warning(
"This module is in BETA phase. The figure presented below and the metrics calculation may change in the near future."
)
self.quant_uiobjects.display_all_data_results_main()

# Tab 2: Submission Details
with tab_submission_details:
st.title(self.variables_dda_quant.texts.ShortMessages.title)
st.write(
f"The full description of the module is available [here]({self.variables_dda_quant.texts.ShortMessages.doc_url})"
)
if self.variables_dda_quant.beta_warning:
st.warning(
"This module is in BETA phase. The figure presented below and the metrics calculation may change in the near future."
)
self.quant_uiobjects.display_submission_form()

# Tab 2.5: in-depth plots current data
with tab_indepth_plots:
st.title(self.variables_dda_quant.texts.ShortMessages.title)
st.write(
f"The full description of the module is available [here]({self.variables_dda_quant.texts.ShortMessages.doc_url})"
)
if self.variables_dda_quant.beta_warning:
st.warning(
"This module is in BETA phase. The figure presented below and the metrics calculation may change in the near future."
)
self.quant_uiobjects.generate_current_data_plots(True)

# Tab 3: Results (New Submissions)
with tab_results_new:
st.title(self.variables_dda_quant.texts.ShortMessages.title)
st.write(
f"The full description of the module is available [here]({self.variables_dda_quant.texts.ShortMessages.doc_url})"
)
if self.variables_dda_quant.beta_warning:
st.warning(
"This module is in BETA phase. The figure presented below and the metrics calculation may change in the near future."
)

if self.quant_uiobjects.variables_quant.fig_logfc in st.session_state:
self.quant_uiobjects.populate_results()
self.quant_uiobjects.display_all_data_results_submitted()

self.quant_uiobjects.create_results()
# Tab 4: Public Submission
with tab_public_submission:
st.title(self.variables_dda_quant.texts.ShortMessages.title)
st.write(
f"The full description of the module is available [here]({self.variables_dda_quant.texts.ShortMessages.doc_url})"
)
if self.variables_dda_quant.beta_warning:
st.warning(
"This module is in BETA phase. The figure presented below and the metrics calculation may change in the near future."
)
self.quant_uiobjects.display_public_submission_ui()


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,26 @@ class VariablesDDAQuant:
comments_submission_uuid: str = "comments_submission_uuid_dda_quant_peptidoform"
check_submission_uuid: str = "check_submission_uuid_dda_quant_peptidoform"
meta_data_text: str = "comments_for_submission_dda_quant_peptidoform"
check_submission: str = "heck_submission_dda_quant_peptidoform"
check_submission: str = "check_submission_dda_quant_peptidoform"
button_submission_uuid: str = "button_submission_uuid_dda_quant_peptidoform"
df_head: str = "df_head_dda_quant_peptidoform"
placeholder_fig_compare: str = "placeholder_fig_compare_dda_quant_peptidoform"

all_datapoints_submitted: str = "all_datapoints_submitted_dda_quant_peptidoform"
placeholder_table_submitted: str = "placeholder_table_submitted_dda_quant_peptidoform"
placeholder_slider_submitted: str = "placeholder_slider_submitted_dda_quant_peptidoform"
highlight_list_submitted: List[str] = field(default_factory=list)
selectbox_id_submitted_uuid: str = "selectbox_id_submitted_dda_quant_peptidoform"
selectbox_id_uuid: str = "selectbox_id_dda_quant_peptidoform"
slider_id_submitted_uuid: str = "slider_id_submitted_dda_quant_peptidoform"
slider_id_uuid: str = "slider_id_dda_quant_peptidoform"
download_selector_id_uuid: str = "download_selector_id_dda_quant_peptidoform"
table_id_uuid: str = "table_id_dda_quant_peptidoform"

placeholder_table: str = "placeholder_table_dda_quant_peptidoform"
placeholder_slider: str = "placeholder_slider_dda_quant_peptidoform"
placeholder_downloads_container: str = "placeholder_downloads_container"

placeholder_downloads_container: str = "placeholder_downloads_container_dda_quant_peptidoform"
highlight_list: List[str] = field(default_factory=list)
first_new_plot: bool = True
default_val_slider: int = 3
Expand Down

0 comments on commit 3541fe7

Please sign in to comment.