Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -877,21 +877,20 @@ with ui.navset_card_tab(id="tab"):
|
|
| 877 |
|
| 878 |
# plot the comparison
|
| 879 |
fig = None
|
| 880 |
-
if input.
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
-
return fig
|
| 895 |
# with ui.nav_panel("Viral Model"):
|
| 896 |
# gr.load("models/Hack90/virus_pythia_31_1024").launch()
|
| 897 |
|
|
|
|
| 877 |
|
| 878 |
# plot the comparison
|
| 879 |
fig = None
|
| 880 |
+
if input.plot_type_macro() == "2D Line":
|
| 881 |
+
fig = plot_2d_comparison(grouped, grouped.index)
|
| 882 |
+
if input.plot_type_macro() == "ColorSquare":
|
| 883 |
+
filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
|
| 884 |
+
fig = plot_color_square(filtered_df['Sequence'], filtered_df['Organism_Name'].unique())
|
| 885 |
+
if input.plot_type_macro() == "Wens Method":
|
| 886 |
+
fig = wens_method_heatmap(df, df['Organism_Name'].unique())
|
| 887 |
+
if input.plot_type_macro() == "Chaos Game Representation":
|
| 888 |
+
filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
|
| 889 |
+
fig = plot_fcgr(filtered_df['Sequence'], df['Organism_Name'].unique())
|
| 890 |
+
if input.plot_type_macro() == "Persistant Homology":
|
| 891 |
+
filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
|
| 892 |
+
fig = plot_persistence_homology(filtered_df['Sequence'], filtered_df['Organism_Name'])
|
| 893 |
+
return fig
|
|
|
|
| 894 |
# with ui.nav_panel("Viral Model"):
|
| 895 |
# gr.load("models/Hack90/virus_pythia_31_1024").launch()
|
| 896 |
|