Metadata-Version: 2.4
Name: pepkio-pcr-master-mix-calculator
Version: 0.1.0
Summary: Python client for PCR master mix volume planning via the Pepkio Tools API
Requires-Python: >=3.11
Requires-Dist: click>=8.4.1
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.13.4
Description-Content-Type: text/markdown

# Pepkio PCR Master Mix Calculator

Compute per-reaction and batch PCR master-mix volumes from assay recipes—buffer, primers, dNTPs, enzyme, and water—via the Pepkio Tools API from Python scripts, notebooks, or CI.

# What It Does

Setting up PCR or qPCR often means scaling several reagents to a target reaction volume, adding overage for pipetting loss, and repeating the arithmetic for each assay on a plate or run. Small transfer volumes are easy to miss until you are at the bench.

This package calls the same Pepkio Tools calculation engine as the hosted web application. Define one or more assay recipes with stock and final concentrations, reaction count, and overage; receive per-component microliter volumes, consolidated totals across assays, dilution warnings for sub-microliter transfers, and shareable run links.

Programmatic runs require a network connection and a Pepkio API key. Calculations are not bundled for offline use.

# Features

- Multiple assays per session with independent reaction volume, count, and overage factor
- Reagent units: molar (`M`, `mM`, `uM`, `nM`) and fold (for buffers and enzyme)
- Per-reaction and batch volumes scaled by `reaction_count × overage_factor`
- Water volume computed as the remainder to fill each reaction
- Consolidated reagent totals when planning several assays together
- Warnings for transfer volumes below 0.5 µL with dilution suggestions
- Manifest and named examples: `get_manifest`, `list_examples`, `get_example_input`
- CLI: `pepkio-pcr-master-mix-calculator manifest` and `run`
- Configuration via `PEPKIO_API_KEY` and `PEPKIO_API_BASE_URL`

# Installation

```bash
pip install pepkio-pcr-master-mix-calculator
```

Set an API key with **tools:run** scope before calling `run()`:

```bash
export PEPKIO_API_KEY="your-key"
```

Create a key in your [Pepkio account API keys](https://www.pepkio.com/account/api-keys) settings.

# Quick Example

```python
from pepkio_pcr_master_mix_calculator import PepkioClient

with PepkioClient() as client:
    inp = client.get_example_input("qpcr_20ul_sybr")
    result = client.run(inp)
    for assay in result.result["assays"]:
        print(assay["name"], assay.get("total_reactions"))
        for line in assay.get("lines", []):
            print(" ", line["name"], line.get("volume_per_reaction_ul"))
```

CLI:

```bash
pepkio-pcr-master-mix-calculator run --example qpcr_20ul_sybr
```

Manifest inspection does not require an API key.

# Typical Use Cases

- SYBR Green qPCR master mix for 20 µL reactions with 10% overage
- Genotyping PCR with Taq polymerase and custom primer concentrations
- Consolidating reagents across three primer sets on one plate
- Checking whether any component falls below a 0.5 µL pipetting threshold
- Batch planning before a multi-assay genotyping or screening run
- Automating master-mix worksheets in LIMS or notebook pipelines

# Scientific Background

For each reagent, volume (µL) = (final concentration / stock concentration) × reaction volume when stock and final units match (molar or fold). Water fills the remainder so components sum to the target reaction volume.

Batch amounts multiply per-reaction volumes by reaction count and an overage factor to account for dead volume and pipetting loss. When a calculated transfer is impractically small, diluting the stock or adjusting concentrations reduces pipetting error.

Enzyme activity (U/µL) is not supported—express enzyme and buffer inputs as fold or molar units.

# Web Application

For researchers who prefer a graphical interface, an interactive [PCR Master Mix Calculator](https://www.pepkio.com/tools/pcr-master-mix-calculator) is available in the browser.

The web interface adds a printable bench sheet, visual review of assay recipes, and shareable links that restore the same plan as API `permalink` values.

# Documentation and Resources

Source code and issue tracking: [github.com/pepkio/pepkio-pcr-master-mix-calculator](https://github.com/pepkio/pepkio-pcr-master-mix-calculator)

Web application: [https://www.pepkio.com/tools/pcr-master-mix-calculator](https://www.pepkio.com/tools/pcr-master-mix-calculator)

# About Pepkio

Pepkio develops software tools and provides bioinformatics analysis services for life science research. See https://www.pepkio.com for additional tools and services.

# Keywords

PCR master mix, master mix calculator, qPCR master mix, SYBR master mix, PCR reagent calculator, reaction volume calculator, microliter PCR setup, primer concentration PCR, dNTP dilution PCR, Taq polymerase dilution, buffer fold dilution, PCR overage factor, pipetting overage PCR, multi-assay PCR planning, consolidated reagent totals, genotyping PCR setup, 96-well qPCR preparation, laboratory PCR calculator, molecular biology calculator, bench sheet PCR, PCR worksheet, sub-microliter pipetting warning, dilution suggestion PCR, water volume PCR, C1V1=C2V2 PCR, fold dilution buffer, mM primer working concentration, Python PCR API, pepkio-pcr-master-mix-calculator, lab automation PCR setup, how to calculate PCR master mix volumes, how much master mix for 24 qPCR reactions, qPCR 20 uL SYBR recipe calculator, scale PCR reagents with overage, consolidate primers across multiple assays, warn when PCR component below 0.5 uL, how to dilute 10x buffer for PCR, calculate water volume in PCR reaction, batch PCR master mix for three primer sets, automate PCR worksheet from Python, API for qPCR reagent planning, genotyping PCR 25 uL GoTaq setup, shareable PCR protocol link, printable PCR bench sheet, reaction count times overage factor calculator, final versus stock concentration PCR volume, multi-assay plate PCR reagent totals, how to plan SYBR qPCR master mix 10 percent overage, Python script PCR reagent volumes, reduce pipetting error small volume PCR component
