Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
16 |
|
17 |
st.set_page_config(layout='wide')
|
18 |
st.sidebar.title('🔮 GenPro2 Protein Generator, Structure Predictor, and Analysis Tool')
|
19 |
-
st.sidebar.write('GenPro2 is an end-to-end protein sequence generator, structure predictor, and analysis tool
|
20 |
|
21 |
def generate_sequence_from_words(words, length):
|
22 |
seed = ' '.join(words).encode('utf-8')
|
@@ -109,7 +109,7 @@ def update(sequence, word1, word2, word3, sequence_length):
|
|
109 |
st.write("Please try again later or contact support if the issue persists.")
|
110 |
|
111 |
def share_on_twitter(word1, word2, word3, length, plddt):
|
112 |
-
tweet_text = f"I just generated a new protein using #GenPro2 from the seed-words '{word1}', '{word2}', and '{word3}' + sequence length of {length}! It's plDDT Score: {plddt}%."
|
113 |
tweet_url = f"https://twitter.com/intent/tweet?text={urllib.parse.quote(tweet_text)}"
|
114 |
return tweet_url
|
115 |
|
@@ -148,7 +148,7 @@ if st.session_state.structure_info:
|
|
148 |
render_mol(info['pdb_string'])
|
149 |
|
150 |
st.subheader('plDDT Confidence Score')
|
151 |
-
st.write('plDDT is a bench mark for scoring the confidence level
|
152 |
plddt_score = int(info["b_value"] * 100)
|
153 |
st.info(f'Your plDDT score is: {plddt_score}%')
|
154 |
|
@@ -171,17 +171,7 @@ if st.session_state.structure_info:
|
|
171 |
## What to do next:
|
172 |
|
173 |
If you find an interesting protein from the sequence folding, you can explore it even further:
|
174 |
-
|
175 |
-
1. Click the 'analyze protein' button to use the [BLAST](https://blast.ncbi.nlm.nih.gov/Blast.cgi?PROGRAM=blastp&PAGE_TYPE=BlastSearch&LINK_LOC=blasthome) tool to see if your protein matches any known sequences. The sequence identity will show how close your sequence matches. *Note this can take several minutes
|
176 |
-
2. Download your protein data and visit the [Protein Data Bank (PDB)](https://www.rcsb.org/) to match your protein structure against known protein structures.
|
177 |
-
3. If you think you've discovered a new and useful protein for humans message us!
|
178 |
|
179 |
-
|
180 |
-
**Remember, this folding is based on randomly generated sequences. Interpret the results with caution.
|
181 |
-
Enjoy exploring the world of protein sequences!
|
182 |
-
""")
|
183 |
-
|
184 |
-
|
185 |
col1, col2 = st.columns(2)
|
186 |
with col1:
|
187 |
if st.button('Analyze Protein'):
|
@@ -194,4 +184,14 @@ if st.session_state.structure_info:
|
|
194 |
file_name='predicted.pdb',
|
195 |
mime='text/plain',
|
196 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
|
|
16 |
|
17 |
st.set_page_config(layout='wide')
|
18 |
st.sidebar.title('🔮 GenPro2 Protein Generator, Structure Predictor, and Analysis Tool')
|
19 |
+
st.sidebar.write('GenPro2 is an end-to-end protein sequence generator, structure predictor, and analysis tool using [*ESMFold*](https://esmatlas.com/about) and the ESM-2 language model.')
|
20 |
|
21 |
def generate_sequence_from_words(words, length):
|
22 |
seed = ' '.join(words).encode('utf-8')
|
|
|
109 |
st.write("Please try again later or contact support if the issue persists.")
|
110 |
|
111 |
def share_on_twitter(word1, word2, word3, length, plddt):
|
112 |
+
tweet_text = f"I just generated a new protein using #GenPro2 from the seed-words '#{word1}', '#{word2}', and '#{word3}' + sequence length of {length}! It's plDDT Score is: {plddt}%."
|
113 |
tweet_url = f"https://twitter.com/intent/tweet?text={urllib.parse.quote(tweet_text)}"
|
114 |
return tweet_url
|
115 |
|
|
|
148 |
render_mol(info['pdb_string'])
|
149 |
|
150 |
st.subheader('plDDT Confidence Score')
|
151 |
+
st.write('plDDT is a bench mark for scoring the confidence level of protein folding predictions based on a scale from 0-100%. 70% or more is good!')
|
152 |
plddt_score = int(info["b_value"] * 100)
|
153 |
st.info(f'Your plDDT score is: {plddt_score}%')
|
154 |
|
|
|
171 |
## What to do next:
|
172 |
|
173 |
If you find an interesting protein from the sequence folding, you can explore it even further:
|
|
|
|
|
|
|
|
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
col1, col2 = st.columns(2)
|
176 |
with col1:
|
177 |
if st.button('Analyze Protein'):
|
|
|
184 |
file_name='predicted.pdb',
|
185 |
mime='text/plain',
|
186 |
)
|
187 |
+
|
188 |
+
1. Click the 'analyze protein' button to use the [BLAST](https://blast.ncbi.nlm.nih.gov/Blast.cgi?PROGRAM=blastp&PAGE_TYPE=BlastSearch&LINK_LOC=blasthome) search database tool and see if your protein matches any known sequences. The sequence identity will show how close your sequence matches. *Note this can take several minutes
|
189 |
+
2. Download your protein data and visit the [Protein Data Bank (PDB)](https://www.rcsb.org/) to match your protein structure against known protein structures.
|
190 |
+
3. If you think you've discovered a new and useful protein for humans message us!
|
191 |
+
|
192 |
+
|
193 |
+
**Remember, this folding is based on randomly generated sequences. Interpret the results with caution.
|
194 |
+
Enjoy exploring the world of protein sequences!
|
195 |
+
""")
|
196 |
+
|
197 |
|