Genetics Calculator

NO idea if this even belongs in the PHP section. But, it’s my language of choice, so I’ll start here :smiley:

Many of you may remember the good ol’ Punnet Square, which helps you to determine the percentage of dominant and recessive genes that will give characteristics.

I’m trying to write a program which could have literally hundreds of different possibilities for the male and female side.

:scratch: where to start…

Albino is always a good place to start. Usually, it’s a recessive gene.

Albino x Albino gives 100% albinos
Albino x Het Albino gives you 50% Albinos, and 50% Het Albinos
Het Albino to Het Albino gives you 25% Albinos, 50% Het Albinos, and 25% Normal (I think that’s right…not quite sure :blush: )

Anyway, so the user comes in…and has maybe a drop down list of the first animal. They can select any option they want. We’ll say they select Albino.

Then another drop down menu on the side of the punnet square with another drop down menu, where they can select anything they want - Het albino, for example.

The punnet square automatically populates with the results, based on the two selections.

I know it’s an odd request…but I know it will be useful to the people I’m making this for :slight_smile:

Hey, I don’t know what you are asking here

It would be cool with AJAX/PHP, they can do a lot together.

Yeah that’s what I’m hoping to use - AJAX and PHP.

Here is a very simple example of what I’m talking about: Punnett Square Calculator

This is a simple truth table

AAxAB

A    A

A AA AA
B AB AB