2023-08-08

Recessive

Dominant and recessive genetic disorders in Python code

parent1 = [gene1, gene2, ..., gene25000] parent2 = [gene1, gene2, ..., gene25000] child = zip(parent1, parent2) # [(gene1, gene1), (gene2, gene2), ...] # dominant: parent1 or parent2 dominant_genetic_disorder = any([x for x in child if x[0] == "mutation" or x[1] == "mutation"]) # recessive: parent1 and parent2 recessive_genetic_disorder = any([x for x in child if x[0] == "mutation" and x[1] == "mutation"])