wzkariampuzha commited on
Commit
26498e1
1 Parent(s): d318f36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -115,15 +115,15 @@ loaded.empty()
115
  st.markdown("Examples of rare diseases include [**Fellman syndrome**](https://rarediseases.info.nih.gov/diseases/1/gracile-syndrome), [**Classic Homocystinuria**](https://rarediseases.info.nih.gov/diseases/6667/classic-homocystinuria), [**7383**](https://rarediseases.info.nih.gov/diseases/7383/phenylketonuria), and [**GARD:0009941**](https://rarediseases.info.nih.gov/diseases/9941/fshmd1a). A full list of rare diseases tracked by the NIH Genetic and Rare Diseases Information Center (GARD) can be found [here](https://rarediseases.info.nih.gov/diseases/browse-by-first-letter).")
116
 
117
  if disease_or_gard_id:
118
- df, sankey_data, name_gardID = streamlit_extraction(disease_or_gard_id, max_results, filtering,
119
  epi_extract, rd_identify, extract_diseases, epi_classify)
120
  #IF it returns something, then continue.
121
  if sankey_data:
122
  df.replace(to_replace='None', value="None")
123
  st.dataframe(df, height=200)
124
  csv = convert_df(df)
125
- disease, gardID = name_gardID
126
  #if the user input does not have a number in it (i.e. weak proxy for if it is a GARD ID), then preserve the user input as the disease term.
 
127
  if not bool(re.search(r'\d', disease_or_gard_id)):
128
  disease = disease_or_gard_id
129
 
@@ -133,10 +133,10 @@ if disease_or_gard_id:
133
  file_name=disease+'.csv',
134
  mime='text/csv',
135
  )
 
 
136
 
137
- st.markdown('See the NIH GARD page for ['+disease+'](https://rarediseases.info.nih.gov/diseases/'+str(re.sub('GARD:|0','',gardID))+'/'+str('-'.join(disease.split()))+')')
138
-
139
- fig = epi_sankey(sankey_data,disease)
140
  st.plotly_chart(fig, use_container_width=True)
141
 
142
  if 'IDS' in list(df.columns):
 
115
  st.markdown("Examples of rare diseases include [**Fellman syndrome**](https://rarediseases.info.nih.gov/diseases/1/gracile-syndrome), [**Classic Homocystinuria**](https://rarediseases.info.nih.gov/diseases/6667/classic-homocystinuria), [**7383**](https://rarediseases.info.nih.gov/diseases/7383/phenylketonuria), and [**GARD:0009941**](https://rarediseases.info.nih.gov/diseases/9941/fshmd1a). A full list of rare diseases tracked by the NIH Genetic and Rare Diseases Information Center (GARD) can be found [here](https://rarediseases.info.nih.gov/diseases/browse-by-first-letter).")
116
 
117
  if disease_or_gard_id:
118
+ df, sankey_data, disease_gardid = streamlit_extraction(disease_or_gard_id, max_results, filtering,
119
  epi_extract, rd_identify, extract_diseases, epi_classify)
120
  #IF it returns something, then continue.
121
  if sankey_data:
122
  df.replace(to_replace='None', value="None")
123
  st.dataframe(df, height=200)
124
  csv = convert_df(df)
 
125
  #if the user input does not have a number in it (i.e. weak proxy for if it is a GARD ID), then preserve the user input as the disease term.
126
+ disease, gardID = disease_gardid
127
  if not bool(re.search(r'\d', disease_or_gard_id)):
128
  disease = disease_or_gard_id
129
 
 
133
  file_name=disease+'.csv',
134
  mime='text/csv',
135
  )
136
+ if gardID:
137
+ st.markdown('See the NIH GARD page for ['+disease+'](https://rarediseases.info.nih.gov/diseases/'+str(re.sub('GARD:|0','',gardID))+'/'+str('-'.join(disease.split()))+')')
138
 
139
+ fig = epi_sankey(sankey_data, disease)
 
 
140
  st.plotly_chart(fig, use_container_width=True)
141
 
142
  if 'IDS' in list(df.columns):