CPred: Charge State Prediction for Modified and Unmodified Peptides in Electrospray Ionization
Introduction
CPred is a neural network capable of predicting the charge state distribution for modified and unmodified peptides in electrospray ionisation. By summarising the modifications as measures of mass and atomic compositions, the model is capable of generalising unseen modifications during training.
The model is available as a Python package, installable through Pypi and conda. This also makes it possible to use from the command-line-interface.
Installation
Currently, CPred is solely available in Pypi. Bioconda will be released soon.
Install with pip:
pip install CPred
How to use
Python module
A reproducible example is shown in the tests folder.
from CPred import FeatureEngineering
from CPred import CPred_NN
import pandas as pd
# Example peptides
## Make sure to denote the modifications identical to the notation of the Unimod database
test_dictionary = {
"Peptide_sequence": ["PEPTIDE", "EDITPEP"],
"Modifications": ["1|Carbamidomethyl", "2|Oxidation"]
}
# In case of multiple modifications within a peptide:
# Modified_peptide = { "Peptide_sequence": ["AKAAACAGDSKSWDADAFSVEDPVR"], "Modifications": ["2|Acetyl@6|Carbamidomethyl@11|Acetyl"] }
# Turn dictionary into a Pandas dataframe for feature engineering
test_df = pd.DataFrame(test_dictionary)
# Do feature engineering
test_features = FeatureEngineering.feature_engineering(test_df)
# Saving to parquet
test_features.to_parquet(f"tests/tests_input/test.parquet", index=False)
# Neural network predictions
input_data = "tests/tests_input/test.parquet"
model_directory = "CPred/Data/Models/CPred_model_v1.keras"
output_directory = "tests/tests_output/"
CPred_NN.prediction_model(input_data, model_directory, output_directory)
The feature_engineering function returns a pandas dataframe with the generated features. As the CPred neural network requires the data in Parquet format, it is firstly saved.
Command-line interface
In order to use CPred from the command-line interface, run:
Documentation
python CPred_main.py FeatureEngineering --help
python CPred_main.py prediction --help
python CPred_main.py retraining --help
Running
In order to run CPred, all arguments may be specificied as documented.
python CPred_main.py FeatureEngineering -i ..\tests\tests_input\test.xlsx
Citation
When using CPred for your research, please cite: Vilenne, F., Agten, A., Appeltans, S., Ertaylan, G., & Valkenborg, D. (2024). CPred: Charge State Prediction for Modified and Unmodified Peptides in Electrospray Ionization. Analytical Chemistry. https://doi.org/10.1021/acs.analchem.4c01107
Q&A
Metadata
Release files for CPred 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cpred-0.1.5.tar.gz | 12.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cpred-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.9 MB
Release files / cpred-0.1.5.tar.gz
| Download URL | cpred-0.1.5.tar.gz |
|---|---|
| Size | 12.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67f5bde5bb44464ace7775e2bcbcfebee0df5c54144438eed9a494997174ef27
|
|
BLAKE2b-256 checksum How to use checksums |
e118a749fc5c7fd29c35c6c32ce852caea5e34d33ba9c51af3bc4c97e0de3309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / cpred-0.1.5-py3-none-any.whl
| Download URL | cpred-0.1.5-py3-none-any.whl |
|---|---|
| Size | 12.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fedbdb6599c9b57f778873e17fb4e81af25209139348491cf3c5dde295cf30ba
|
|
BLAKE2b-256 checksum How to use checksums |
2010111c608f17b6607698e210e5f48cb3f658c6b90122001bc6a0e7aa5c611a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|