Simple python script for phenotypic percentage calculation.
After importing the Genetica.py, you will be able to use the Parental Class.
from Genetica import Parental
Then, you can define objects in this class. Pass the alleles as a string argument.
mother = Parental("Aa")
father = Parental("aa")
Methods:
- Procriar(object) : self.result is now an array of the new alleles possibilities
mother.Procriar(father)
print(mother.result)
#or print(father.result)
Output: ['Aa', 'Aa', 'aa', 'aa']
- Porcento() : self.porcento is now an array of the alleles appearing percentage
mother.Porcento()
print(mother.porcento)
Output: Possibilidades: Aa aa
[('Aa', '50.0%'), ('aa', '50.0%')]
- Analise() : shows the percentage
mother.Analise()
Output : Aa : 50.0%
aa : 50.0%