arikat commited on
Commit
f0548df
1 Parent(s): e0dca03

app update

Browse files
Files changed (1) hide show
  1. app.py +11 -15
app.py CHANGED
@@ -407,7 +407,7 @@ def main_function_single(sequence, show_explanation):
407
  donor_label, donor_img, *_ = process_single_sequence(sequence)
408
  figmap = None
409
  if show_explanation:
410
- figmap = generate_heatmap(sequence)
411
  return family_label, family_img, family_info, donor_label, donor_img, figmap
412
 
413
  def main_function_upload(protein_file): #, progress=gr.Progress()
@@ -417,6 +417,7 @@ prediction_imagefam = gr.outputs.Image(type='pil', label="Family prediction grap
417
  prediction_imagedonor = gr.outputs.Image(type='pil', label="Donor prediction graph")
418
  prediction_explain = gr.outputs.Image(type='pil', label="Donor prediction explanation")
419
 
 
420
  with gr.Blocks() as app:
421
  gr.Markdown("# Glydentify")
422
 
@@ -428,16 +429,11 @@ with gr.Blocks() as app:
428
  with gr.Column():
429
  with gr.Accordion("Example:"):
430
  gr.Markdown("""
431
- \>Q9LTZ9|GALS2_ARATH Galactan beta-1,4-galactosyltransferase GALS2
432
- MAKERDQNTKDKNLLICFLWNFSAELKLALMALLVLCTLATLLPFLPSSFSISASELRFC
433
- ISRIAVNSTSVNFTTVVEKPVLDNAVKLTEKPVLDNGVTKQPLTEEKVLNNGVIKRTFTG
434
- YGWAAYNFVLMNAYRGGVNTFAVIGLSSKPLHVYSHPTYRCEWIPLNQSDNRILTDGTKI
435
- LTDWGYGRVYTTVVVNCTFPSNTVINPKNTGGTLLLHATTGDTDRNITDSIPVLTETPNT
436
- VDFALYESNLRRREKYDYLYCGSSLYGNLSPQRIREWIAYHVRFFGERSHFVLHDAGGIT
437
- EEVFEVLKPWIELGRVTVHDIREQERFDGYYHNQFMVVNDCLHRYRFMAKWMFFFDVDEF
438
- IYVPAKSSISSVMVSLEEYSQFTIEQMPMSSQLCYDGDGPARTYRKWGFEKLAYRDVKKV
439
- PRRDRKYAVQPRNVFATGVHMSQHLQGKTYHRAEGKIRYFHYHGSISQRREPCRHLYNGT
440
- RIVHENN
441
  """)
442
  family_prediction = gr.outputs.Textbox(label="Predicted family")
443
  donor_prediction = gr.outputs.Textbox(label="Predicted donor")
@@ -447,10 +443,9 @@ with gr.Blocks() as app:
447
  with gr.Row().style(equal_height=True):
448
  with gr.Column():
449
  predict_button = gr.Button("Predict")
450
- predict_button.click(main_function_single, inputs=[sequence, explanation_checkbox],
451
- outputs=[family_prediction, prediction_imagefam, info_markdown,
452
- donor_prediction, prediction_imagedonor, prediction_explain])
453
-
454
 
455
  # Family & Donor Section
456
  with gr.Row().style(equal_height=True):
@@ -483,3 +478,4 @@ with gr.Blocks() as app:
483
  app.launch(show_error=True)
484
 
485
 
 
 
407
  donor_label, donor_img, *_ = process_single_sequence(sequence)
408
  figmap = None
409
  if show_explanation:
410
+ figmap = generate_heatmap(sequence)
411
  return family_label, family_img, family_info, donor_label, donor_img, figmap
412
 
413
  def main_function_upload(protein_file): #, progress=gr.Progress()
 
417
  prediction_imagedonor = gr.outputs.Image(type='pil', label="Donor prediction graph")
418
  prediction_explain = gr.outputs.Image(type='pil', label="Donor prediction explanation")
419
 
420
+
421
  with gr.Blocks() as app:
422
  gr.Markdown("# Glydentify")
423
 
 
429
  with gr.Column():
430
  with gr.Accordion("Example:"):
431
  gr.Markdown("""
432
+ \>sp|Q9Y5Z6|B3GT1_HUMAN Beta-1,3-galactosyltransferase 1 OS=Homo sapiens OX=9606 GN=B3GALT1 PE=1 SV=1
433
+ MASKVSCLYVLTVVCWASALWYLSITRPTSSYTGSKPFSHLTVARKNFTFGNIRTRPINPHSFEFLINEPNKCEKNIPFLVILIST
434
+ THKEFDARQAIRETWGDENNFKGIKIATLFLLGKNADPVLNQMVEQESQIFHDIIVEDFIDSYHNLTLKTLMGMRWVATFCSK
435
+ AKYVMKTDSDIFVNMDNLIYKLLKPSTKPRRRYFTGYVINGGPIRDVRSKWYMPRDLYPDSNYPPFCSGTGYIFSADVAELIYK
436
+ TSLHTRLLHLEDVYVGLCLRKLGIHPFQNSGFNHWKMAYSLCRYRRVITVHQISPEEMHRIWNDMSSKKHLRC
 
 
 
 
 
437
  """)
438
  family_prediction = gr.outputs.Textbox(label="Predicted family")
439
  donor_prediction = gr.outputs.Textbox(label="Predicted donor")
 
443
  with gr.Row().style(equal_height=True):
444
  with gr.Column():
445
  predict_button = gr.Button("Predict")
446
+ predict_button.click(main_function_single, inputs=[sequence, explanation_checkbox],
447
+ outputs=[family_prediction, prediction_imagefam, info_markdown,
448
+ donor_prediction, prediction_imagedonor, prediction_explain])
 
449
 
450
  # Family & Donor Section
451
  with gr.Row().style(equal_height=True):
 
478
  app.launch(show_error=True)
479
 
480
 
481
+