Tools for peptidomics analysis of digesta from protein digestion
peptidomicspy provides functions to process, filter, analyze, and visualize peptidomics data, especially from MaxQuant protein digestion studies. This README introduces the package through four parts:
✨ Functions
🚀 Example analysis workflow
📊 Example plots
🛠️ Required input files
python -m pip install "git+https://github.com/xchuam/peptidomicsPy.git"- Import a MaxQuant peptide export, intensity-column metadata, and protein mapping.
- Automatically remove contaminants and reverse sequences.
- Compute replicate- and group-level mean intensities and peptide type numbers.
- Map parent protein name and protein group for each peptide.
- Calculate peptide GRAVY scores.
- Subset by sequence, regex pattern, or grouping variables —
filterPeptides(). - Compare specific groups using statistical analysis to identify significantly different peptides —
ttestPeptides().
- Stacked bar plots of peptide intensities by parent proteins —
plot_int(). - Stacked bar plots of numbers of unique peptide types by parent proteins —
plot_type_num(). - Peptide-length distribution as stacked bars or weighted density curves —
plot_length_distribution(). - Cleavage-site sequence logos for N, C, or both termini —
plot_cleavage_site(). - GRAVY vs. intensity scatter or density plots —
plot_gravy_vs_intensity(). - Peptide alignment along a selected protein, with optional auto-sizing and sequence lookup —
plot_pep_align(). - Volcano plot(s) for
ttestPeptides()results —plot_volcano().
- Import and process data →
processPeptides() - Explore distributions:
- Intensities →
plot_int() - Peptide types →
plot_type_num() - Length distribution →
plot_length_distribution() - Cleavage sites →
plot_cleavage_site() - Hydrophobicity trends →
plot_gravy_vs_intensity()
- Intensities →
- Filter subsets of peptides →
filterPeptides() - Perform statistical comparisons →
ttestPeptides() - Visualize results →
plot_volcano()
This is only a small sample of the exported functions included in the package. For more information, please check the help files and tests.
from peptidomicspy import (
plot_cleavage_site,
plot_int,
plot_length_distribution,
plot_pep_align,
processPeptides,
)
result = processPeptides(
peptides_file="examples/data/Yogurtexample_QR188-205.csv",
intensity_columns_file="examples/data/Intensity_columns.csv",
protein_mapping_file="examples/data/protein_mapping.csv",
)plot_int(
result,
x_var="Yogurt",
type="mean",
filter_params={"Digest.stage": "G120"},
color_by="Protein.name",
)plot_length_distribution(
result,
facet_rows="Yogurt",
filter_params={"Digest.stage": "G120"},
)plot_length_distribution(
result,
metric="type_num",
filter_params={"Yogurt": "Y1"},
plot_mode="density",
)pep_align = plot_pep_align(
result,
protein_name="P02662",
filter_params={"Digest.stage": "G120"},
x_interval=5,
x_range=(80, 165),
y_range=(0, 12),
)
pep_alignplot_cleavage_site(
result,
terminal="both",
measure="intensity",
replicate_mode="mean",
filter_params={"Digest.stage": "G120"},
scientific_10_y=True,
drop_constant_groups=True,
)Three files are required:
- Must contain the structural columns used to derive cleavage information and peptide identities.
- All intensity columns must be present and numeric.
Example:
| Sequence | Leading razor protein | Length | Start position | End position | Amino acid before | First amino acid | Last amino acid | Amino acid after | Intensity Sample1_1 | Intensity Sample1_2 | Intensity Sample2_1 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| AAGGPGAPADPGRPT | P81265 | 15 | 609 | 623 | D | A | T | G | 40332000 | 51443000 | 39094000 |
| AAIDEASKKLNAQ | P15497 | 13 | 253 | 265 | L | A | Q | — | 18167000 | 26893000 | 17524000 |
- Each row maps a single intensity column to the replicate and all associated grouping variables (e.g. digest stage, treatment).
- The non-
Intensity.columnfields must uniquely identify the row; they define the nested grouping structure used to calculate replicate and group summaries. - It is recommended to use dots (
.) instead of spaces in column names for easier programming.
Example:
| Intensity.column | Digest.stage | Sample | Replicate |
|---|---|---|---|
| Intensity Sample1_1 | Gastric | S1 | 1 |
| Intensity Sample1_2 | Gastric | S1 | 2 |
| Intensity Sample2_1 | Gastric | S2 | 1 |
- Provides human-readable protein names and groups for each
Leading.razor.proteinidentifier. - Missing matches are filled with the fallback levels
OthersandWhey. - A curated default mapping ships with the package as an in-memory dataset you can load via
load_example_protein_mapping().
Example:
| Leading.razor.protein | Protein.name | Protein.group |
|---|---|---|
| UNIPROT:A0A452FK23_CAPHI | Beta-casein | Casein |
| UNIPROT:CASB_CAPHI | Beta-casein | Casein |
| UNIPROT:A0A452G9D9_CAPHI | Kappa-casein | Casein |
To use the in-memory default mapping file, call:
from peptidomicspy import load_example_protein_mapping, processPeptides
protein_mapping = load_example_protein_mapping()
result = processPeptides(
peptides_file="path/to/your/peptides.txt",
intensity_columns_file="path/to/your/Intensity_columns.csv",
protein_mapping_file=protein_mapping,
)If you use peptidomicsPy in your work, please cite this repository:
Ma, X., & Ren, Q. (2026). peptidomicsPy (Version 1.1.1-alpha) [Computer software]
This project is licensed under the GPL-3.0 License — see the LICENSE file for details.




