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 based
|
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
|
113 |
tweet_url = f"https://twitter.com/intent/tweet?text={urllib.parse.quote(tweet_text)}"
|
114 |
return tweet_url
|
115 |
|
@@ -172,15 +172,16 @@ if st.session_state.structure_info:
|
|
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
|
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 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 |
col1, col2 = st.columns(2)
|
185 |
with col1:
|
186 |
if st.button('Analyze Protein'):
|
@@ -193,3 +194,4 @@ if st.session_state.structure_info:
|
|
193 |
file_name='predicted.pdb',
|
194 |
mime='text/plain',
|
195 |
)
|
|
|
|
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 based [*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: {plddt}%."
|
113 |
tweet_url = f"https://twitter.com/intent/tweet?text={urllib.parse.quote(tweet_text)}"
|
114 |
return tweet_url
|
115 |
|
|
|
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 |
file_name='predicted.pdb',
|
195 |
mime='text/plain',
|
196 |
)
|
197 |
+
|