Hardy weinberg hwe

From XuShuwenn/RedAct · View interactive version

Hardy weinberg hwe is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Compute Hardy–Weinberg expected genotype counts and heterozygosity from observed genotype counts with validation and precise formatting.

How to use this skill

Skill file

Hardy–Weinberg Equilibrium: Expected Counts and Heterozygosity

This skill computes expected genotype counts under Hardy–Weinberg equilibrium (HWE) and both expected and observed heterozygosity from observed biallelic genotype counts (AA, Aa, aa). It includes verification checks and a reusable helper script.

When to Use

Use this skill when you have counts for AA, Aa, and aa at a single biallelic locus and need to:

Core Workflow

  1. Parse Inputs
  1. Allele Frequencies
  1. HWE Expectations
  1. Heterozygosity
  1. Output Formatting

Verification

Perform these checks before finalizing results:

If any check fails, halt and report a clear error instead of emitting possibly incorrect results.

Common Pitfalls

Success Criteria

Optional Script Usage

A reusable helper script is provided.

Examples:

The script validates inputs, computes HWE expectations, runs verification checks, and prints the five required lines with 4-decimal formatting.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.