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 all commits
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}}
32 changes: 27 additions & 5 deletions webinterface/pages/DDA_Quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
FIG1 = "fig1"
FIG2 = "fig2"
RESULT_PERF = "result_perf"
META_DATA = "meta_data"

if "submission_ready" not in st.session_state:
st.session_state["submission_ready"] = False
Expand All @@ -53,12 +54,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 @@ -148,6 +154,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 @@ -157,7 +164,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 Expand Up @@ -253,11 +264,18 @@ def generate_results(
st.session_state[RESULT_PERF] = result_performance
st.session_state[ALL_DATAPOINTS] = all_datapoints

self.user_input[META_DATA] = st.file_uploader(
"Meta data for searches", help=self.texts.Help.meta_data_file
)
self.user_input["comments_for_submission"] = st.text_area("Comments for submission",
placeholder="Anything else you want to let us know? Please specifically add changes in your search parameters here, that are not obvious from the parameter file.",
height=200)
checkbox = st.checkbox("I confirm that the metadata is correct")
if checkbox:

if checkbox and self.user_input[META_DATA]:
st.session_state["submission_ready"] = True
submit_pr = st.button("I really want to upload it")
# TODO: check if parameters are filled
# TODO: update parameters of point to submit with parsed metadata parameters
# submit_pr = False
if submit_pr:
st.session_state[SUBMIT] = True
Expand Down Expand Up @@ -315,6 +333,10 @@ class Help:
Please provide all details about the used parameter for the database search. They will facilitate the comparison.
"""

meta_data_file = """
Please add a file with meta data that contains all relevant information about your search parameters
"""

class Errors:
missing_peptide_csv = """
Upload a peptide CSV file or select the _Use example data_ checkbox.
Expand Down
Loading