From b2618260bcf0d444562f1e219958ef3a6013ea04 Mon Sep 17 00:00:00 2001 From: mirandaa Date: Mon, 11 Oct 2021 15:58:56 +0200 Subject: [PATCH 1/2] init streamlot gui NOTE: there is no folder, itss eary and beautiful but limited --- environment.yml | Bin 4866 -> 4904 bytes webgui/lx2_web_gui.py | 64 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 webgui/lx2_web_gui.py diff --git a/environment.yml b/environment.yml index 755fbba99afa38eb577b6aec41c62a7cb837eef1..6c82d2db4a624438e0c7a943da9552c5b3ec77fa 100644 GIT binary patch delta 38 scmZotTcNgrNqF)G4wlJQLOf!{3?&Rj4547m(B44FV4F9R0?0LS_WcmMzZ delta 7 OcmZ3X)}*$9Nf-bM%mO?B diff --git a/webgui/lx2_web_gui.py b/webgui/lx2_web_gui.py new file mode 100644 index 0000000..11df1f0 --- /dev/null +++ b/webgui/lx2_web_gui.py @@ -0,0 +1,64 @@ +# File Selection Drop Down +import streamlit as st +from pathlib import Path + +# from https://discuss.streamlit.io/t/upload-files-to-streamlit-app/80/46 +# def st_file_selector(st_placeholder, path=".", label="Please, select a file/folder..."): +# # get base path (directory) +# base_path = "." if path is None or path is "" else path +# base_path = base_path if os.path.isdir(base_path) else os.path.dirname(base_path) +# base_path = "." if base_path is None or base_path is "" else base_path +# # list files in base path directory +# files = os.listdir(base_path) +# if base_path is not ".": +# files.insert(0, "..") +# files.insert(0, ".") +# selected_file = st_placeholder.selectbox(label=label, options=files, key=base_path) +# selected_path = os.path.normpath(os.path.join(base_path, selected_file)) +# if selected_file is ".": +# return selected_path +# if os.path.isdir(selected_path): +# selected_path = st_file_selector( +# st_placeholder=st_placeholder, path=selected_path, label=label +# ) +# return selected_path + + +st.title("LipidXplorer Web dev") +folder_path = st.text_input("Path to MZML files") +p = Path(folder_path) +if p.is_dir: + st.write(folder_path) + +with st.expander("See files"): + for i in p.iterdir(): + st.write(i) + +with st.expander("Set limits"): + mode = st.radio("Mode", ["pos", "neg", "both"]) + seconds = st.slider("Select a Time range in seconds", 0.0, 100.0, (0.0, 75.0)) + seconds = st.slider("Select m/z range ", 200.0, 1000.0, (300.0, 1200.0)) + +with st.expander("Offset and calibration"): + offset_ms1 = st.number_input("MS1 offset") + +with st.expander("Tolerance & resolution"): + tolerance_ms1 = st.number_input("Identification Tolerance") + resolution_ms1 = st.number_input("Grouping resolution") + resolution_gradient_ms1 = st.number_input("Resolution Gradient") + """TODO provide the resolition at m/z for two points to self calculate""" + sel_window_st = st.empty() + if True: + prec_sel_tol = sel_window_st.number_input("Precursor assignment tolerance") + +with st.expander("Filtering"): + col1, col2 = st.columns(2) + min_intensity = col1.number_input("min intensity") + min_intensity_type = col2.radio("type", ["ppm", "absolute"]) + frequency_rate = st.number_input("min repetition rate") + min_ocupation = st.number_input("min occupation") + +with st.expander("Logging"): + save_mastersscan_as_csv = st.checkbox("save mastersscan as csv") + log_isotopic_correction = st.checkbox("log isotopic correction") + From 35690b1c7d6358d2db891a55e8194977db031301 Mon Sep 17 00:00:00 2001 From: mirandaa Date: Tue, 12 Oct 2021 10:08:37 +0200 Subject: [PATCH 2/2] feat: try with ipywidget --- environment.yml | Bin 4904 -> 4958 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/environment.yml b/environment.yml index 6c82d2db4a624438e0c7a943da9552c5b3ec77fa..fb4d1e09703a3c9258b883a568476d01d70aba01 100644 GIT binary patch delta 68 zcmZ3Xc28}Ckg#wjLjgl2LpehxLkdGWLn=cFL-AxoAyJh)h9rh~hGd3(hCHB5B9NU8 Slq~}CQWiWztrxEKIHL=Le4 delta 30 kcmcbownA-#kg!-WLkU9>Ln=ceLoP!OLne^N%fQ6|0D@))ssI20