Repository navigation
Expand file tree
/
Copy pathapp.py
More file actions
54 lines (49 loc) 路 2.7 KB
/
Copy pathapp.py
File metadata and controls
54 lines (49 loc) 路 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import os
# Polars' default (CPU-core-count-sized) native thread pool access-violation
# crashes the whole process on some high-core-count Windows machines when
# invoked from Streamlit's script-runner thread. Must be set before polars
# is imported anywhere (including transitively via openms_insight).
os.environ.setdefault("POLARS_MAX_THREADS", "1")
import streamlit as st
from pathlib import Path
import json
# For some reason the windows version only works if this is imported here
import pyopenms
if "settings" not in st.session_state:
with open("settings.json", "r") as f:
st.session_state.settings = json.load(f)
if __name__ == '__main__':
pages = {
"Welcome": [
st.Page(Path("content", "quickstart.py"), title="Quickstart", icon="馃憢"),
],
"Workflow": [
st.Page(Path("content", "workflow_fileupload.py"), title="File Upload", icon="馃搧"),
st.Page(Path("content", "workflow_configure.py"), title="Configure", icon="鈿欙笍"),
st.Page(Path("content", "workflow_run.py"), title="Run", icon="馃殌"),
],
"Workflow Results": [
st.Page(Path("content", "results_database_search.py"), title="Database Search", icon="馃敩"),
st.Page(Path("content", "results_rescoring.py"), title="Rescoring", icon="馃搱"),
st.Page(Path("content", "results_filtered.py"), title="Filtered PSMs", icon="馃幆"),
st.Page(Path("content", "results_abundance.py"), title="Protein Abundance", icon="馃搵"),
st.Page(Path("content", "results_download.py"), title="Download", icon="猬囷笍"),
],
# Steps run in order; each one works on the previous step's output.
"Downstream Analysis": [
st.Page(Path("content", "filtering.py"), title="1. Filtering", icon="馃Ч"),
st.Page(Path("content", "imputation.py"), title="2. Imputation", icon="馃┕"),
st.Page(Path("content", "normalization.py"), title="3. Normalization", icon="鈿栵笍"),
st.Page(Path("content", "statistical.py"), title="4. Statistics", icon="馃敘"),
],
# Every plot reads the latest Downstream Analysis output.
"Downstream Plots": [
st.Page(Path("content", "results_volcano.py"), title="Volcano", icon="馃寢"),
st.Page(Path("content", "results_pca.py"), title="PCA", icon="馃搳"),
st.Page(Path("content", "results_heatmap.py"), title="Heatmap", icon="馃敟"),
st.Page(Path("content", "results_heatmap_clustered.py"), title="Clustered Heatmap", icon="馃К"),
st.Page(Path("content", "enrichment.py"), title="Pathway Analysis", icon="馃搲"),
]
}
pg = st.navigation(pages)
pg.run()