Usage Principles

To get started with AAanalysis, import it as follows:

import aaanalysis as aa

AAanalysis streamlines a Python-based machine learning workflow for protein prediction, starting with protein sequences typically retrieved from UniProt and assessed for similarity by Biopython´s functionalities. It processes redundancy-reduced sets of these sequences to delineate their most discriminative features for machine learning prediction using scikit-learn. For enhanced interpretability, AAanalysis integrates with the SHapley Additive exPlanations (SHAP) framework to provide detailed explanations of prediction results for individual sequences at single-residue resolution. For a bird’s-eye view of how AAanalysis fits between upstream bioinformatics I/O (UniProt, Biopython, structures) and the downstream machine-learning, explainable-AI, and protein-design stack, see The AAanalysis Ecosystem.

AAanalysis provides a handful of DataFrames for seamless data management. Starting with amino acid scale information (df_scales, df_cat) and protein sequences (df_seq), it enables segmentation into parts (df_parts) and accommodates user-defined splitting (split_kws). Our CPP algorithm then utilizes these to generate physicochemical features (df_feat) by comparing protein sequence sets.

See how the pieces connect in the Data Flow Map below (open the full map). Either amino acid scales or protein embeddings can serve as the numerical representation of amino acids: run() consumes amino acid scales, while run_num() consumes numeric values such as protein-language-model embeddings, which can be created via Google Colab.

AAanalysis Data Flow Map

The AAanalysis Data Flow Map. External data sources (gray; protein sequences, embeddings, structures, and annotations) feed the interpretable CPP core (blue), which turns them into the feature signature df_feat and the feature matrix X. The wrapper classes (amber) then predict, explain, and design from X. The map itself spells out every intermediate step.

New here? Start with Prediction tasks, the concept-overview page that maps a biological question to the right AAanalysis workflow — by unit of comparison and reference construction, not biological scale alone. Details on the foundational concepts of AAanalysis are provided by the following sections: