Edit on GitHub

AF-Pipeline

codecov

af_pipeline_logo


Installation

  • Clone the repository

    git clone --recursive https://github.com/isblab/af_pipeline.git
    

    If cloned without --recursive flag, do the following.

    git submodule init
    git submodule update
    
  • Run setup.py

    python setup.py
    

Overview

AF-Pipeline is a package to assist in AlphaFold21 and AlphaFold32 related tasks. These include:

  • Creating input files for prediction (for AlphaFold server3 or AlphaFold23 or Colabfold4)
  • Ranking the predictions based on confidence metrics
  • Extracting confidently predicted regions from the predictions (based on pae_to_domains5 package by Tristan Croll)
  • Extracting interacting regions from the predictions

The workflow for the entire pipeline can be viewed here.

See also:


Usage

  • Refer to the scripts available in the examples directory. Before running the scripts, make sure you unzip AF_predictions.zip

    unzip ./input/AF_predictions.zip -d input/
    
  • Create JSON job files for AlphaFold server 5.

    python create_af_jobs.py \\
        -i ./input/config.yaml \\
        -o ./output/af_input_jobs \\
        -p ./input/protein_sequences.fasta \\
        -n ./input/nucleic_acid_sequences.fasta \\
        -t AF3 # you can replace this with AF2 or ColbFold
    
  • Upload the JSON files to AlphaFold server 5 and download and extract the results.

  • Rank the output predictions.

    python rank_af_predictions.py \\
        -i ./output/af_input_jobs.json \\
        -o ./output \\
        -t AF3 \\
        --pred_dirs ./input/AF_predictions/AF3
    
  • Extract interacting patches from the predictions.

    python extract_interacting_patches.py \\
        --i ./input/best_af_predictions.json \\
        --o ./output/interacting_patches \\
        --interaction_pae_cutoff 5.0 \\
        --plddt_cutoff 70.0 \\
        --contact_threshold 8.0
    
  • Extract confidently predicted regions from the predictions.

    python extract_rigid_bodies.py \\
        -i ./input/best_af_predictions.json \\
        -o ./output/rigid_bodies \\
        --apply_plddt_filter True
    

Workflow

graph TD A([Create job files for AlphaFold Server]) e1@--> B[[AlphaFoldServer]] click B "af_pipeline/af_input/alphafold3.html#AlphaFoldServer" "AlphaFoldServer" _blank B e2@--> C[/Input FASTA or JSON files for AlphaFold/] e3@--> D[\Submit jobs to AlphaFold server/] click D "https://alphafoldserver.com" "alphafoldserver" _blank D e4@--> E[/Output files from AlphaFold server/] E e16@--> R[[RankAF3JobSet]] click R "af_pipeline/rank_predictions/rank_af.html#RankAF3JobSet" "RankAF3JobSet" _blank R e17@--> S[/best prediction/] S e5@--> F[[Initialize]] click F "af_pipeline/parser/initialize.html#Initialize" "Initialize" _blank F e6@--> G[[RigidBodies]] click G "af_pipeline/rigid_bodies/rigid_bodies.html#RigidBodies" "RigidBodies" _blank F e7@--> H[[Interaction]] click H "af_pipeline/interaction/interaction.html#Interaction" "Interaction" _blank G e8@--> I[extract_rigid_bodies] click I "af_pipeline/rigid_bodies/rigid_bodies.html#RigidBodies.extract_rigid_bodies" "extract_rigid_bodies" _blank N e9@--> J[save_rigid_bodies] click J "af_pipeline/rigid_bodies/rigid_bodies.html#RigidBodies.save_rigid_bodies" "save_rigid_bodies" _blank N e10@--> K[assess_rigid_bodies] click K "af_pipeline/rigid_bodies/rigid_bodies.html#RigidBodies.assess_rigid_bodies" "assess_rigid_bodies" _blank H e11@--> M[save_ppair_interaction] click M "af_pipeline/interaction/interaction.html#Interaction.save_ppair_interaction" "save_ppair_interaction" _blank I e12@--> N(["Confidently predicted regions (rigid bodies) from AlphaFold predictions"]) J e13@--> O[/"Output files for rigid bodies (txt/json and pdb)"/] K e14@--> P[/"Output files for rigid body assessment (xlsx)"/] M e15@--> Q[/"Output files for interacting patches (xlsx and plots)"/] classDef animate stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite; class e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15 animate

Additional Information

License: GPLv3

Testable: Yes


Network

Click to reveal more information

Double click on the node to go to the corresponding line in the source code.



  1. AlphaFold Server. alphafoldserver.com. Available at: https://alphafoldserver.com/

  2. Abramson, J. et al. Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 630, 493–500 (2024). (https://alphafoldserver.com/

  3. Jumper, J. et al. Highly Accurate Protein Structure Prediction with Alphafold. Nature 596, 583–589 (2021). 

  4. Mirdita, M. et al. ColabFold: making protein folding accessible to all. Nature Methods 19, 679–682 (2022). (https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/AlphaFold2.ipynb

  5. pae_to_domains: Graph-based community clustering approach to extract protein domains from a predicted aligned error matrix. Tristan Croll (https://github.com/tristanic/pae_to_domains

 1"""
 2
 3.. include:: ../readme.md
 4
 5<hr>
 6
 7## Network
 8
 9<a href="../docs/network/af_pipeline_network.html" target="_blank" rel="noopener noreferrer" style="text-decoration: none;">
10    <button style="text-align: center; background-color: white; color: #3660a5; border: 2px solid #3660a5; border-radius: 2px; padding: 0.5em; cursor: pointer;" onmouseover="this.style.backgroundColor='#3660a5'; this.style.color='white';" onmouseout="this.style.backgroundColor='white'; this.style.color='#3660a5';">Show in new tab</button>
11</a>
12
13<details>
14
15<summary>Click to reveal more information</summary>
16
17<body>
18<p>
19Double click on the node to go to the corresponding line in the source code.
20</p>
21<button onclick="openFullscreen()" style="text-align: center; background-color: white; color: #3660a5; border: 2px solid #3660a5; border-radius: 2px; padding: 0.5em; cursor: pointer;" onmouseover="this.style.backgroundColor='#3660a5'; this.style.color='white';" onmouseout="this.style.backgroundColor='white'; this.style.color='#3660a5';">Go Fullscreen</button>
22
23<br>
24
25<iframe id="network_frame" src="../docs/network/af_pipeline_network.html" width="100%" height="800" frameborder="0" allow="fullscreen">
26</iframe>
27
28<script>
29  function openFullscreen() {
30    const elem = document.getElementById("network_frame");
31    if (elem.requestFullscreen) {
32      elem.requestFullscreen();
33    } else if (elem.webkitRequestFullscreen) { /* Safari */
34      elem.webkitRequestFullscreen();
35    } else if (elem.msRequestFullscreen) { /* IE11 */
36      elem.msRequestFullscreen();
37    }
38  }
39</script>
40</details>
41
42</body>
43
44"""