Spaces:
Sleeping
Sleeping
Erva Ulusoy
commited on
Commit
·
dcd5e55
1
Parent(s):
d5eadf8
Update ProtHGT_app.py
Browse files- ProtHGT_app.py +5 -3
ProtHGT_app.py
CHANGED
@@ -5,7 +5,7 @@ import streamlit.components.v1 as components
|
|
5 |
import pandas as pd
|
6 |
|
7 |
|
8 |
-
with st.spinner("Please wait while we prepare the environment. This may take
|
9 |
# Run setup script if not already executed
|
10 |
if not os.path.exists(".setup_done"):
|
11 |
start_time = time.time()
|
@@ -109,9 +109,10 @@ with st.sidebar:
|
|
109 |
protein_list = list(filter(None, protein_list))
|
110 |
protein_list = list(dict.fromkeys(protein_list))
|
111 |
|
112 |
-
#
|
113 |
-
protein_list = [p for p in protein_list if p in available_proteins]
|
114 |
proteins_not_found = [p for p in protein_list if p not in available_proteins]
|
|
|
|
|
115 |
|
116 |
if len(protein_list) > 1000:
|
117 |
st.error("Please upload a file with maximum 1000 protein IDs.")
|
@@ -119,6 +120,7 @@ with st.sidebar:
|
|
119 |
else:
|
120 |
selected_proteins = protein_list
|
121 |
st.write(f"Loaded {len(selected_proteins)} proteins")
|
|
|
122 |
if proteins_not_found:
|
123 |
st.error(f"Proteins not found in input knowledge graph: {', '.join(proteins_not_found)}")
|
124 |
st.warning("Currently, our system can generate predictions only for proteins included in our input knowledge graph. Real-time retrieval of relationship data from external source databases is not yet supported. However, we are actively working on integrating this capability in future updates.")
|
|
|
5 |
import pandas as pd
|
6 |
|
7 |
|
8 |
+
with st.spinner("Please wait while we prepare the environment. This may take up to 10 minutes on the first run..."):
|
9 |
# Run setup script if not already executed
|
10 |
if not os.path.exists(".setup_done"):
|
11 |
start_time = time.time()
|
|
|
109 |
protein_list = list(filter(None, protein_list))
|
110 |
protein_list = list(dict.fromkeys(protein_list))
|
111 |
|
112 |
+
# Check for proteins not in available_proteins
|
|
|
113 |
proteins_not_found = [p for p in protein_list if p not in available_proteins]
|
114 |
+
# Filter to keep only available proteins
|
115 |
+
protein_list = [p for p in protein_list if p in available_proteins]
|
116 |
|
117 |
if len(protein_list) > 1000:
|
118 |
st.error("Please upload a file with maximum 1000 protein IDs.")
|
|
|
120 |
else:
|
121 |
selected_proteins = protein_list
|
122 |
st.write(f"Loaded {len(selected_proteins)} proteins")
|
123 |
+
|
124 |
if proteins_not_found:
|
125 |
st.error(f"Proteins not found in input knowledge graph: {', '.join(proteins_not_found)}")
|
126 |
st.warning("Currently, our system can generate predictions only for proteins included in our input knowledge graph. Real-time retrieval of relationship data from external source databases is not yet supported. However, we are actively working on integrating this capability in future updates.")
|