AF-Pipeline
Overview & features
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 residue patches from the predictions
The workflow for the entire pipeline can be viewed here.
Installation
Clone the repository
git clone --recursive https://github.com/isblab/af_pipeline.gitIf cloned without
--recursiveflag, do the following.git submodule init git submodule updateRun
setup.pypython setup.py
Tutorial
Refer to the following Google colab notebook and slides (presented at Computational Biology Summer School 2026 at NCBS Bangalore)
Documentation
For a detailed explanation of different modules and their capabilites in AF-Pipeline, see Documentation
See also:
Quick usage
Refer to the scripts available in the examples directory. Before running the scripts, make sure you unzip
AF_predictions.zipunzip ./input/AF_predictions.zip -d input/Create
JSONjob 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 ColabFoldUpload the
JSONfiles 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/AF3Extract 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.0Extract 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,e16,e17 animate
Additional Information
License: GPLv3
Testable: Yes
Network
Double click on the node to go to the corresponding line in the source code.
-
AlphaFold Server. alphafoldserver.com. Available at: https://alphafoldserver.com/. ↩
-
Abramson, J. et al. Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 630, 493–500 (2024). (https://alphafoldserver.com/) ↩
-
Jumper, J. et al. Highly Accurate Protein Structure Prediction with Alphafold. Nature 596, 583–589 (2021). ↩
-
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) ↩
-
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<details> 10 11<summary>Click to reveal more information</summary> 12 13<body> 14<p> 15Double click on the node to go to the corresponding line in the source code. 16</p> 17<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> 18 19<br> 20 21<iframe id="network_frame" src="../docs/network/af_pipeline_network.html" width="100%" height="800" frameborder="0" allow="fullscreen"> 22</iframe> 23 24<script> 25 function openFullscreen() { 26 const elem = document.getElementById("network_frame"); 27 if (elem.requestFullscreen) { 28 elem.requestFullscreen(); 29 } else if (elem.webkitRequestFullscreen) { /* Safari */ 30 elem.webkitRequestFullscreen(); 31 } else if (elem.msRequestFullscreen) { /* IE11 */ 32 elem.msRequestFullscreen(); 33 } 34 } 35</script> 36</details> 37 38</body> 39 40"""