Spaces:
Runtime error
Runtime error
osanseviero
commited on
Commit
•
9b9bc05
1
Parent(s):
546cfd5
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,25 @@ import py3Dmol
|
|
3 |
import streamlit as st
|
4 |
import requests
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
headers = {
|
9 |
'Content-Type': 'application/x-www-form-urlencoded',
|
@@ -13,8 +31,7 @@ response = requests.post('https://api.esmatlas.com/foldSequence/v1/pdb/', header
|
|
13 |
name = sequence[:3] + sequence[-3:]
|
14 |
pdb_string = response.content.decode('utf-8')
|
15 |
|
16 |
-
|
17 |
-
st.markdown("You can input a single protein sequence and you get the predicted protein structure")
|
18 |
|
19 |
xyzview = py3Dmol.view()
|
20 |
xyzview.addModel(pdb_string,'pdb')
|
|
|
3 |
import streamlit as st
|
4 |
import requests
|
5 |
|
6 |
+
st.markdown("# ESM-2 Protein Folding demo")
|
7 |
+
st.markdown("You can input a single protein sequence and you get the predicted protein structure")
|
8 |
+
|
9 |
+
option = st.selectbox(
|
10 |
+
'Select a protein',
|
11 |
+
("Antifreeze protein", "Plastic degradation protein", "AI Generated protein", "7-bladed propeller fold", "custom"))
|
12 |
+
|
13 |
+
if option == "Plastic degradation protein":
|
14 |
+
suggestion = "MGSSHHHHHHSSGLVPRGSHMRGPNPTAASLEASAGPFTVRSFTVSRPSGYGAGTVYYPTNAGGTVGAIAIVPGYTARQSSIKWWGPRLASHGFVVITIDTNSTLDQPSSRSSQQMAALRQVASLNGTSSSPIYGKVDTARMGVMGWSMGGGGSLISAANNPSLKAAAPQAPWDSSTNFSSVTVPTLIFACENDSIAPVNSSALPIYDSMSRNAKQFLEINGGSHSCANSGNSNQALIGKKGVAWMKRFMDNDTRYSTFACENPNSTRVSDFRTANCSLEDPAANKARKEAELAAATAEQ"
|
15 |
+
elif option == "Antifreeze protein":
|
16 |
+
suggestion = "QCTGGADCTSCTGACTGCGNCPNAVTCTNSQHCVKANTCTGSTDCNTAQTCTNSKDCFEANTCTDSTNCYKATACTNSSGCPGH"
|
17 |
+
elif option = "AI Generated protein":
|
18 |
+
suggestion = "MSGMKKLYEYTVTTLDEFLEKLKEFILNTSKDKIYKLTITNPKLIKDIGKAIAKAAEIADVDPKEIEEMIKAVEENELTKLVITIEQTDDKYVIKVELENEDGLVHSFEIYFKNKEEMEKFLELLEKLISKLSGS"
|
19 |
+
elif option = "7-bladed propeller fold":
|
20 |
+
suggestion = "VKLAGNSSLCPINGWAVYSKDNSIRIGSKGDVFVIREPFISCSHLECRTFFLTQGALLNDKHSNGTVKDRSPHRTLMSCPVGEAPSPYNSRFESVAWSASACHDGTSWLTIGISGPDNGAVAVLKYNGIITDTIKSWRNNILRTQESECACVNGSCFTVMTDGPSNGQASYKIFKMEKGKVVKSVELDAPNYHYEECSCYPNAGEITCVCRDNWHGSNRPWVSFNQNLEYQIGYICSGVFGDNPRPNDGTGSCGPVSSNGAYGVKGFSFKYGNGVWIGRTKSTNSRSGFEMIWDPNGWTETDSSFSVKQDIVAITDWSGYSGSFVQHPELTGLDCIRPCFWVELIRGRPKESTIWTSGSSISFCGVNSDTVGWSWPDGAELPFTIDK"
|
21 |
+
else:
|
22 |
+
suggestion = ""
|
23 |
+
|
24 |
+
sequence = st.text_input(label="Protein Sequence", value=suggestion)
|
25 |
|
26 |
headers = {
|
27 |
'Content-Type': 'application/x-www-form-urlencoded',
|
|
|
31 |
name = sequence[:3] + sequence[-3:]
|
32 |
pdb_string = response.content.decode('utf-8')
|
33 |
|
34 |
+
|
|
|
35 |
|
36 |
xyzview = py3Dmol.view()
|
37 |
xyzview.addModel(pdb_string,'pdb')
|