Inspiration
Punnett squares are tedious to work with due to how they require preparation of a schematic. A program which could show the likelihood of certain outcomes based on the genotypes of parents is more efficient.
What it does
This programme is capable of taking into account multiple pieces of data regarding the genotypes of two parents and quickly displays the likelihood of the child showing the dominant phenotype as a result of the alleles it inherits.
How we built it
It was obvious that all crucial pieces of data needed to be assigned variables - this meant the input variables of the mother and father's genotypes (i.e. number of dominant alleles possessed by each parent) and the output variable of the child's calculate chance of showing the dominant phenotype. We needed to then create a function to link the inputs to the output; this was achieved by adding the total of dominant alleles, dividing the value by two and then accounting for the random nature of allele inheritance to calculate a percentage likelihood, which is returned by the function.
Challenges we ran into
Considering the randomness of inheritance was difficult; simply totalling the dominant alleles would have implied that the alleles inherited were fixed. We needed to create conditional statements to ensure that the likelihood generated equalled the value which would occur in nature. We also needed to ensure that the percentage chance could not be increased to a greater value than one hundred percent, as this is infeasible.
Accomplishments that we're proud of
It was difficult to bypass the problem of simulating real random selection of alleles, so we were satisfied upon creating an appropriate function.
What we learned
I learned methods of overcoming mathematical and statistical problems when designing programs which predict an outcome based on input factors.
What's next for Phenotype Likelihood Calculator
Rather than simply calculating a phenotype likelihood, an overall genotype for the child could be produced in another program. This provides the advantage of taking into account multiple generations of offspring, to track how genotypes and phenotypes will show themselves over time. We could also introduce other factors, such as creating a simulated environment in which certain phenotypes increase the chances of an individual reproducing and passing on its alleles, mimicking real-world natural selection/evolution.
Log in or sign up for Devpost to join the conversation.