Spaces:
Running
Running
yinuozhang
commited on
Commit
•
7d307ba
1
Parent(s):
12d0eea
add unnatural aas and fix cyclic recog
Browse files
app.py
CHANGED
@@ -243,14 +243,16 @@ def analyze_single_smiles(smiles):
|
|
243 |
"""Analyze a single SMILES string"""
|
244 |
try:
|
245 |
is_cyclic, peptide_cycles, aromatic_cycles = is_cyclic_peptide(smiles)
|
|
|
246 |
sequence = parse_peptide(smiles)
|
247 |
if is_cyclic and len(sequence) == 7:
|
248 |
-
|
249 |
-
|
250 |
details = {
|
251 |
#'SMILES': smiles,
|
252 |
'Sequence': sequence,
|
253 |
'Is Cyclic': 'Yes' if is_cyclic else 'No',
|
|
|
254 |
#'Peptide Cycles': ', '.join(peptide_cycles) if peptide_cycles else 'None',
|
255 |
#'Aromatic Cycles': ', '.join(aromatic_cycles) if aromatic_cycles else 'None'
|
256 |
}
|
|
|
243 |
"""Analyze a single SMILES string"""
|
244 |
try:
|
245 |
is_cyclic, peptide_cycles, aromatic_cycles = is_cyclic_peptide(smiles)
|
246 |
+
sidenote = None
|
247 |
sequence = parse_peptide(smiles)
|
248 |
if is_cyclic and len(sequence) == 7:
|
249 |
+
sidenote = 'This is some peptide sequence with modified side chains.'
|
250 |
+
|
251 |
details = {
|
252 |
#'SMILES': smiles,
|
253 |
'Sequence': sequence,
|
254 |
'Is Cyclic': 'Yes' if is_cyclic else 'No',
|
255 |
+
'Sidenote': sidenote
|
256 |
#'Peptide Cycles': ', '.join(peptide_cycles) if peptide_cycles else 'None',
|
257 |
#'Aromatic Cycles': ', '.join(aromatic_cycles) if aromatic_cycles else 'None'
|
258 |
}
|