Skip to content

VilenneFrederique/CPred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



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.xlsx

Citation

Enter citation here

Q&A

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages