Erva Ulusoy commited on
Commit
3a2340f
·
1 Parent(s): c86e7b2

show discarded proteins in expander

Browse files
Files changed (1) hide show
  1. ProtHGT_app.py +21 -2
ProtHGT_app.py CHANGED
@@ -123,12 +123,31 @@ with st.sidebar:
123
 
124
  if proteins_not_found:
125
  st.warning(f"""
126
- The following proteins were not found in our input knowledge graph and have been discarded: {', '.join(proteins_not_found)}.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  Currently, our system can only generate predictions for proteins that are already included in our knowledge graph. **Real-time retrieval of relationship data from external source databases is not yet supported.**
128
  We are actively working on integrating this capability in future updates. Stay tuned!
129
  """)
130
  if selected_proteins:
131
- # Option 1: Collapsible expander
132
  with st.expander("View Selected Proteins"):
133
  st.write(f"Total proteins selected: {len(selected_proteins)}")
134
 
 
123
 
124
  if proteins_not_found:
125
  st.warning(f"""
126
+ The following proteins were not found in our input knowledge graph and have been discarded:
127
+ """)
128
+ with st.expander("View Discarded Proteins"):
129
+ # Create scrollable container with fixed height
130
+ st.markdown(
131
+ f"""
132
+ <div style="
133
+ height: 150px;
134
+ overflow-y: scroll;
135
+ border: 1px solid #ccc;
136
+ border-radius: 4px;
137
+ padding: 8px;
138
+ margin-bottom: 16px;
139
+ background-color: white;">
140
+ {'<br>'.join(proteins_not_found)}
141
+ </div>
142
+ """,
143
+ unsafe_allow_html=True
144
+ )
145
+
146
+ st.warning(f"""
147
  Currently, our system can only generate predictions for proteins that are already included in our knowledge graph. **Real-time retrieval of relationship data from external source databases is not yet supported.**
148
  We are actively working on integrating this capability in future updates. Stay tuned!
149
  """)
150
  if selected_proteins:
 
151
  with st.expander("View Selected Proteins"):
152
  st.write(f"Total proteins selected: {len(selected_proteins)}")
153