Skip to main content

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

Project description



GitHub release PyPI Conda 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 bioconda install with pip

Install with conda, using the bioconda and conda-forge channels: conda install -c bioconda -c conda-forge CPred

Or 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

test_dictionary = {
    "Peptide_sequence": ["PEPTIDE", "EDITPEP"],
    "Modifications": ["1|Carbamidomethyl", "2|Oxidation"]
}

# 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_model = "tests/tests_input/test.parquet"
model_directory = "CPred/Data/Models/CPred_model_v1.keras"
output_directory = "tests/tests_output/"
CPred_NN.prediction_model(input_model, 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.xls

Citation

Enter citation here

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.0.11.tar.gz (26.5 MB view hashes)

Uploaded Source

Built Distribution

CPred-0.0.11-py3-none-any.whl (158.4 kB view hashes)

Uploaded Python 3

Supported by

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