pepkio-serial-dilution-planner
v0.1.2
Published
Call the Pepkio Serial Dilution Planner REST API from Node.js with typed ESM imports and a CLI.
Maintainers
Readme
Pepkio Serial Dilution Planner
ESM TypeScript client for requesting pipette-validated serial dilution protocols from the Pepkio Tools API in Node.js scripts, browser apps, and automated pipelines.
What It Does
Serial dilution prepares a geometric concentration series from one stock solution. This package calls the hosted Pepkio Serial Dilution Planner over REST so you can generate protocols programmatically—without reimplementing calculator logic locally.
Use it from Node.js (≥18), bundlers, or CI to fetch the tool manifest, run named examples, or submit custom input JSON. Each completed run returns structured steps (transfer and diluent volumes, concentrations, pipette labels, warnings) and an optional permalink to the same plan in the web UI.
Features
- Pipette-aware rounding with per-step
transfer_ul,diluent_ul, andpipette_label - Molar and mass/volume units; economy mode; mass–molar conversion via molecular weight
- Optional 96- or 384-well
plate_mapin results - Manifest helpers:
getManifest,listExamples,getExampleInput run,getRun, andwaitForRunfor sync and async tools- CLI:
pepkio-serial-dilution-planner manifestandrun - Configurable via
PEPKIO_API_KEYandPEPKIO_API_BASE_URL
Installation
npm install pepkio-serial-dilution-plannerRequires Node.js 18 or newer.
Configuration
Set an API key with tools:run scope before calling run():
export PEPKIO_API_KEY="your-key"Create a key at Pepkio API keys.
Optional overrides:
| Variable | Purpose |
|----------|---------|
| PEPKIO_API_KEY | Production API key (required for run) |
| LOCAL_PEPKIO_API_KEY | Local dev key when PEPKIO_API_BASE_URL points to tools.localtest.me |
| PEPKIO_API_BASE_URL | API host (default https://tools.pepkio.com) |
Quick Example
import { PepkioClient } from "pepkio-serial-dilution-planner";
const client = new PepkioClient({ apiKey: process.env.PEPKIO_API_KEY });
const input = await client.getExampleInput("standard_4step");
const result = await client.run(input);
console.log(result.result?.summary); // { step_count: 4, ... }
console.log(result.permalink); // shareable link to the web planCLI
npx pepkio-serial-dilution-planner manifest --examples
npx pepkio-serial-dilution-planner run --example standard_4stepPass --base-url and --api-key to override environment defaults.
Typical Use Cases
- Four-step mM → µM series (
standard_4step) — dose–response or qPCR template dilution - Limited reagent (
economy_small_pipette) — minimize volume with small pipettes - 384-well mapping (
plate_map_384) — high-throughput plate layout - Antibody by mass (
antibody_mass) — mg/mL stock to molar working concentration - Large concentration span (
extreme_ratio_split) — extra steps when a single transfer would be impractical
Scientific Background
In serial dilution, each step transfers a fixed fraction of the previous tube into fresh diluent, producing a predictable dilution factor across the series. Bench work fails when calculated microliter values do not match pipette resolution (for example 0.1 µL on a P2). Rounding by hand changes the effective factor and can shift standard curves or dose–response readouts. This client returns volumes already rounded to declared pipette increments.
Web Application
For researchers who prefer a graphical interface, an interactive web version is available.
Web Application: https://www.pepkio.com/tools/serial-dilution-planner
The web UI supports live parameter editing, plate visualization, worksheets, and shareable permalinks. The npm package uses the same calculation engine via the REST API.
Documentation and Resources
GitHub Repository: https://github.com/pepkio/pepkio-serial-dilution-planner-js
Web Application: https://www.pepkio.com/tools/serial-dilution-planner
Python client (PyPI): https://pypi.org/project/pepkio-serial-dilution-planner/
About Pepkio
Pepkio (https://www.pepkio.com/) develops software tools and bioinformatics solutions for life science researchers, including laboratory calculators and analysis services.
