Spaces:
Sleeping
Sleeping
add query_param support
Browse files
app.py
CHANGED
@@ -4,6 +4,14 @@ from st_aggrid import AgGrid, GridOptionsBuilder, JsCode
|
|
4 |
|
5 |
st.set_page_config(layout='wide')
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
st.markdown("""
|
8 |
# CryptoCEN Top50 co-expressed partners
|
9 |
|
@@ -32,7 +40,7 @@ col1, col2, col3 = st.columns(spec = [0.3, 0.2, 0.5])
|
|
32 |
with col1:
|
33 |
gene_id = st.text_input(
|
34 |
label = "Gene ID",
|
35 |
-
value = "
|
36 |
max_chars = 10,
|
37 |
help = "CNAG Gene ID e.g. CNAG_04365")
|
38 |
|
|
|
4 |
|
5 |
st.set_page_config(layout='wide')
|
6 |
|
7 |
+
# parse out gene_ids from URL query args to it's possible to link to this page
|
8 |
+
query_params = st.query_params
|
9 |
+
if "gene_id" in query_params.keys():
|
10 |
+
gene_id = query_params["gene_id"]
|
11 |
+
else:
|
12 |
+
gene_id = "CNAG_04365"
|
13 |
+
|
14 |
+
|
15 |
st.markdown("""
|
16 |
# CryptoCEN Top50 co-expressed partners
|
17 |
|
|
|
40 |
with col1:
|
41 |
gene_id = st.text_input(
|
42 |
label = "Gene ID",
|
43 |
+
value = f"{gene_id}",
|
44 |
max_chars = 10,
|
45 |
help = "CNAG Gene ID e.g. CNAG_04365")
|
46 |
|