Hack90 commited on
Commit
2536328
·
verified ·
1 Parent(s): d42b01d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -15
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.tab() =='Viral Macrostructure':
881
- if input.plot_type_macro() == "2D Line":
882
- fig = plot_2d_comparison(grouped, grouped.index)
883
- if input.plot_type_macro() == "ColorSquare":
884
- filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
885
- fig = plot_color_square(filtered_df['Sequence'], filtered_df['Organism_Name'].unique())
886
- if input.plot_type_macro() == "Wens Method":
887
- fig = wens_method_heatmap(df, df['Organism_Name'].unique())
888
- if input.plot_type_macro() == "Chaos Game Representation":
889
- filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
890
- fig = plot_fcgr(filtered_df['Sequence'], df['Organism_Name'].unique())
891
- if input.plot_type_macro() == "Persistant Homology":
892
- filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
893
- fig = plot_persistence_homology(filtered_df['Sequence'], filtered_df['Organism_Name'])
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