I want to write a script that can complete a monohybrid, dihybrid, and trihybrid cross automatically, for those of you who haven't taken 10th grade biology; these types of crosses are to determine the possible traits to be passed to offspring from the parents' traits.
the concept is simple on paper, for an example problem it would be so:
Red flowers are dominant to white flowers (F) if the parents genotypes are as follows
Ff x FF
What are all the different possibilities for the offspring?
First, make a monohybrid cross, because this is only one trait
F f
-----------
F |FF | Ff|
F |FF | Ff|
_______
a dihybrid cross is the same, but more complex,
Red flowers are dominant to white flowers (F), and green seeds are dominant to yellow seeds (S)
The parents genotypes are
FFSs x ffSs
To make things easier, lets make the gametes:
FS Fs fS fs
FS Fs fS fs
The dihybrid cross would be this:
FS FS Fs Fs
fS |FfSS |FfSS |FfSs |FfSs and so on…
fS
fs
fs
a trihybrid cross follows the same pattern (monohybrid has 4 squares, dihybrid has 16, trihybrid has 64) a trihybrid example would be so:
Red flowers are dominant to white flowers (F), and green seeds are dominant to yellow seeds (S) Round seeds are dominant to wrinkled seeds(R)
FfRRss x FFrrSs
And so on…