Zhaohan-Meng commited on
Commit
e744c31
Β·
verified Β·
1 Parent(s): 5d6779c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -9
app.py CHANGED
@@ -731,6 +731,9 @@ def visualize_attention_and_ranges(
731
 
732
 
733
  # ───── Gradio callbacks ─────────────────────────────────────────
 
 
 
734
  def extract_aa_seq_cb(structure_file, protein_text):
735
  """
736
  Extract plain amino acid sequence from uploaded PDB/mmCIF.
@@ -1156,21 +1159,26 @@ with gr.Blocks() as demo:
1156
  <ol style="font-size:1rem;line-height:1.6;margin-left:22px;">
1157
  <li>
1158
  <strong>Input formats:</strong>
1159
- The model accepts <em>structure-aware (SA)</em> or <em>FASTA</em> protein sequences,
1160
- and <em>SMILES</em> or <em>SELFIES</em> representations for ligands.
1161
- For SA mode, <code>.pdb</code> or <code>.cif</code> files can be uploaded directly.
 
 
1162
  </li>
1163
 
1164
  <li>
1165
- <strong>Interaction type selection:</strong>
1166
- Choose the desired non-covalent interaction type
1167
- (e.g., overall interaction or specific physicochemical channels)
1168
- to visualise token-level binding patterns.
 
1169
  </li>
1170
 
1171
  <li>
1172
- <strong>Output:</strong>
1173
- The demo system reports a predicted binding probability, a ranked Top-K residues table, and a token-level attention heat map.
 
 
1174
  </li>
1175
  </ol>
1176
  """)
 
731
 
732
 
733
  # ───── Gradio callbacks ─────────────────────────────────────────
734
+ ROOT = os.path.dirname(os.path.abspath(__file__))
735
+ FOLDSEEK_BIN = os.path.join(ROOT, "utils", "foldseek")
736
+
737
  def extract_aa_seq_cb(structure_file, protein_text):
738
  """
739
  Extract plain amino acid sequence from uploaded PDB/mmCIF.
 
1159
  <ol style="font-size:1rem;line-height:1.6;margin-left:22px;">
1160
  <li>
1161
  <strong>Input formats:</strong>
1162
+ The system supports either <em>structure-aware (SA)</em> sequences derived from
1163
+ protein structures or conventional <em>FASTA</em> sequences.
1164
+ For structure-based analysis, users may upload <code>.pdb</code> or
1165
+ <code>.cif</code> files to extract the corresponding sequence representation.
1166
+ Ligands can be provided in <em>SMILES</em> or <em>SELFIES</em> format.
1167
  </li>
1168
 
1169
  <li>
1170
+ <strong>Interaction channel selection:</strong>
1171
+ Users may select a specific non-covalent interaction type
1172
+ (e.g., hydrogen bonding, hydrophobic interactions) or the
1173
+ overall interaction channel to visualise the corresponding
1174
+ token-level binding patterns.
1175
  </li>
1176
 
1177
  <li>
1178
+ <strong>Model outputs:</strong>
1179
+ The system reports (i) a predicted binding probability for the
1180
+ protein–ligand pair, (ii) a ranked Top-K residue table, and (iii) a token-level interaction
1181
+ heat map illustrating spatial interaction patterns.
1182
  </li>
1183
  </ol>
1184
  """)