- Documentation: https://ibm.github.io/AutoPeptideML
- Source Code: https://github.com/IBM/AutoPeptideML
- Webserver: http://peptide.ucd.ie/AutoPeptideML
- Google Collaboratory Notebook: AutoPeptideML_Collab.ipynb
- Blog post: Portal - AutoPeptideML v. 1.0 Tutorial
- Papers:
AutoPeptideML allows researchers without prior knowledge of machine learning to build models that are:
- Trustworthy: Robust evaluation following community guidelines for ML evaluation reporting in life sciences DOME.
- Interpretable: Output contains a PDF summary of the model evaluation explaining how to interpret the results to understand how reliable the model is.
- Reproducible: Output contains all necessary information for other researchers to reproduce the training and verify the results.
- State-of-the-art: Models generated with this system are competitive with state-of-the-art handcrafted approaches.
To use version 1.0, which may be necessary for retrocompatibility with previously built models, please defer to the branch: AutoPeptideML v.1.0.6
Table of Contents
In order to build a new model, AutoPeptideML (v.2.0), introduces a new utility to automatically prepare an experiment configuration file, to i) improve the reproducibility of the pipeline and ii) to keep a user-friendly interface despite the much increased flexibility.
autopeptideml prepare-config --config-path <config-path>
This launches an interactive CLI that walks you through:
- Choosing a modeling task (classification or regression)
- Loading and parsing datasets (csv, tsv, or fasta)
- Picking models and representations
- Automatically sampling negatives
You’ll be prompted to answer various questions like:
- What is the modelling problem you're facing? (Classification or Regression)
- How do you want to define your peptides? (Macromolecules or Sequences)
- What models would you like to consider? (knn, adaboost, rf, etc.)
And so on. The final config is written to:
<config-path>.yml
This config file allows for easy reproducibility of the results, so that anyone can repeat the training processes. You can check the configuration file and make any changes you deem necessary. Finally, you can build the model by simply running:
autopeptideml build-model --outdir <outdir> --config-path <outputdir>/config.yml
In order to use a model that has already built you can run:
autopeptideml predict <result_dir> <features_path> --feature-field <feature_field> --output-path <my_predictions_path.csv>
Where <features_path>
is the path to a CSV
file with a column <features_field>
that contains the peptide sequences/SMILES. The output file <my_predictions_path>
will contain the original data with two additional columns score
(which are the predictions) and std
which is the standard deviation between the predictions of the models in the ensemble, which can be used as a measure of the uncertainty of the prediction.
Data used to benchmark our approach has been selected from the benchmarks collected by Du et al, 2023. A new set of benchmarks was constructed from the original set following the new data acquisition and dataset partitioning methods within AutoPeptideML. To download the datasets:
- Original UniDL4BioPep Benchmarks: Please check the project Github Repository.
⚠️ New AutoPeptideML Benchmarks (Amended version): Can be downloaded from this link. Please note that these are not exactly the same benchmarks as used in the paper (see Issue #24 for more details).- PeptideGeneralizationBenchmarks: Benchmarks evaluating how peptide representation methods generalize from canonical (peptides composed of the 20 standard amino acids) to non-canonical (peptides with non-standard amino acids or other chemical modifications). Check out the paper pre-print. They have their own dedicated repository: PeptideGeneralizationBenchmarks Github repository.
Installing in a conda environment is recommended. For creating the environment, please run:
conda create -n autopeptideml python
conda activate autopeptideml
pip install autopeptideml
pip install git+https://github.com/IBM/AutoPeptideML
To use MMSeqs2 https://github.com/steineggerlab/mmseqs2
# static build with AVX2 (fastest) (check using: cat /proc/cpuinfo | grep avx2)
wget https://mmseqs.com/latest/mmseqs-linux-avx2.tar.gz; tar xvfz mmseqs-linux-avx2.tar.gz; export PATH=$(pwd)/mmseqs/bin/:$PATH
# static build with SSE4.1 (check using: cat /proc/cpuinfo | grep sse4)
wget https://mmseqs.com/latest/mmseqs-linux-sse41.tar.gz; tar xvfz mmseqs-linux-sse41.tar.gz; export PATH=$(pwd)/mmseqs/bin/:$PATH
# static build with SSE2 (slowest, for very old systems) (check using: cat /proc/cpuinfo | grep sse2)
wget https://mmseqs.com/latest/mmseqs-linux-sse2.tar.gz; tar xvfz mmseqs-linux-sse2.tar.gz; export PATH=$(pwd)/mmseqs/bin/:$PATH
# MacOS
brew install mmseqs2
To use Needleman-Wunch, either:
conda install -c bioconda emboss
or
sudo apt install emboss
To use ECFP fingerprints:
pip install rdkit
To use MAPc fingeprints:
pip install mapchiral
To use PepFuNN fingeprints:
pip install git+https://github.com/novonordisk-research/pepfunn
To use PeptideCLM:
pip install smilesPE
datasets:
main:
feat-fields: # Column with peptide sequence/SMILES
label-field: # Column with labels/ "Assume all entries are positives"
path: # Path to dataset
neg-db:
activities-to-exclude: # List of activities to exclude
- activity-1
- activity-2
...
feat-fields: null # Column with peptide sequence/SMILES (only if using custom database)
path: # Path to custom database or choose: canonical, non-canonical, both
device: # Device for computing representations. Choose: cpu, mps, cuda
direction: # Direction of optimization. Choose: maximize or minimize
metric: # Metric for optimization. mse, mae require direction minimize
models: # List of machine learning algorithms to explore. List:
# knn, svm, rf, gradboost, xgboost, lightgbm
- model-1
- model-2
...
n-trials: # Number of optimization steps. Recommended 100-200
pipeline: to-smiles # Pipeline for preprocessing. Choose: to-smiles, to-sequences
reps: # List of peptide representations to explore. List:
# ecfp, chemberta-2, molformer-xl, peptide-clm, esm2-8m, ...
- rep-1
- rep-2
...
split-strategy: min # Strategy for splitting train/test. Choose: min, random.
task: class # Machine learning type of problem. Choose: class or reg.
n-jobs: # Number of processes to launch. -1 uses all possible CPU cores.
Please check the Code reference documentation
AutoPeptideML is an open-source software licensed under the MIT Clause License. Check the details in the LICENSE file.
Special thanks to Silvia González López for designing the AutoPeptideML logo and to Marcos Martínez Galindo for his aid in setting up the AutoPeptideML webserver.