Skip to main content

Pepkio Mendelian Cross Solver

Call the Pepkio mendelian-cross-solver REST API from Python to generate Punnett squares, offspring ratios, and step-by-step walkthroughs for Mendelian and non-Mendelian crosses.

What It Does

Genetics teaching and homework verification need Punnett grids for complete dominance, incomplete dominance, codominance, ABO blood types, and X-linked traits—each with different notation and ratio rules. Rebuilding gamete tables and phenotype mapping in a notebook for every cross is tedious and easy to get wrong.

This package submits parent genotypes and a dominance_mode to the same Pepkio Tools engine as the hosted Mendelian Cross Solver web calculator. It returns filled grids, genotype and phenotype ratios, walkthrough steps, warnings, and shareable run permalinks.

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

Features

  • Five dominance modes: complete, incomplete, codominant, multiple_alleles (ABO only in MVP), sex_linked
  • Custom phenotype labels; ABO allele hierarchy; sex-linked recessive or dominant trait labeling
  • Manifest examples: complete_monohybrid, incomplete_snapdragon, abo_cross, sex_linked_hemophilia, codominant_roan, dihybrid_pea, sex_linked_dominant
  • CLI: pepkio-mendelian-cross-solver manifest and run
  • Configuration via PEPKIO_API_KEY, LOCAL_PEPKIO_API_KEY, and PEPKIO_API_BASE_URL

Installation

pip install pepkio-mendelian-cross-solver

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

export PEPKIO_API_KEY="your-key"

Create a key in your Pepkio account API keys settings.

Quick Example

from pepkio_mendelian_cross_solver import PepkioClient

with PepkioClient() as client:
    inp = client.get_example_input("abo_cross")
    result = client.run(inp)
    print(result.permalink)
    print("phenotype ratio:", result.result["phenotype_ratios"]["ratio"])

CLI:

pepkio-mendelian-cross-solver run --example complete_monohybrid

Manifest inspection does not require an API key.

Typical Use Cases

  • Verify monohybrid Aa × Aa (3:1) and dihybrid AaBb × AaBb (9:3:3:1) ratios
  • Model ABO blood type crosses (I^A i × I^B i)
  • Set up X-linked recessive or dominant Punnett squares with standard notation
  • Incomplete dominance (snapdragon) and codominance (roan cattle) homework checks
  • Automated genetics problem sets in notebooks or CI

Scientific Background

Monohybrid crosses under complete dominance yield a 3:1 phenotype ratio (Aa × Aa). Incomplete dominance and codominance both give 1:2:1 phenotype ratios when heterozygotes differ from homozygotes. ABO crosses use multiple alleles with I^A, I^B, and i. Sex-linked traits use X-chromosome notation with Parent 1 female and Parent 2 male.

Web Application

For researchers who prefer a graphical interface, an interactive Mendelian Cross Solver is available in the browser.

The web interface adds a live grid, 28 curated textbook presets, collapsible walkthroughs, PNG/SVG export, copy-grid-as-table, shareable permalinks, and print-friendly display.

Documentation and Resources

Source code and issue tracking: github.com/pepkio/pepkio-mendelian-cross-solver

Web calculator: pepkio.com/tools/mendelian-cross-solver

About Pepkio

Pepkio develops software tools and provides bioinformatics analysis services for life science research. See pepkio.com for additional calculators and analysis services.

Keywords

Punnett square, Mendelian cross, monohybrid cross, dihybrid cross, incomplete dominance, codominance, ABO blood type cross, X-linked inheritance, sex-linked Punnett square, genetics ratio calculator, hemophilia cross, snapdragon flower color, pepkio-mendelian-cross-solver, Python Punnett square API, REST API genetics, phenotype ratio 3:1, dihybrid 9:3:3:1, how to cross Aa x Aa Python, ABO I^A i x I^B i offspring ratio, X-linked carrier female Punnett square API, incomplete dominance Rr x Rr check homework, export Punnett square from script, automate genetics teaching examples, Mendelian cross walkthrough API, five inheritance modes one client

Metadata

Release files for pepkio-mendelian-cross-solver 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pepkio-mendelian-cross-solver 0.1.0
File Size Uploaded Provenance
pepkio_mendelian_cross_solver-0.1.0.tar.gz 33.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pepkio-mendelian-cross-solver 0.1.0
File Interpreter ABI Platform
pepkio_mendelian_cross_solver-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.8 kB

Release files / pepkio_mendelian_cross_solver-0.1.0.tar.gz

Download URL pepkio_mendelian_cross_solver-0.1.0.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
471c367df3a504140cc4c51ac470752feb4ba25188172df27305f430326de3da
BLAKE2b-256 checksum
How to use checksums
494f3f0789515ec186adb53de94a4a00555b427c789e450c5faf0052892ca14d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pepkio_mendelian_cross_solver-0.1.0-py3-none-any.whl

Download URL pepkio_mendelian_cross_solver-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cb792bc7bce4c50fdc56cc9a19b2f2df435174d98bef186e9f5410fef85b8f5
BLAKE2b-256 checksum
How to use checksums
4d2b9bf1ccc60a5efc9722fc5205b0f387f849b6f450b2d404dad4a4ce6aba98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pepkio-mendelian-cross-solver 0.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page