SH2-pY global classification SVM model
- Python ≥ 3.9
Install all required packages using:
pip install -r requirements.txtStep 1 - To build an SVM-based SH2-pY classifier using curated binder and non-binder peptide datasets.
python build_model.py \
--binders-file prototyping/Input_files/Final_positive_training.txt \
--nonbinders-file prototyping/Input_files/Final_negative_training.txt \
--label FinalSet- Inputs
- Positive training set
- Negative training set
- Outputs
- test_nested_cv_performance.csv - this file contains fold-specific metrics (Accuracy, F1 score, ROC-AUC, selected C and γ values, and the inner cross-validation ROC-AUC across the 10 outer-fold evaluations).
- _candidate_selection_log.csv - contains model-selection performance of each candidate SVM hyperparameter combination (C and gamma) evaluated across 10 repeated 5-fold cross-validation runs, including the mean ROC-AUC, variability across runs, and number of runs. This log is used to identify the hyperparameter combination (C and γ) selected for the final deployment model.
- Trained model artifact (.pkl) - For the selected optimal SVM hyperparameters (C and γ), the final model is trained using the entire training dataset and saved as a .pkl file for subsequent evaluation on independent datasets and for deployment on new datasets for predictions.
- Useful to compare across candidate training models to pick the best training dataset
python evaluate_model.py \
--best_pkl prototyping/step1_outputs/FinalSet_FinalDeploy_C0.5_g1.0_selAUC0.9304.pkl \
--binder prototyping/Input_files/Final_positive_training.txt \
--nonbinder prototyping/Input_files/Final_negative_training.txt \
--test_pos prototyping/Input_files/comb_positive_evaluation.txt \
--test_neg prototyping/Input_files/comb_negative_evaluation.txt \
--label FinalSet \
--output prototyping/step2_outputs/evaluation_results_FinalSet.csvOutputs
- evaluation_results_.csv contains the performance metrics (Sensitivity, Specificity, Accuracy, F1-score, and ROC-AUC) obtained by evaluating the model trained on a candidate training dataset against the evaluation datasets.
python deploy_model.py \
--model prototyping/step1_outputs/FinalSet_FinalDeploy_C0.5_g1.0_selAUC0.9304.pkl \
--binders prototyping/Input_files/Final_positive_training.txt \
--nonbinders prototyping/Input_files/Final_negative_training.txt \
--datasets examples/set1.txt examples/set2.txt \
--outdir prototyping/step3_outputs \
--names set1 set2 \
--summary_name set_summary \
--use_labels false falseOutputs
- *_predictions.csv → peptide wise predicted class + probabilities (for every input dataset separately)
- Bootstrap based Summary statistics across each Dataset
| Version | Model artifact | Training dataset |
|---|---|---|
| SpY-C v1.0 | SpY-C_v1.0.pkl |
SpY-C_v1.0_training |
For reproducing the predictions reported in this study (), use the SpY-C_v1.0 model artifact with its corresponding training dataset.

