Spaces:
Runtime error
Runtime error
simonduerr
commited on
Commit
•
446c19d
1
Parent(s):
98082c1
Update app.py
Browse files
app.py
CHANGED
@@ -54,6 +54,7 @@ def predict_structure(prefix, feature_dict, model_runners, random_seed=0):
|
|
54 |
"""Predicts structure using AlphaFold for the given sequence."""
|
55 |
|
56 |
# Run the models.
|
|
|
57 |
plddts = {}
|
58 |
for model_name, model_runner in model_runners.items():
|
59 |
processed_feature_dict = model_runner.process_features(
|
@@ -328,15 +329,14 @@ with proteindream:
|
|
328 |
with gr.Row():
|
329 |
inp = gr.Textbox(placeholder="M", label="Start sequence")
|
330 |
length = gr.Number(value=50, label="Target sequence length")
|
331 |
-
btn = gr.Button("
|
332 |
-
|
333 |
-
seqs = [
|
334 |
-
"MTAEADPAPLAANPPAPVRPIQFHDVSVRYEARPWLRALWDVASGSFIGLLGASGAGKSTCVDLLNGVRKPSSGERFVRGQPSRGRKGRFNRRVAMVFQDVRHQLFSRSVAREIAFGLENLPTSAAAIDRRVS",
|
335 |
-
"MTAGIVAGGIAGGVAGYKAKKHRKAVKATMIAAGVSGGIGGGYIGEKFNRRLAKHEDRVRRSAPRHKKHSSYSKSSGEGGGILGKLFGR",
|
336 |
-
"MTAVLVAIALEMQNPHRMALAAVLCGQFTVAVAAEPFAPEGVAEGLNPLGDLLAESPLLEVVSATLALLVALGTATSLSWISGPVSALPAPSFQSSETPYPQRPIERESFDQDSREEDPWDRL",
|
337 |
-
"MTARVRNRSSSRSYVLDFADLADGQREVLLPESRGNASEVDLPAGTTVNVTIDVTASGTGTLTARTPDGADVVSNEYELTVERDTDLTRVETESPQVAAGETATVTGTAENVGTVAGEREVTAYVDGE",
|
338 |
-
"MTAAGWREEGTPFARIARQLGRHVTSVRQAAGRVRQQMGLTSPDPADPPRSGPTPTIPIEQERA",
|
339 |
-
]
|
340 |
seqChoice = gr.Radio(seqs, label="Generated sequences")
|
341 |
btn.click(fn=update_protGPT2, inputs=[inp, length], outputs=seqChoice)
|
342 |
gr.Markdown("## AlphaFold")
|
@@ -365,6 +365,6 @@ with proteindream:
|
|
365 |
"""
|
366 |
)
|
367 |
seqChoice.change(fn=update_seqs, inputs=seqChoice, outputs=chosenSeq)
|
368 |
-
btn2.click(fn=update, inputs=
|
369 |
|
370 |
proteindream.launch(share=False)
|
|
|
54 |
"""Predicts structure using AlphaFold for the given sequence."""
|
55 |
|
56 |
# Run the models.
|
57 |
+
# currently we only run model1
|
58 |
plddts = {}
|
59 |
for model_name, model_runner in model_runners.items():
|
60 |
processed_feature_dict = model_runner.process_features(
|
|
|
329 |
with gr.Row():
|
330 |
inp = gr.Textbox(placeholder="M", label="Start sequence")
|
331 |
length = gr.Number(value=50, label="Target sequence length")
|
332 |
+
btn = gr.Button("Predict sequences using protGPT2")
|
333 |
+
|
334 |
+
seqs = []
|
335 |
+
# "MTAEADPAPLAANPPAPVRPIQFHDVSVRYEARPWLRALWDVASGSFIGLLGASGAGKSTCVDLLNGVRKPSSGERFVRGQPSRGRKGRFNRRVAMVFQDVRHQLFSRSVAREIAFGLENLPTSAAAIDRRVS",
|
336 |
+
# "MTAGIVAGGIAGGVAGYKAKKHRKAVKATMIAAGVSGGIGGGYIGEKFNRRLAKHEDRVRRSAPRHKKHSSYSKSSGEGGGILGKLFGR",
|
337 |
+
# "MTAVLVAIALEMQNPHRMALAAVLCGQFTVAVAAEPFAPEGVAEGLNPLGDLLAESPLLEVVSATLALLVALGTATSLSWISGPVSALPAPSFQSSETPYPQRPIERESFDQDSREEDPWDRL",
|
338 |
+
# "MTARVRNRSSSRSYVLDFADLADGQREVLLPESRGNASEVDLPAGTTVNVTIDVTASGTGTLTARTPDGADVVSNEYELTVERDTDLTRVETESPQVAAGETATVTGTAENVGTVAGEREVTAYVDGE",
|
339 |
+
# "MTAAGWREEGTPFARIARQLGRHVTSVRQAAGRVRQQMGLTSPDPADPPRSGPTPTIPIEQERA",
|
|
|
340 |
seqChoice = gr.Radio(seqs, label="Generated sequences")
|
341 |
btn.click(fn=update_protGPT2, inputs=[inp, length], outputs=seqChoice)
|
342 |
gr.Markdown("## AlphaFold")
|
|
|
365 |
"""
|
366 |
)
|
367 |
seqChoice.change(fn=update_seqs, inputs=seqChoice, outputs=chosenSeq)
|
368 |
+
btn2.click(fn=update, inputs=chosenSeq, outputs=[mol, plot, meanpLDDT])
|
369 |
|
370 |
proteindream.launch(share=False)
|