Skip to main content

CPred: A deep learning framework for predicting the charge state distribution in modified and unmodified peptides in ESI

Project description



PyPI License

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

install with pip

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpred-0.1.5.tar.gz (12.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpred-0.1.5-py3-none-any.whl (12.9 MB view details)

Uploaded Python 3

File details

Details for the file cpred-0.1.5.tar.gz.

File metadata

  • Download URL: cpred-0.1.5.tar.gz
  • Upload date:
  • Size: 12.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cpred-0.1.5.tar.gz
Algorithm Hash digest
SHA256 67f5bde5bb44464ace7775e2bcbcfebee0df5c54144438eed9a494997174ef27
MD5 59b03563a2cc8cb0b11b18524b741c8e
BLAKE2b-256 e118a749fc5c7fd29c35c6c32ce852caea5e34d33ba9c51af3bc4c97e0de3309

See more details on using hashes here.

File details

Details for the file cpred-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: cpred-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cpred-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fedbdb6599c9b57f778873e17fb4e81af25209139348491cf3c5dde295cf30ba
MD5 d6be7614792463f8a6c656fbd1303b1e
BLAKE2b-256 2010111c608f17b6607698e210e5f48cb3f658c6b90122001bc6a0e7aa5c611a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page