jfataphd commited on
Commit
ca014db
·
1 Parent(s): 1edc895

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -405,6 +405,7 @@ if query:
405
  m = df1.Word.isin(df2.symbol)
406
  df1 = df1[m]
407
  df1.rename(columns={'Word': 'Genes'}, inplace=True)
 
408
  df_len = len(df1)
409
  # print(len(df1))
410
 
@@ -425,7 +426,7 @@ if query:
425
 
426
  df11 = df1.head(value_gene).copy()
427
 
428
- df11.index = (1 / df11.index) * 10000
429
  sizes = df11.index.tolist()
430
 
431
  df11.set_index('Genes', inplace=True)
@@ -563,6 +564,7 @@ if query:
563
  m = df1.Word.isin(df2.drugs)
564
  df1 = df1[m]
565
  df1.rename(columns={'Word': 'Drugs'}, inplace=True)
 
566
  df_len = len(df1)
567
  # print(len(df1))
568
  # df1["Human Gene"] = df1["Human Gene"].str.upper()
@@ -589,7 +591,8 @@ if query:
589
 
590
  df13 = df1.head(value_drug).copy()
591
 
592
- df13.index = (1 / df13.index) * 10000
 
593
  sizes = df13.index.tolist()
594
 
595
  df13.set_index('Drugs', inplace=True)
@@ -723,6 +726,7 @@ if query:
723
  m = df1.Word.isin(df2.phyto)
724
  df1 = df1[m]
725
  df1.rename(columns={'Word': 'Phytochemical'}, inplace=True)
 
726
  df_len = len(df1)
727
  # print(len(df1))
728
  # df1["Human Gene"] = df1["Human Gene"].str.upper()
@@ -750,7 +754,7 @@ if query:
750
 
751
  df15 = df1.head(value_phyto).copy()
752
 
753
- df15.index = (1 / df15.index) * 10000
754
  sizes = df15.index.tolist()
755
 
756
  df15.set_index('Phytochemical', inplace=True)
@@ -884,6 +888,7 @@ if query:
884
  m = df1.Word.isin(df2.compound)
885
  df1 = df1[m]
886
  df1.rename(columns={'Word': 'Compounds'}, inplace=True)
 
887
  df_len = len(df1)
888
  # df1["Human Gene"] = df1["Human Gene"].str.upper()
889
  # print(df1.head(50))
@@ -910,7 +915,7 @@ if query:
910
 
911
  df12 = df1.head(value_compound).copy()
912
 
913
- df12.index = (1 / df12.index) * 10000
914
  sizes = df12.index.tolist()
915
 
916
  df12.set_index('Compounds', inplace=True)
 
405
  m = df1.Word.isin(df2.symbol)
406
  df1 = df1[m]
407
  df1.rename(columns={'Word': 'Genes'}, inplace=True)
408
+ df1.reset_index(drop=True, inplace=True) # Reset the index here
409
  df_len = len(df1)
410
  # print(len(df1))
411
 
 
426
 
427
  df11 = df1.head(value_gene).copy()
428
 
429
+ df11.index = (1 / (df11.index + 1)) * 10000 # Add 1 to the index before dividing
430
  sizes = df11.index.tolist()
431
 
432
  df11.set_index('Genes', inplace=True)
 
564
  m = df1.Word.isin(df2.drugs)
565
  df1 = df1[m]
566
  df1.rename(columns={'Word': 'Drugs'}, inplace=True)
567
+ df1.reset_index(drop=True, inplace=True)
568
  df_len = len(df1)
569
  # print(len(df1))
570
  # df1["Human Gene"] = df1["Human Gene"].str.upper()
 
591
 
592
  df13 = df1.head(value_drug).copy()
593
 
594
+ df13.index = (1 / (df13.index + 1)) * 10000
595
+
596
  sizes = df13.index.tolist()
597
 
598
  df13.set_index('Drugs', inplace=True)
 
726
  m = df1.Word.isin(df2.phyto)
727
  df1 = df1[m]
728
  df1.rename(columns={'Word': 'Phytochemical'}, inplace=True)
729
+ df1.reset_index(drop=True, inplace=True)
730
  df_len = len(df1)
731
  # print(len(df1))
732
  # df1["Human Gene"] = df1["Human Gene"].str.upper()
 
754
 
755
  df15 = df1.head(value_phyto).copy()
756
 
757
+ df15.index = (1 / (df15.index + 1)) * 10000
758
  sizes = df15.index.tolist()
759
 
760
  df15.set_index('Phytochemical', inplace=True)
 
888
  m = df1.Word.isin(df2.compound)
889
  df1 = df1[m]
890
  df1.rename(columns={'Word': 'Compounds'}, inplace=True)
891
+ df1.reset_index(drop=True, inplace=True)
892
  df_len = len(df1)
893
  # df1["Human Gene"] = df1["Human Gene"].str.upper()
894
  # print(df1.head(50))
 
915
 
916
  df12 = df1.head(value_compound).copy()
917
 
918
+ df12.index = (1 / (df12.index + 1)) * 10000
919
  sizes = df12.index.tolist()
920
 
921
  df12.set_index('Compounds', inplace=True)