Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed default parameters #94

Merged
merged 6 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webinterface/configuration/dda_quant.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": {"type": "text_input", "label": "Search engine version", "value": {"MaxQuant": 1.0, "AlphaPept": 1.0, "MSFragger": 1.0, "Proline": 1.0, "WOMBAT": 1.0}}, "software_name": {"type": "text_input", "label": "Search engine name", "value": {"MaxQuant": "MaxQuant", "AlphaPept": "AlphaPept", "MSFragger": "MSFragger", "Proline": "Proline", "WOMBAT": "WOMBAT"}}, "fdr_psm": {"type": "number_input", "label": "FDR psm", "value": {"MaxQuant": 0.01, "AlphaPept": 0.01, "MSFragger": 0.01, "Proline": 0.01, "WOMBAT": 0.01}, "min_value": 0.0, "max_value": 1.0, "format": "%.4f"}, "fdr_peptide": {"type": "number_input", "label": "FDR peptide", "value": {"MaxQuant": 0.01, "AlphaPept": 0.01, "MSFragger": 0.01, "Proline": 0.01, "WOMBAT": 0.01}, "min_value": 0.0, "max_value": 1.0, "format": "%.4f"}, "fdr_protein": {"type": "number_input", "label": "FDR protein", "value": {"MaxQuant": 0.01, "AlphaPept": 0.01, "MSFragger": 0.01, "Proline": 0.01, "WOMBAT": 0.01}, "min_value": 0.0, "max_value": 1.0, "format": "%.4f"}, "precursor_mass_tolerance": {"type": "number_input", "label": "Precursor mass tolerance", "value": {"MaxQuant": 10.0, "AlphaPept": 10.0, "MSFragger": 10.0, "Proline": 10.0, "WOMBAT": 10.0}, "min_value": 0.0, "max_value": 5.0, "format": "%.4f"}, "precursor_mass_tolerance_unit": {"type": "selectbox", "label": "Precursor tolerance unit", "value": {"MaxQuant": "PPM", "AlphaPept": "PPM", "MSFragger": "PPM", "Proline": "PPM", "WOMBAT": "PPM"}, "options": ["PPM", "Da"]}, "fragment_mass_tolerance": {"type": "number_input", "label": "Fragment mass tolerance", "value": {"MaxQuant": 10.0, "AlphaPept": 10.0, "MSFragger": 10.0, "Proline": 10.0, "WOMBAT": 10.0}, "min_value": 0.0, "max_value": 5.0, "format": "%.4f"}, "fragment_mass_tolerance_unit": {"type": "selectbox", "label": "Fragment mass tolerance unit", "value": {"MaxQuant": "PPM", "AlphaPept": "PPM", "MSFragger": "PPM", "Proline": "PPM", "WOMBAT": "PPM"}, "options": ["PPM", "Da"]}, "search_enzyme_name": {"type": "selectbox", "label": "Enzyme", "value": {"MaxQuant": "Trypsin", "AlphaPept": "Trypsin", "MSFragger": "Trypsin", "Proline": "Trypsin", "WOMBAT": "Trypsin"}, "options": ["Trypsin", "Chemotrypsin"]}, "allowed_missed_cleavage": {"type": "number_input", "label": "Maximum allowed number of missed cleavage", "value": {"MaxQuant": 2, "AlphaPept": 2, "MSFragger": 2, "Proline": 2, "WOMBAT": 2}, "format": "%d"}, "fixed_mods": {"type": "text_input", "label": "Specify the fixed mods that were set", "value": {"MaxQuant": "CAM", "AlphaPept": "CAM", "MSFragger": "CAM", "Proline": "CAM", "WOMBAT": "CAM"}}, "variable_mods": {"type": "text_input", "label": "Specify the variable mods that were set (separated by a comma)", "value": {"MaxQuant": "MOxid, 'N-term Acetyl'", "AlphaPept": "MOxid, 'N-term Acetyl'", "MSFragger": "MOxid, 'N-term Acetyl'", "Proline": "MOxid, 'N-term Acetyl'", "WOMBAT": "MOxid, 'N-term Acetyl'"}}, "precursor_charge": {"type": "text_input", "label": "Possible charge states (separated by a comma)", "value": {"MaxQuant": "2,3,4,5,6", "AlphaPept": "2,3,4,5,6", "MSFragger": "2,3,4,5,6", "Proline": "2,3,4,5,6", "WOMBAT": "2,3,4,5,6"}}, "max_num_mods_on_peptide": {"type": "number_input", "label": "Maximum number of modifications on peptides", "value": {"MaxQuant": 2, "AlphaPept": 2, "MSFragger": 2, "Proline": 2, "WOMBAT": 2}, "format": "%d"}, "min_peptide_length": {"type": "number_input", "label": "Minimum peptide length", "value": {"MaxQuant": 6, "AlphaPept": 6, "MSFragger": 6, "Proline": 6, "WOMBAT": 6}, "format": "%d"}, "max_peptide_length": {"type": "number_input", "label": "max_peptide_length", "value": {"MaxQuant": 25, "AlphaPept": 25, "MSFragger": 25, "Proline": 25, "WOMBAT": 25}, "format": "%d"}, "mbr": {"type": "checkbox", "label": "Quantified with MBR", "value": {"MaxQuant": true, "AlphaPept": true, "MSFragger": true, "Proline": true, "WOMBAT": true}}, "workflow_description": {"type": "text_area", "label": "Fill in details not specified above, such as:", "value": {"MaxQuant": "This workflow was run with isotope errors considering M-1, M+1, and M+2 ...", "AlphaPept": "This workflow was run with isotope errors considering M-1, M+1, and M+2 ...", "MSFragger": "This workflow was run with isotope errors considering M-1, M+1, and M+2 ...", "Proline": "This workflow was run with isotope errors considering M-1, M+1, and M+2 ...", "WOMBAT": "This workflow was run with isotope errors considering M-1, M+1, and M+2 ..."}, "height": 275}}
{"version": {"type": "text_input", "label": "Search engine version", "placeholder" : "1.0"}, "software_name": {"type": "text_input", "label": "Search engine name", "value": {"MaxQuant": "MaxQuant", "AlphaPept": "AlphaPept", "MSFragger": "MSFragger", "Proline": "Proline", "WOMBAT": "WOMBAT"}}, "fdr_psm": {"type": "number_input", "label": "FDR psm", "min_value": 0.0, "max_value": 1.0, "format": "%.4f"}, "fdr_peptide": {"type": "number_input", "label": "FDR peptide", "min_value": 0.0, "max_value": 1.0, "format": "%.4f"}, "fdr_protein": {"type": "number_input", "label": "FDR protein", "min_value": 0.0, "max_value": 1.0, "format": "%.4f"}, "precursor_mass_tolerance": {"type": "number_input", "label": "Precursor mass tolerance", "min_value": 0.0, "max_value": 200.0, "format": "%.4f"}, "precursor_mass_tolerance_unit": {"type": "selectbox", "label": "Precursor tolerance unit", "value": {"MaxQuant": "-", "AlphaPept": "-", "MSFragger": "-", "Proline": "-", "WOMBAT": "-"}, "options": ["-", "PPM", "Da"]}, "fragment_mass_tolerance": {"type": "number_input", "label": "Fragment mass tolerance", "min_value": 0.0, "max_value": 100.0, "format": "%.4f"}, "fragment_mass_tolerance_unit": {"type": "selectbox", "label": "Fragment mass tolerance unit", "value": {"MaxQuant": "-", "AlphaPept": "-", "MSFragger": "-", "Proline": "-", "WOMBAT": "-"}, "options": ["-", "PPM", "Da"]}, "search_enzyme_name": {"type": "selectbox", "label": "Enzyme", "value": {"MaxQuant": "-", "AlphaPept": "-", "MSFragger": "-", "Proline": "-", "WOMBAT": "-"}, "options": ["-", "Trypsin", "Chemotrypsin"]}, "allowed_missed_cleavage": {"type": "number_input", "label": "Maximum allowed number of missed cleavage", "min_value": 0, "max_value": 10,"format": "%d"}, "fixed_mods": {"type": "text_input", "label": "Specify the fixed mods that were set", "placeholder": "CAM"}, "variable_mods": {"type": "text_input", "label": "Specify the variable mods that were set (separated by a comma)", "placeholder": "MOxid, N-term Acetyl"}, "precursor_charge": {"type": "text_input", "label": "Possible charge states (separated by a comma)", "placeholder": "2,3,4,5,6"}, "max_num_mods_on_peptide": {"type": "number_input", "label": "Maximum number of modifications on peptides", "min_value": 0, "max_value": 10,"format": "%d"}, "min_peptide_length": {"type": "number_input", "label": "Minimum peptide length", "min_value": 0, "max_value": 100,"format": "%d"}, "max_peptide_length": {"type": "number_input", "label": "Maximum peptide length", "min_value": 0, "max_value": 1000,"format": "%d"}, "mbr": {"type": "checkbox", "label": "Quantified with MBR", "value": {"MaxQuant": false, "AlphaPept": false, "MSFragger": false, "Proline": false, "WOMBAT": false}}, "workflow_description": {"type": "text_area", "label": "Fill in details not specified above", "placeholder": "This workflow was run with isotope errors considering M-1, M+1, and M+2 ...'", "height": 275}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file automatically created? Then we might want to format it using indent=2 or indent=4?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, from this file all parameters in the UI are generated

16 changes: 13 additions & 3 deletions webinterface/pages/DDA_Quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ def __init__(self):

def generate_input_field(self, input_format: str, content: dict):
if content["type"] == "text_input":
return st.text_input(content["label"], content["value"][input_format])
if "placeholder" in content:
return st.text_input(content["label"], placeholder=content["placeholder"])
elif "value" in content:
return st.text_input(content["label"], content["value"][input_format])
if content["type"] == "number_input":
return st.number_input(
content["label"],
value=content["value"][input_format],
value=None,
format=content["format"],
min_value=content["min_value"],
max_value=content["max_value"]
)
if content["type"] == "selectbox":
return st.selectbox(
Expand Down Expand Up @@ -145,6 +150,7 @@ def _main_page(self):
self.user_input[key] = self.generate_input_field(
self.user_input["input_format"], value
)

submit_button = st.form_submit_button(
"Parse and bench", help=self.texts.Help.additional_parameters
)
Expand All @@ -154,7 +160,11 @@ def _main_page(self):
self._populate_results()

if submit_button:
self._run_proteobench()
if self.user_input["input_csv"]:
self._run_proteobench()
else:
error_message = st.error(":x: Please provide a result file")
print(":x: Proteobench ran into a problem")

def _populate_results(self):
self.generate_results("", None, None, False)
Expand Down