A python package for activity prediction and rational design of antifungal peitdes.
Project description
Antifungal
This repository hosts the source code of python package Antifungal , which server as the backend of our online platform for antifungal antivity prediction and rational designs of antifungal peptides. For online use, visit Antifungipept.
Table of Contents
Installation
To install the package, it is recommended to use a Python 3.8 environment. Follow these steps:
# Create a virtual environment (optional but recommended)
conda create --name antifungal python=3.8
conda activate antifungal
# install the antifungal with pip
pip install antifungal
Usage
This package provide the functionalities, like antifungal activity prediction and the rational design of antifungal peptides.
Antifungal activity prediction
Antifungal activity prediction provides the probability of a peptide being antifungal and the minimum inhibitory concentration (MIC) against four fungal species: Candida albicans, Candida krusei, Cryptococcus neoformans, and Candida parapsilosis. The antifungal index (AFI) is also calculated to evaluate the overall antifungal activity of the peptide.
from antifungal.predict import predict_MIC
seq = ['HIHIRHMWLLR','HIHIRHMWLLRR']
pred = predict_MIC(seq)
print(pred)
# Expected output:
# {
# 'antifungal': [True, True],
# 'prob_antifungal': [95.2, 97.9],
# 'MIC_C_albicans': [21.8, 17.34],
# 'prob_MIC_C_albicans': [99.8, 99.8],
# 'MIC_C_krusei': [7.13, 5.87],
# 'prob_MIC_C_krusei': [99.3, 99.4],
# 'MIC_C_neoformans': [24.4, 15.57],
# 'prob_MIC_C_neoformans': [99.3, 99.6],
# 'MIC_C_parapsilosis': [18.3, 17.05],
# 'prob_MIC_C_parapsilosis': [84.5, 82.6],
# 'AFI': [16.23, 12.82],
# 'prob_AFI': [79.16, 79.9],
# 'peptide_seq': ['HIHIRHMWLLR', 'HIHIRHMWLLRR']
# }
Rational design methods
We categorize the rational design of antifungal peptides into three types based on sequence modifications: increasing, preserving, and reducing sequence length.
- Sequence Length Increasing Methods
- Augment: Adds amino acids to the N-terminus, C-terminus, or both ends of the peptide sequence.
- Insert: Inserts amino acids at specific positions within the peptide sequence.
- Duplicate: Duplicates existing amino acids within the peptide sequence.
- Sequence Length Preserving Methods
- Single Point Mutation: Replaces individual amino acids with other amino acids.
- Swap: Swaps positions of adjacent amino acids within the sequence.
- Shift: Shifts the entire sequence to the left or right by specified offsets.
- Multi-Point Mutation: Simutaneously mutate multiple amino acids at the specified positions, with a maximum limit of four simultaneous mutations.
- Global Optimize: Optimizes the peptide sequence by performing multiple amino acid mutations simultaneously.
- Sequence Length Reducing Methods
- Segment: Segments the peptide into shorter sub-sequences.
- Delete: Deletes specific amino acids from the peptide sequence.
All methods utilize common functions for generating candidate sequences and predicting antifungal activity.
# Demonstrative design using segment method
from antifungal.design import segment
segment_instance = segment("HIHIRHMWLLRRR")
segment_predictions = segment_instance.get_candidate_sequences().predict()
print(segment_predictions)
# Expected output:
# {
# 'antifungal': [True, True, True, True, True, True],
# 'prob_antifungal': [95.2, 97.9, 98.2, 97.7, 97.5, 99.0],
# 'MIC_C_albicans': [21.8, 17.34, 21.03, 19.68, 25.91, 24.36],
# 'prob_MIC_C_albicans': [99.8, 99.8, 99.8, 99.8, 99.8, 99.8],
# 'MIC_C_krusei': [7.13, 5.87, 5.85, 6.45, 5.96, 4.7],
# 'prob_MIC_C_krusei': [99.3, 99.4, 99.7, 99.0, 99.5, 98.9],
# 'MIC_C_neoformans': [24.4, 15.57, 10.01, 16.36, 10.46, 16.2],
# 'prob_MIC_C_neoformans': [99.3, 99.6, 99.8, 99.6, 99.9, 99.5],
# 'MIC_C_parapsilosis': [18.3, 17.05, 17.08, 18.28, 18.21, 19.01],
# 'prob_MIC_C_parapsilosis': [84.5, 82.6, 85.6, 83.7, 82.4, 85.2],
# 'AFI': [16.23, 12.82, 12.04, 13.96, 13.1, 13.7],
# 'prob_AFI': [79.16, 79.9, 83.47, 80.47, 79.7, 82.84],
# 'peptide_seq': ['HIHIRHMWLLR', 'HIHIRHMWLLRR', 'HIHIRHMWLLRRR', 'IHIRHMWLLRR', 'IHIRHMWLLRRR', 'HIRHMWLLRRR'],
# 'seq_name': ['segment_1_11', 'segment_1_12', 'segment_1_13', 'segment_2_12', 'segment_2_13', 'segment_3_13']
# }
Multi-Point Mutation
# Demonstrative usage of multi-point mutation method
from antifungal.design import multi_point_mutation
mpm_instance = multi_point_mutation("HIHIRHMWLLRRR")
mpm_instance.get_candidate_sequences(positions=[6,7])
mpm_predictions = mpm_instance.predict()
print(mpm_predictions)
# Expected output:
# {
# 'antifungal': [True, ...],
# 'prob_antifungal': [95.2, ...],
# 'MIC_C_albicans': [21.8, ...],
# 'prob_MIC_C_albicans': [99.8, ...],
# 'MIC_C_krusei': [7.13, ...],
# 'prob_MIC_C_krusei': [99.3, ...],
# 'MIC_C_neoformans': [24.4, ...],
# 'prob_MIC_C_neoformans': [99.3, ...],
# 'MIC_C_parapsilosis': [18.3, ...],
# 'prob_MIC_C_parapsilosis': [84.5, ...],
# 'AFI': [16.23, ...],
# 'prob_AFI': [79.16, ...],
# 'peptide_seq': [HIHIRYYWLLRRR, ...],
# 'seq_name': [mutate_H_6_Y_mutate_M_7_Y, ...]
# }
Globally optimize
The globally_optimize class is a length-preserving globall optimization method that utilizes an evolutionary algorithm to perform multiple amino acid mutations simultaneously, enabling the improvement of antifungal activity of peptides.
# Demonstrative usage of globally optimize method (this will take a few minutes to hours depending on the computational resources)
from antifungal.design import globally_optimize
optimization_instance = globally_optimize("HIHIRHMWLLRRR")
optimized_seq, results = optimization_instance.optimize()
print(results)
# Expected outputs:
# {
# "optimized_seq": "FICFRCMWFCRRL",
# "antifungal_idx": [3.96]
# }
Contribution analysis to Antifungal activity
Coming soon.
Directory Structure
-
data/: Contains data used for model development.
- training_data/: Stores the datasets utilized in training the predictive models.
- screening_data: Contains data from extensive screening studies detailed in the referenced article.
-
model/: Houses the trained models for antifungal peptide prediction.
-
propy/: A slightily modified version of the package propy for the supports of more verstaile peptide sequences.
-
ChemoinfoPy/: Contains Python scripts for variable selection, peptide sequence preprocessing, descriptor calculation, and dataset partitioning for correction and validation purposes.
Major Release Notes
- Version 0.1.0 (Dec 9, 2023): The initial release of the Antifungal package, providing fundamental functionalities for antifungal peptide prediction.
- Version 0.1.2 (Apr 10, 2024): Support rational design of antifungal peptides.
- Version 0.1.3 (June 8, 2024): Expanded the rational design capabilities to include up to nine distinct methods for optimizing antifungal peptides.
Citation
If you use this tool, please cite our Publications:
- J. Zhang, et al. Large-Scale Screening of Antifungal Peptides Based on Quantitative Structure–Activity Relationship. ACS Med. Chem. Lett. 2022, 13, 1, 99–104. link.
- J. Zhang, et al. In Silico Design and Synthesis of Antifungal Peptides Guided by Quantitative Antifungal Activity. J. Chem. Inf. Model. 2024, 64 (10), 4277–4285. link
License
This project is licensed under the MIT License, which allows for broad usage and modification under specific terms.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file antifungal-0.1.3.tar.gz
.
File metadata
- Download URL: antifungal-0.1.3.tar.gz
- Upload date:
- Size: 27.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a99b50bf4e9b72b0a05ab688d94a5d579476a4b1896b4bfd295f06ef1cba867 |
|
MD5 | c3183fb32c5d02614aa3a2c19bf6acae |
|
BLAKE2b-256 | c4d3c0c4b3ebf43ab88ea2b2b0575867185b38e20b32729bfaba4f65a8cb6be8 |
File details
Details for the file antifungal-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: antifungal-0.1.3-py3-none-any.whl
- Upload date:
- Size: 27.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 430cbc9c44ca672ca5da100a4ca815d804e626b4a88e875d02cfdbb83855a645 |
|
MD5 | 3f198bcfc3c25652490c6d790887c42c |
|
BLAKE2b-256 | 427491abe9286add8e9a28218e1e165f4c2e08a4dae27e125ea0f73d32fcdad0 |