Update app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ import urllib3
|
|
| 10 |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 11 |
|
| 12 |
st.set_page_config(layout='wide')
|
| 13 |
-
st.sidebar.title('
|
| 14 |
-
st.sidebar.write('[*ESMFold*](https://esmatlas.com/about) is an end-to-end single sequence protein structure predictor based on the ESM-2 language model.
|
| 15 |
|
| 16 |
# Function to generate protein sequence from words
|
| 17 |
def generate_sequence_from_words(words, length):
|
|
@@ -52,7 +52,7 @@ def update(sequence, word1, word2, word3, sequence_length):
|
|
| 52 |
b_value = round(struct.b_factor.mean(), 2)
|
| 53 |
|
| 54 |
# Display protein structure
|
| 55 |
-
st.subheader(f'Predicted protein structure using seed: {word1}, {word2}, and {word3} + length
|
| 56 |
render_mol(pdb_string)
|
| 57 |
|
| 58 |
# plDDT value is stored in the B-factor field
|
|
@@ -85,7 +85,7 @@ if st.sidebar.button('Generate and Predict'):
|
|
| 85 |
if word1 and word2 and word3:
|
| 86 |
sequence = generate_sequence_from_words([word1, word2, word3], sequence_length)
|
| 87 |
st.sidebar.text_area("Generated Sequence", sequence, height=100)
|
| 88 |
-
st.sidebar.info("Note: The same words and length will always produce the same sequence.")
|
| 89 |
|
| 90 |
with st.spinner("Predicting protein structure... This may take a few minutes."):
|
| 91 |
update(sequence, word1, word2, word3, sequence_length)
|
|
@@ -95,10 +95,11 @@ if st.sidebar.button('Generate and Predict'):
|
|
| 95 |
# Information display
|
| 96 |
st.sidebar.markdown("""
|
| 97 |
## What to do next:
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
Remember,
|
|
|
|
| 104 |
""")
|
|
|
|
| 10 |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 11 |
|
| 12 |
st.set_page_config(layout='wide')
|
| 13 |
+
st.sidebar.title('🔮 ESMFold Protein Structure Predictor')
|
| 14 |
+
st.sidebar.write('[*ESMFold*](https://esmatlas.com/about) is an end-to-end single sequence protein structure predictor based on the ESM-2 language model. Enter your seed words to generate and predict a protein sequence')
|
| 15 |
|
| 16 |
# Function to generate protein sequence from words
|
| 17 |
def generate_sequence_from_words(words, length):
|
|
|
|
| 52 |
b_value = round(struct.b_factor.mean(), 2)
|
| 53 |
|
| 54 |
# Display protein structure
|
| 55 |
+
st.subheader(f'Predicted protein structure using seed: {word1}, {word2}, and {word3} + length {sequence_length}')
|
| 56 |
render_mol(pdb_string)
|
| 57 |
|
| 58 |
# plDDT value is stored in the B-factor field
|
|
|
|
| 85 |
if word1 and word2 and word3:
|
| 86 |
sequence = generate_sequence_from_words([word1, word2, word3], sequence_length)
|
| 87 |
st.sidebar.text_area("Generated Sequence", sequence, height=100)
|
| 88 |
+
st.sidebar.info("Note: The same words and sequence length will always produce the same sequence.")
|
| 89 |
|
| 90 |
with st.spinner("Predicting protein structure... This may take a few minutes."):
|
| 91 |
update(sequence, word1, word2, word3, sequence_length)
|
|
|
|
| 95 |
# Information display
|
| 96 |
st.sidebar.markdown("""
|
| 97 |
## What to do next:
|
| 98 |
+
If you find interesting results from the sequence folding, you can explore further:
|
| 99 |
+
1. Learn more about protein structures and sequences.
|
| 100 |
+
2. Visit the [Protein Data Bank (PDB)](https://www.rcsb.org/) for known protein structures.
|
| 101 |
+
3. Compare your folded structure with known functional proteins by downloading your results.
|
| 102 |
+
4. Read about similar proteins to gain insights into potential functions.
|
| 103 |
+
Remember, this folding is based on randomly generated sequences. Interpret the results with caution.
|
| 104 |
+
Enjoy exploring the world of protein sequences!
|
| 105 |
""")
|