PLifePred2: Peptide Half-Life Prediction and Design
PLifePred2 is a standalone machine-learning toolkit for predicting peptide half-life from amino-acid sequences, molecular SMILES, or PDB structures. It also provides a design workflow for systematic single-residue substitution scanning and enumeration of peptide-modification flag combinations.
The distribution is designed to run locally. Model files, feature lists, and the vendored Mordred-community implementation are loaded from the project directory, so the program does not download models or descriptors at runtime.
Overview
PLifePred2 offers four input modes and one integrated design option:
Natural sequence – predicts half-life from sequence-derived features, with all modification flags set to zero.
Modified sequence – predicts half-life from sequence-derived features and five user-selectable binary modification flags.
SMILES – calculates 2D molecular descriptors with the bundled Mordred-community source and predicts from a SMILES representation.
PDB structure – converts the supplied PDB molecule to SMILES, calculates Mordred descriptors, and predicts using the structure model.
Design mode – performs exhaustive single-residue substitution scanning or evaluates all 32 combinations of the five modification flags.
Prediction is the default operation. Add --design to run one of the two design workflows. The same command-line script handles both operations.
Command-Line Usage
General syntax
python plifepred2.py --mode MODE --input INPUT [INPUT ...] --output OUTPUT [OPTIONS]
The script can be launched from another working directory. Model and feature paths are resolved relative to the script, while relative input and output paths are resolved from the current working directory.
Arguments
Argument |
Description |
|---|---|
--mode |
Required. One of natural, modified, smiles, or structure. |
-i, --input |
Required. One or more input files. |
-o, --output |
Output TSV file. Default: plifepred2_predictions.tsv. |
--design |
Run design instead of ordinary prediction. Available for natural and modified. |
--modifications, --mods |
Comma-separated modification flags for modified prediction mode. |
--workdir |
Directory for intermediate descriptor files. Temporary storage is used by default. |
-h, --help |
Display command-line help. |
Prediction Modes
1. Natural peptide sequence
Use --mode natural for unmodified peptide sequences. All five modification flags are set to zero.
python plifepred2.py --mode natural --input peptides.fasta --output natural_predictions.tsv
2. Modified peptide sequence
Use --mode modified to supply one or more binary modification flags. The following names are accepted:
Flag |
Description |
|---|---|
d |
D-amino-acid modification flag |
ct |
C-terminal modification flag |
nt |
N-terminal modification flag |
cyc |
Cyclization flag |
ptm |
Post-translational modification flag |
Example using flag names:
python plifepred2.py --mode modified --input peptides.fasta --modifications d,ct --output modified_predictions.tsv
The script also accepts the legacy numeric labels 0 to 4:
Numeric value |
Flag |
|---|---|
0 |
d |
1 |
ct |
2 |
nt |
3 |
cyc |
4 |
ptm |
For example, --mods 0,3 is equivalent to --mods d,cyc. If no flags are supplied in modified prediction mode, all five flags remain zero.
3. SMILES input
Use --mode smiles to predict from molecular SMILES. Provide one molecule per non-empty line. Each line can contain a SMILES string and, optionally, a molecule identifier separated by whitespace:
CCCCC(=O)NCC(=O)O Molecule_A CC(C)CC(N)C(=O)O Molecule_B
Example:
python plifepred2.py --mode smiles --input molecules.smi --output smiles_predictions.tsv
Multiple SMILES files can be processed together:
python plifepred2.py --mode smiles --input batch_1.smi batch_2.smi batch_3.smi --output smiles_predictions.tsv
The script canonicalizes valid input SMILES before writing them to the output. Invalid SMILES cause the run to stop with an error identifying the input record.
4. PDB structure input
Use --mode structure to predict from one or more PDB files:
python plifepred2.py --mode structure --input peptide_1.pdb peptide_2.pdb --output structure_predictions.tsv
PDB input requirements: provide a PDB containing the peptide or molecule to be evaluated, not a complete protein-receptor complex. The current conversion workflow uses RDKit, retains the largest connected molecular fragment, removes explicit hydrogens, and converts that fragment to SMILES. For a protein-ligand or protein-peptide complex, the largest fragment may be the receptor rather than the intended peptide/ligand; such a complex should not be supplied directly to this mode.
Design Mode
Design mode is enabled with --design and is available only with --mode natural or --mode modified.
1. Natural single-substitution scanning
For each input peptide, PLifePred2 generates:
The wild-type sequence.
Every possible single-residue substitution at every position, replacing the original residue with each of the other 19 standard amino acids.
Only one position is changed in each mutant. It does not generate multi-position combinatorial mutants.
The total number of variants for a peptide of length L is:
Number of variants = 1 + (19 x L)
Run the natural design workflow with:
python plifepred2.py --mode natural --design --input peptides.fasta --output natural_design.tsv
2. Modified peptide design
For each input peptide, PLifePred2 evaluates all 32 binary combinations of the five modification flags (including the all-zero combination). The amino- acid sequence itself is not mutated in this workflow.
python plifepred2.py --mode modified --design --input peptides.fasta --output modification_design.tsv
When --design is used with --mode modified, any supplied --modifications/--mods value is ignored because all 32 combinations are generated automatically.
Design sequence-length range
Design mode accepts peptide sequences containing 15 to 50 amino acids (inclusive). Each sequence is checked before design generation. This length restriction applies to design mode; the standalone prediction code does not apply this same explicit 15–50 residue check.
Input File Formats and Validation
Sequence input
Sequence modes and design mode accept FASTA files or plain-text files with one peptide sequence per non-empty line.
FASTA example:
>Peptide_1
ACDEFGHIKLMNPQRSTVWY
>Peptide_2
KLVFFAE
Plain-text example:
ACDEFGHIKLMNPQRSTVWY
KLVFFAE
Only the 20 standard amino-acid symbols are accepted:
ACDEFGHIKLMNPQRSTVWY
Sequences are converted to uppercase before validation. Ambiguous or non-standard residue symbols (for example, X, B, Z, U, and O) are not accepted by the current input parser.
Multiple sequence files can be passed in one command:
python plifepred2.py --mode natural --input group_1.fasta group_2.fasta additional_sequences.txt --output combined_predictions.tsv
FASTA record IDs are taken from the first whitespace-delimited token in each header. Duplicate IDs across input files are made unique automatically.
SMILES input
Use one SMILES string per non-empty line. An optional second whitespace- separated token is interpreted as the molecule ID. Do not add extra fields to a line.
PDB input
Supply one or more PDB files. Each file is treated as one molecular input. The program does not split multiple MODEL records inside a single PDB file into separate predictions.
Output Files
All prediction results are written as tab-separated values (TSV), regardless of the output filename extension. The default output name is plifepred2_predictions.tsv.
Sequence prediction output
The sequence prediction table contains:
Column |
Description |
|---|---|
ID |
Input FASTA/plain-text record identifier. |
Sequence |
Validated amino-acid sequence. |
Prediction |
Predicted half-life on the model’s inverse-transformed target scale. |
InputType |
natural or modified. |
Modifications |
Selected modification flags, or none. |
ModificationFlags |
Binary values of d, ct, nt, cyc, and ptm. |
SMILES and structure prediction output
The SMILES and structure prediction tables contain:
Column |
Description |
|---|---|
ID |
Molecule ID or PDB filename stem. |
InputType |
smiles or structure. |
SMILES |
Canonical SMILES used for descriptor creation. |
Prediction |
Predicted half-life on the model’s inverse-transformed target scale. |
Design output
Design results contain the following fields:
Column |
Description |
|---|---|
Rank |
Rank within the corresponding input peptide; highest prediction is rank 1. |
Input_ID |
Identifier of the original peptide. |
Variant |
Generated variant identifier. |
Mutation |
Single substitution or wild-type label. |
Position |
One-based residue position, if mutated. |
Original_AA |
Original residue, if mutated. |
New_AA |
Substituted residue, if mutated. |
Sequence |
Sequence used for the prediction. |
ModificationCombination |
Five-character binary flag combination. |
d, ct, nt, cyc, ptm |
Individual binary modification flags. |
Prediction |
Predicted half-life on the model’s inverse-transformed target scale. |
Mode |
design_natural or design_modified. |
For each input peptide, design variants are sorted from the highest to the lowest predicted value. The exact physical unit of Prediction is the unit used for the model’s training target; confirm that unit from the associated model documentation before interpreting or reporting values.
Metadata
Release files for plifepred2 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plifepred2-1.1.0.tar.gz | 10.9 MB | Without provenance | Details for plifepred2-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plifepred2-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for plifepred2-1.1.0-py3-none-any.whl |
Total release size: 22.0 MB
Release files / plifepred2-1.1.0.tar.gz
| Download URL | plifepred2-1.1.0.tar.gz |
|---|---|
| Size | 10.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7d9d2a82b662439fa07f59a6bdf89a5b21a8be915a962621defb93b43907eed
|
|
BLAKE2b-256 checksum How to use checksums |
c7dc7868ea5a0486f8432a9bb590f449fc2fe079cf6e63428af427f551959b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / plifepred2-1.1.0-py3-none-any.whl
| Download URL | plifepred2-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4af0c75e914c810110f38f4302c1d8a3fc6b1922791b6e0bf0130b9193132390
|
|
BLAKE2b-256 checksum How to use checksums |
e42f23aded211d50947f7468fa8669922f0348ad4715ccf419d4e6d35ccf86f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for plifepred2 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.