`AF analysis` is a python library allowing analysis of Alphafold results.
Project description
About Alphafold Analysis
af-analysis is a python package for the analysis of AlphaFold protein structure predictions.
This package is designed to simplify and streamline the process of working with protein structures
generated by:
Source code repository: https://github.com/samuelmurail/af_analysis
Statement of Need
AlphaFold 2 and its derivatives have revolutionized protein structure prediction, achieving remarkable accuracy.
Analyzing the abundance of resulting structural models can be challenging and time-consuming.
Existing tools often require separate scripts for calculating various quality metrics (pDockQ, pDockQ2, LIS score) and assessing model diversity.
af-analysis addresses these challenges by providing a unified and user-friendly framework for in-depth analysis of AlphaFold 2 results.
Main features
- Import AlphaFold or ColabFold prediction directories as pandas DataFrames for efficient data handling.
- Calculate and add additional structural quality metrics to the DataFrame, including:
- pDockQ
- pDockQ2
- LIS score
- Visualize predicted protein models.
- Cluster generated models to identify diverse conformations.
- Select the best models based on defined criteria.
- Add your custom metrics to the DataFrame for further analysis.
Installation
af-analysisis available on PyPI and can be installed usingpip:
pip install af_analysis
- You can install last version from the github repo:
pip install git+https://github.com/samuelmurail/af_analysis.git@main
- AF-Analysis can also be installed easily through github:
git clone https://github.com/samuelmurail/af_analysis
cd af_analysis
pip install .
Documentation
The complete documentation is available at ReadTheDocs.
-
A notebook showing the basic usage of the
af_analysislibrary can be found here. -
Alternatively you can test is directly on Google colab:
Usage
Importing data
Create the Data object, giving the path of the directory containing the results of the alphafold2/colabfold run.
import af_analysis
my_data = af_analysis.Data('MY_AF_RESULTS_DIR')
Extracted data are available in the df attribute of the Data object.
my_data.df
Analysis
from af_analysis import analysis
analysis.pdockq(my_data)
analysis.pdockq2(my_data)
Docking Analysis
- The
dockingpackage contains several function to add metrics like LIS Score:
from af_analysis import docking
docking.LIS_pep(my_data)
Plots
- At first approach the user can visualize the pLDDT, PAE matrix and the model scores. The
show_info()function displays the scores of the models, as well as the pLDDT plot and PAE matrix in a interactive way.
- plot msa, plddt and PAE:
my_data.plot_msa()
my_data.plot_plddt([0,1])
best_model_index = my_data.df['ranking_confidence'].idxmax()
my_data.plot_pae(best_model_index)
- show 3D structure (
nglviewpackage required):
my_data.show_3d(my_data.df['ranking_confidence'].idxmax())
Dependencies
af_analysis requires the following dependencies:
pdb_numpypandasnumpytqdmseaborncmcrameringlviewipywidgetsmdanalysis
Contributing
af-analysis is an open-source project and contributions are welcome. If
you find a bug or have a feature request, please open an issue on the GitHub
repository at https://github.com/samuelmurail/af_analysis. If you would like
to contribute code, please fork the repository and submit a pull request.
Authors
- Alaa Regei, Graduate Student - Université Paris Cité.
- Samuel Murail, Associate Professor - Université Paris Cité, CMPLI, RPBS platform.
See also the list of contributors who participated in this project.
Release a new package version
To release a new version of the package, follow these steps:
- Commit the changes and push to GitHub:
git add .
git commit -m "Update of ..."
git push origin main
- Update the version number in using bump-my-version:
bump-my-version bump <part>
where <part> is one of major, minor, or patch depending on the type of release.
- Commit the changes and push to GitHub:
git add .
git commit -m "Bump version to x.y.z"
git push origin main
- Create the pypi package and upload it:
make release
Citing this work
If you use the code of this package, please cite:
- Reguei A and Murail S. Af-analysis: a Python package for Alphafold analysis.
Journal of Open Source Software (2025) doi: 10.21105/joss.07577
@Article{reguei_af-analysis_2025,
title = {Af-analysis: a {Python} package for {Alphafold} analysis},
volume = {10},
issn = {2475-9066},
shorttitle = {Af-analysis},
url = {https://joss.theoj.org/papers/10.21105/joss.07577},
doi = {10.21105/joss.07577},
language = {en},
number = {107},
urldate = {2025-03-14},
journal = {Journal of Open Source Software},
author = {Reguei, Alaa and Murail, Samuel},
month = mar,
year = {2025},
pages = {7577},
}
License
This project is licensed under the GNU General Public License version 2 - see the LICENSE file for details.
References
- Jumper et al. Nature (2021) doi: 10.1038/s41586-021-03819-2
- Abramson et al. Nature (2024) doi: 10.1038/s41586-024-07487-w
- Mirdita et al. Nature Methods (2022) doi: 10.1038/s41592-022-01488-1
- Evans et al. bioRxiv (2021) doi: 10.1101/2021.10.04.463034
- Bryant et al. Nat. Commun. (2022) doi: 10.1038/s41467-022-28865-w
- Zhu et al. Bioinformatics (2023) doi: 10.1093/bioinformatics/btad424
- Kim et al. bioRxiv (2024) doi: 10.1101/2024.02.19.580970
- Yu et al. Bioinformatics (2023) doi: 10.1093/bioinformatics/btac749
- Wohlwend et al. bioRxiv (2024) doi: 10.1101/2024.11.19.624167
- Chai Discovery et al. bioRxiv (2024) doi:10.1101/2024.10.10.615955v2
- MassiveFold Raouraoua et al. Nat. Comput. Sci. (2024) doi:10.1038/s43588-024-00714-4
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file af_analysis-0.1.5.tar.gz.
File metadata
- Download URL: af_analysis-0.1.5.tar.gz
- Upload date:
- Size: 54.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d265a97f4548add64da248a0c999f2f25a835b4759b5d9d08df993e59ff23a28
|
|
| MD5 |
fbbd42ba54b292c3fb0ce89027a48624
|
|
| BLAKE2b-256 |
514d3934cec01d29d3e8ce3f9bcda645c0b972cf243e8b6f6e9bf55b7ed0c034
|
File details
Details for the file af_analysis-0.1.5-py3-none-any.whl.
File metadata
- Download URL: af_analysis-0.1.5-py3-none-any.whl
- Upload date:
- Size: 61.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3160ccfd33b9abd7e8b60c442a9a343a7c8d4a015e7b53e6ae802490bfb01d14
|
|
| MD5 |
7503e46a5f97bb0a9d74dd4572b67a39
|
|
| BLAKE2b-256 |
34ba76a01343228cdf3c4ac655a179c43e1db0edf77be4f6577c0ae00f33f8e2
|