Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from matplotlib import cm
|
|
8 |
|
9 |
st.image("banner.png", use_column_width=True)
|
10 |
st.markdown(
|
11 |
-
"<h1 style='text-align: center;'>CMR and Heart Failure Colocalisation Viewer</h1>",
|
12 |
unsafe_allow_html=True
|
13 |
)
|
14 |
|
@@ -27,6 +27,9 @@ annotations = pd.read_csv("colocalisation_results.csv")
|
|
27 |
annotations.fillna(0, inplace=True)
|
28 |
annotations = annotations.set_index("Gene")
|
29 |
|
|
|
|
|
|
|
30 |
# Define a function to collect genes from input
|
31 |
collect_genes = lambda x: [str(i) for i in re.split(",|,\s+|\s+", x) if i != ""]
|
32 |
input_gene_list = st.text_input("Input a list of multiple HGNC genes (enter comma separated):")
|
@@ -37,9 +40,6 @@ gene_list = collect_genes(input_gene_list)
|
|
37 |
def convert_df(df):
|
38 |
return df.to_csv(index=False).encode('utf-8')
|
39 |
|
40 |
-
# Filter based on gene list
|
41 |
-
st.markdown("### View colocalisation results for selected genes or the entire dataset.")
|
42 |
-
|
43 |
if len(gene_list) > 1:
|
44 |
# Filter for input gene list
|
45 |
df = annotations[annotations.index.isin(gene_list)]
|
|
|
8 |
|
9 |
st.image("banner.png", use_column_width=True)
|
10 |
st.markdown(
|
11 |
+
"<h1 style='text-align: center;'>CMR and Heart Failure Colocalisation Drug Interaction Viewer</h1>",
|
12 |
unsafe_allow_html=True
|
13 |
)
|
14 |
|
|
|
27 |
annotations.fillna(0, inplace=True)
|
28 |
annotations = annotations.set_index("Gene")
|
29 |
|
30 |
+
# Filter based on gene list
|
31 |
+
st.markdown("### View colocalising gene drug interaction results for selected genes/diseases or the entire dataset.")
|
32 |
+
|
33 |
# Define a function to collect genes from input
|
34 |
collect_genes = lambda x: [str(i) for i in re.split(",|,\s+|\s+", x) if i != ""]
|
35 |
input_gene_list = st.text_input("Input a list of multiple HGNC genes (enter comma separated):")
|
|
|
40 |
def convert_df(df):
|
41 |
return df.to_csv(index=False).encode('utf-8')
|
42 |
|
|
|
|
|
|
|
43 |
if len(gene_list) > 1:
|
44 |
# Filter for input gene list
|
45 |
df = annotations[annotations.index.isin(gene_list)]
|