Spaces:
Build error
Build error
add table for associations
Browse files
app.py
CHANGED
|
@@ -59,11 +59,13 @@ with col2:
|
|
| 59 |
# check the user input
|
| 60 |
try:
|
| 61 |
cnag_id_1 = h99_transcript_annotations.loc[h99_transcript_annotations["gene_id"] == gene_id_1]["cnag_id"].values
|
|
|
|
| 62 |
except:
|
| 63 |
st.error(f"Unable to locate cnag_id for Gene ID 1: {gene_id_1}, it should be of the form 'CNAG_######'")
|
| 64 |
|
| 65 |
try:
|
| 66 |
cnag_id_2 = h99_transcript_annotations.loc[h99_transcript_annotations["gene_id"] == gene_id_2]["cnag_id"].values
|
|
|
|
| 67 |
except:
|
| 68 |
st.error(f"Unable to locate cnag_id for Gene ID 2: {gene_id_2}, it should be of the form 'CNAG_######'")
|
| 69 |
|
|
@@ -75,6 +77,16 @@ chart_data = chart_data.merge(
|
|
| 75 |
right = estimated_expression_meta,
|
| 76 |
on = "run_accession")
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
chart = (
|
| 79 |
alt.Chart(
|
| 80 |
chart_data,
|
|
|
|
| 59 |
# check the user input
|
| 60 |
try:
|
| 61 |
cnag_id_1 = h99_transcript_annotations.loc[h99_transcript_annotations["gene_id"] == gene_id_1]["cnag_id"].values
|
| 62 |
+
description_1 = h99_transcript_annotations.loc[h99_transcript_annotations["gene_id"] == gene_id_1]["description"].values[0]
|
| 63 |
except:
|
| 64 |
st.error(f"Unable to locate cnag_id for Gene ID 1: {gene_id_1}, it should be of the form 'CNAG_######'")
|
| 65 |
|
| 66 |
try:
|
| 67 |
cnag_id_2 = h99_transcript_annotations.loc[h99_transcript_annotations["gene_id"] == gene_id_2]["cnag_id"].values
|
| 68 |
+
description_2 = h99_transcript_annotations.loc[h99_transcript_annotations["gene_id"] == gene_id_2]["description"].values[0]
|
| 69 |
except:
|
| 70 |
st.error(f"Unable to locate cnag_id for Gene ID 2: {gene_id_2}, it should be of the form 'CNAG_######'")
|
| 71 |
|
|
|
|
| 77 |
right = estimated_expression_meta,
|
| 78 |
on = "run_accession")
|
| 79 |
|
| 80 |
+
st.markdown("""
|
| 81 |
+
### Gene 1:
|
| 82 |
+
* gene_id: [{gene_id_1}](https://fungidb.org/fungidb/app/record/gene/{gene_id_1})
|
| 83 |
+
* description: {description_1}
|
| 84 |
+
|
| 85 |
+
### Gene 2:
|
| 86 |
+
* gene_id: [{gene_id_2}](https://fungidb.org/fungidb/app/record/gene/{gene_id_2})
|
| 87 |
+
* description: {description_2}
|
| 88 |
+
""")
|
| 89 |
+
|
| 90 |
chart = (
|
| 91 |
alt.Chart(
|
| 92 |
chart_data,
|