peppwR peppwR website

Lifecycle: experimental CRAN status R-CMD-check pkgdown License: MIT GitHub issues GitHub stars

Power analysis for phosphopeptide abundance hypothesis tests via simulation.

peppwR helps proteomics researchers answer critical experimental design questions:

Features

Installation

Install the development version from GitHub:

# install.packages("pak")
pak::pak("TeamMacLean/peppwR")

Quick Start

From Pilot Data (Per-Peptide Mode)

library(peppwR)

# Fit distributions to your pilot data
fits <- fit_distributions(
  pilot_data,
  id = "peptide",
  group = "condition",
  value = "abundance"
)

# Find required sample size for 80% power to detect 2-fold change
result <- power_analysis(
  fits,
  effect_size = 2,
  target_power = 0.8,
  find = "sample_size"
)

print(result)
#> Per-peptide power analysis
#> Question: sample_size
#> Answer: N = 6 per group
#> 73% of peptides achieve 80% power

plot(result)

From Scratch (Aggregate Mode)

No pilot data? Specify assumed distribution parameters:

result <- power_analysis(
  distribution = "gamma",
  params = list(shape = 2, rate = 0.1),
  effect_size = 2,
  target_power = 0.8,
  find = "sample_size"
)

Documentation

Real-World Examples

Workflow Overview

flowchart TD
    A[pilot_data] --> B[fit_distributions]
    B --> C[power_analysis]
    C --> D{find = ?}
    D --> E["power"]
    D --> F["sample_size"]
    D --> G["effect_size"]
    E --> H[results + plots]
    F --> H
    G --> H

    style A fill:#FFFFCC,stroke:#BD0026
    style B fill:#FD8D3C,stroke:#BD0026,color:#fff
    style C fill:#FD8D3C,stroke:#BD0026,color:#fff
    style H fill:#FFFFCC,stroke:#BD0026

Citation

If you use peppwR in your research, please cite:

MacLean, D. (2026). peppwR: Power Analysis for Phosphopeptide Abundance
Hypothesis Tests. R package version 0.1.0.
https://github.com/TeamMacLean/peppwR

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

MIT © Dan MacLean