Package: aaindex
Python package for working with the AAindex database (https://www.genome.jp/aaindex/)Table of ContentsIntroductionRequirementsInstallationUsageTestsContactLicenseReferencesIntroductionThe AAindex is a database of numerical indices representing various physicochemical, structural and biochemical properties of amino acids and pairs of amino acids 🧬. The AAindex consists of three sections: AAindex1 for the amino acid index of 20 numerical values, AAindex2 for the amino acid mutation matrix and AAindex3 for the statistical protein contact potentials. All data are derived from published literature[1].ThisaaindexPython software package is a very lightweight way of accessing the data represented in the various AAindex databases, requiring no additional external library installations. Any record within the 3 databases and their associated data/numerical indices can be accessed in one simple command. Currently the software supports the AAindex1 database with plans to include the AAindex 2 & 3 in the future.A demo of the software is availablehere.InstallationInstall the latest version ofaaindexusing pip:pip3installaaindex--upgradeInstall by cloning the repository:gitclonehttps://github.com/amckenna41/aaindex.git
python3setup.pyinstallUsageTheaaindexpackage is made up of three modules for each AAindex database, with each having a Python class of the same name, when importing the package you should import the required database module:fromaaindeximportaaindex1# from aaindex import aaindex2# from aaindex import aaindex3AAIndex1 UsageGet record from AAindex1The AAindex1 class offers diverse functionalities for obtaining any element from any record in the database. The records are imported from a parsed json in the data folder of the package. You can search for a particular record by its record code/accession number or its name/description. You can also get the record category, references, notes, correlation coefficients, PMID and importantly its associated amino acid values:fromaaindeximportaaindex1full_record=aaindex1['CHOP780206']#get full AAI record''' full_record ->{'category': 'sec_struct', 'correlation_coefficients': {},'description': 'Normalized frequency of N-terminal non helical region (Chou-Fasman, 1978b)', 'notes': '', 'pmid': '364941','references': "Chou, P.Y. and Fasman, G.D. 'Prediction of the secondary structure of proteins from their amino acid sequence' Adv. Enzymol. 47, 45-148 (1978)", 'values': {'-': 0, 'A': 0.7, 'C': 0.65, 'D': 0.98, 'E': 1.04, 'F': 0.93, 'G': 1.41, 'H': 1.22, 'I': 0.78, 'K': 1.01, 'L': 0.85, 'M': 0.83, 'N': 1.42, 'P': 1.1, 'Q': 0.75, 'R': 0.34, 'S': 1.55, 'T': 1.09, 'V': 0.75, 'W': 0.62, 'Y': 0.99}}'''#get individual elements of AAindex recordrecord_values=aaindex1['CHOP780206']['values']record_values=aaindex1['CHOP780206'].values#'values': {'-': 0, 'A': 0.7, 'C': 0.65, 'D': 0.98, 'E': 1.04, 'F': 0.93, 'G': 1.41, 'H': 1.22, 'I': 0.78, 'K': 1.01, 'L': 0.85, 'M': 0.83, 'N': 1.42, 'P': 1.1, 'Q': 0.75, 'R': 0.34, 'S': 1.55, 'T': 1.09, 'V': 0.75, 'W': 0.62, 'Y': 0.99}record_description=aaindex1['CHOP780206']['description']record_description=aaindex1['CHOP780206'].description#'description': 'Normalized frequency of N-terminal non helical region (Chou-Fasman, 1978b)'record_references=aaindex1['CHOP780206']['references']record_references=aaindex1['CHOP780206'].references#'references': "Chou, P.Y. and Fasman, G.D. 'Prediction of the secondary structure of proteins from their amino acid sequence' Adv. Enzymol. 47, 45-148 (1978)"record_notes=aaindex1['CHOP780206']['notes']record_notes=aaindex1['CHOP780206'].notes#""record_correlation_coefficient=aaindex1['CHOP780206']['correlation_coefficient']record_correlation_coefficient=aaindex1['CHOP780206'].correlation_coefficient#{}record_pmid=aaindex1['CHOP780206']['pmid']record_pmid=aaindex1['CHOP780206'].pmid#364941record_category=aaindex1['CHOP780206']['category']record_category=aaindex1['CHOP780206'].category#sec_structGet total number of AAindex1 recordsaaindex1.num_records()Get list of all AAindex1 record codesaaindex1.record_codes()Get list of all AAindex1 record namesaaindex1.record_names()AAIndex2 Usage# from aaindex import aaindex1fromaaindeximportaaindex2# from aaindex import aaindex3AAIndex3 Usage# from aaindex import aaindex1# from aaindex import aaindex2fromaaindeximportaaindex3Directories 📁/tests- unit and integration tests foraaindexpackage./aaindex- source code and all required external data files for package./images- images used throughout README./docs-aaindexdocumentation.Tests 🧪To run all tests, from the mainaaindexfolder run:python3 -m unittest discover testsContact ✉️If you have any questions or comments, please contactamckenna41@qub.ac.ukor raise an issue on theIssuestab.LicenseDistributed under the MIT License. SeeLICENSEfor more details.References[1]: Shuichi Kawashima, Minoru Kanehisa, AAindex: Amino Acid index database, Nucleic Acids Research, Volume 28, Issue 1, 1 January 2000, Page 374,https://doi.org/10.1093/nar/28.1.374[2]:https://www.genome.jp/aaindex/Back to top