This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
streamlit_app.py
76 lines (58 loc) · 3.21 KB
/
streamlit_app.py
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python3
# PIA - STREAMLIT WEBUI
# 2021 (c) Micha Johannes Birklbauer
# https://github.com/michabirklbauer/
# micha.birklbauer@gmail.com
"""
#####################################################
## ##
## -- STREAMLIT MAIN APP -- ##
## ##
#####################################################
"""
import streamlit as st
from scripts import PIAWebBase, PIAWebScore, PIAWebPredict
# main page
def main():
about_str = \
"""
**PIA/PIAWeb 1.0.0**
**PIA** - short for **Protein Interaction Analyzer** - is a tool for automatic identification of important interactions and interaction-frequency-based scoring in protein-ligand complexes.
**Contact:** [Micha Birklbauer](mailto:micha.birklbauer@gmail.com)
**License:** [MIT License](https://github.com/michabirklbauer/piaweb/blob/master/LICENSE.md)
"""
st.set_page_config(page_title = "PIA - Protein Interaction Analyzer",
page_icon = ":test_tube:",
layout = "centered",
initial_sidebar_state = "expanded",
menu_items = {"Get Help": "https://github.com/michabirklbauer/PIA/discussions",
"Report a bug": "https://github.com/michabirklbauer/PIA/issues",
"About": about_str}
)
pages = ("PIA: Extract Interactions", "PIAScore: Score Complexes", "PIAPredict: Predict Complexes")
title = st.sidebar.title("PIA - Protein Interaction Analyzer")
logo = st.sidebar.image("img/pmu_logo.jpg", caption = "PIA was developed in cooperation with the Institute of Pharmacy of the Paracelsus Medical Private University Salzburg.")
page = st.sidebar.selectbox(label = "Select a Workflow:",
options = pages,
index = 0,
help = "Select a workflow that you want to run."
)
doc_str = "**PIA** - short for **Protein Interaction Analyzer** - is a tool for automatic identification of important "
doc_str += "interactions and interaction-frequency-based scoring in protein-ligand complexes. To get started make sure to read "
doc_str += "the documentation in the [PIA Wiki](https://github.com/michabirklbauer/PIA/wiki). For general help, questions, suggestions or any other feedback please refer "
doc_str += "to the [GitHub repository](https://github.com/michabirklbauer/PIA/discussions) or contact us directly!"
doc = st.sidebar.markdown(doc_str)
contact_str = "**Contact:** [Micha Birklbauer](mailto:micha.birklbauer@gmail.com)"
contact = st.sidebar.markdown(contact_str)
license_str = "**License:** [MIT License](https://github.com/michabirklbauer/piaweb/blob/master/LICENSE.md)"
license = st.sidebar.markdown(license_str)
if page == "PIA: Extract Interactions":
PIAWebBase.main()
elif page == "PIAScore: Score Complexes":
PIAWebScore.main()
elif page == "PIAPredict: Predict Complexes":
PIAWebPredict.main()
else:
PIAWebBase.main()
if __name__ == "__main__":
main()