predict protein sequence using esm from bio-embeddings
Browse files
app.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
import os
|
2 |
import sys
|
|
|
3 |
import numpy as np
|
4 |
import pandas as pd
|
5 |
import streamlit as st
|
|
|
6 |
|
7 |
from rdkit import Chem
|
8 |
from rdkit.Chem import Draw
|
@@ -183,6 +185,16 @@ def retrieval():
|
|
183 |
|
184 |
|
185 |
def display_protein():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
"""
|
187 |
sequence = st.text_input("Enter the amino-acid sequence of the query protein target", value="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA", placeholder="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA")
|
188 |
|
@@ -248,8 +260,9 @@ def display_protein():
|
|
248 |
|
249 |
page_names_to_func = {
|
250 |
'About': about_page,
|
251 |
-
|
252 |
-
|
|
|
253 |
}
|
254 |
|
255 |
selected_page = st.sidebar.selectbox('Choose function', page_names_to_func.keys())
|
|
|
1 |
import os
|
2 |
import sys
|
3 |
+
import torch
|
4 |
import numpy as np
|
5 |
import pandas as pd
|
6 |
import streamlit as st
|
7 |
+
import bio_embeddings.embed
|
8 |
|
9 |
from rdkit import Chem
|
10 |
from rdkit.Chem import Draw
|
|
|
185 |
|
186 |
|
187 |
def display_protein():
|
188 |
+
st.markdown('##')
|
189 |
+
|
190 |
+
st.markdown('### Target')
|
191 |
+
sequence = st.text_input('Enter the amino-acid sequence of the query protein target', value='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA', placeholder='HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA')
|
192 |
+
|
193 |
+
if sequence:
|
194 |
+
embeddings = bio_embeddings.embed(sequence, "esm")
|
195 |
+
coordinates = embeddings["esm"].detach().numpy()
|
196 |
+
st.write(coordinates)
|
197 |
+
|
198 |
"""
|
199 |
sequence = st.text_input("Enter the amino-acid sequence of the query protein target", value="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA", placeholder="HXHVWPVQDAKARFSEFLDACITEGPQIVSRRGAEEAVLVPIGEWRRLQAAA")
|
200 |
|
|
|
260 |
|
261 |
page_names_to_func = {
|
262 |
'About': about_page,
|
263 |
+
'Display DTI': display_dti,
|
264 |
+
'Retrieve Top-k': retrieval,
|
265 |
+
'Diplay Protein': display_dti
|
266 |
}
|
267 |
|
268 |
selected_page = st.sidebar.selectbox('Choose function', page_names_to_func.keys())
|