2017년 8월 13일 일요일

Punnett Square: Definition & Example


Instructor: Jeffrey Sack
Jeff is a Biology teacher and has a Doctorate in Educational Leadership
This lesson will define what a Punnett square is and show several examples of how one can be used. It will also briefly describe patterns of inheritance.
What Are Punnett Squares?
Two parents with brown eyes have a child with blue eyes. How is this possible? When studying genetics, it's important to remember that there are all kinds of variations in the ways genes express themselves. It's often one gene or a combination of genes that give an organism a particular trait. Since there are so many possibilities when the genes of two parents combine, it is helpful to use a tool called a Punnett square. A Punnett square is a graphical way of determining all the possible genetic outcomes when a cross is performed. In essence, it is a probability box that shows the odds of each possible trait happening.

When traits are expressed by an organism, they result from two copies of a gene: one from the mother and one from the father. Genes can appear in one of two forms: dominant or recessive

The recessive form will be masked if a dominant form is present. Since each parent may have a different combination of the genes, three possible conditions may occur:

BB is called homozygous dominant. Both genes are the same and dominant. The dominant trait is expressed.
Bb is called heterozygous. The organism has a dominant gene and a recessive gene. The dominant trait usually masks the recessive, so the dominant trait is expressed.
bb is called homozygous recessive. Both genes are the same and recessive. The recessive trait is expressed.

When offspring are produced, parents can pass on either of their genes. This is why a Punnett square is a helpful tool.
Making a Punnett Square
To determine the possible genetic combinations of the offspring, the first thing that must be done is to identify the trait that is to be studied. Once this is done, the trait should be assigned a letter to represent it. It's always best to stay away from letters where the capital and the lowercase look similar, like with S and W.

For example, let's say you want to determine the possible outcomes of a cross for eye color. Use the capital letter 'B' to represent brown, as more people have brown eyes than blue, which will be shown by a lowercase 'b':

B is brown
b is blue
The next thing to do is draw the square. Since you are only investigating one trait and each trait has two genes, then the Punnett square should have four boxes. It should look like this:
Once this is complete, place each parent's genes on the outside of each square. For this example, start with a cross between two parents who are both homozygous dominant (or capital B, capital B).
Then, just like in math, cross-multiply. You do this by putting the first letter of the vertical parent in the first box. Then you add to that the first letter of the second parent. Then you fill in the next box with the first letter of the vertical parent with the second letter of the horizontal parent. Then you do the same thing with the second letter of the vertical parent. When you are finished, there should be two letters (or genes) in each box.

Once you have filled in all the boxes, it's time to look at what the possible outcomes are.
Genotypes and Phenotypes
The two things a Punnett square can tell you are the genotypes and phenotypes of the offspring. A genotype is the genetic makeup of the organism. This is shown by the three genetic conditions described earlier (BB, Bb, bb). The phenotype is the trait those genes express. Eye color, hair color, pod shape, and flower position are all examples of phenotypes.

In this example, it asked you to do a cross between two parents who were homozygous dominant for eye color. Looking at the possible offspring, each box (or possible offspring) has two copies of the dominant gene. This means there is a 100% chance of the offspring having brown eyes, or being BB.

It's important to note here that each box represents a possible offspring. It does not follow the pattern of offspring 1, offspring 2, etc. Every time these parents have a child, they have a 25% chance for each genotype or, in this case, 100% BB.
Examples
Let's do another example. This time, do a cross between a parent who is homozygous dominant for brown eyes and one who has blue eyes. Remember that brown is dominant to blue, so the parents genotypes will be BB crossed with bb. Once you draw the Punnett square and do the cross, it should look like this:

Just like in the last example, each parent only has one type of gene to pass on. However, in this case, one parent can pass on a dominant gene, while the other parent can only pass on a recessive. The genotypes for this cross would be 100% Bb and the phenotypes would be 100% brown. Even though each possible offspring is carrying a recessive gene, it is masked by the dominant one.
Here is one more example to get a hang of how the Punnett square works to predict genetic probabilities. In this cross, two heterozygous parents are crossed. Remember, to be heterozygous means an organism has both a dominant and a recessive gene. Usually, the dominant gene masks the expression of the recessive one. Once the Punnett square has been filled out, the results look like this:
Punnett Square HeteroxHetero


Dragging and Placing Sprites


I am working on a game for class that is the topic of Punnett Squares. Our idea to that you drag sprites to the chart that we created (we put the picture in a canvas). How can you make sprites, when dragged into a canvas, connect with a certain spot? Can we place new canvases over the top of the 4 squares (if so, How?), or what could we add to make it interactive?
Sprites: Bb    Bb     bb     BB

--
You might need several Canvas, each in its own Horizontal or Vertical Arrangement       or    you might use some of the ideas shown in this tutorial which allows a user to drag sprites to an area of the canvas that is 'zoned' by using a grid system ... all described here  

Animal Canvas – a children’s educational App Inventor 2 game tutorial  .  The text shows how to set up a grid on the Canvas.  

Also you might benefit from this article if you have not already read it   
There may be other ways to make this interactive so be sure to review this thread over the next several days as others post suggestions.  
        
--
I have been working on this in my spare time the last day or two and have a solution that is fairly straight-forward and easy to understand.
It does require a considerable amount of blocks and could be optimized by anyone inclined to do so as a challenge.
The requirements:
Drag four ImageSprites to a correct target on the genetic chart.

This requires that some logic in the app allow each of the four ImageSprites to be dropped in either of two locations.
The draggable ImageSprites are named Bb1,Bb2,bb1,bb2.
Their pictures also display their name.
There are four target sprites located in the chart, one for each square arranged in compass cardinal directions:
NW,SW,NE,SE
These sprites have no picture so are not visible but are used to trigger a collision with any sprite dropped on them and to position the dropped sprite.
If the correct sprite is dropped in one of the two correct locations on the chart, then 1 is added to a counter.
If the counter = 4 then the chart is completed and a notifier displays 'Well done!'
Sprite cannibalism avoidance is built-in.
More information is provided in the comment bubble of the About procedure block.











--
Thank you very much for your time and helping us out! Have a great day 

--
In the Drag procedure, the 'Sprite' argument should be named 'x'.

--
We are studying your code for our game and we had some questions.

1. For "call Drag" how did you add on the Pair ___ Sprite _____  Y_____?
2. Where did you initialize theses sprites? (pair, sprite, y)
3. How did you create the "call ImageSprite.Move To for component x y?
--
1. For "call Drag" how did you add on the Pair ___ Sprite _____  Y_____?

I accidentally named the second argument 'Sprite' to change it to 'x' click on the 'Sprite' name and type 'x'...
Click on the blue square in the upper left corner to add a new argument...
Drage the 'input x' block on the left into the list on the right and change it's name...

2. Where did you initialize theses sprites? (pair, sprite, y)

Click on the 'Procedures' category on the left, then drag out a 'Drag' block...


Drop it on the Blocks canvas...
Add arguments to it and insert it in a Dragged event block...


3. How did you create the "call ImageSprite.Move To for component x y?

Click on one of the ImageSprite instances on the left and drag out a MoveTo block...


Now insert arguments into the empty sockets...
--
Thank you for responding it is greatly appreciated. However since we aren't using your project specifically we are trying to somewhat duplicate it using what we have access to in app inventor. For the procedure "Drag" how did you add the pink colored components to the procedure. And we also would like to know if you initialize a global for the following; "Pair" "Sprite" "x" on the part of your code with that has to deal with anti-cannablism of the sprites 


--
Sorry for the confusion, we are not super familiar with app inventor, so we didn't know you could add components to different procedures easily. We assumed you created it through a more difficult process. We understand what you did now. If we have anymore questions we will let you know.

Thank you so much for everything!

--

One last question, where did you find this component?


--
you can find it in the Any Component drawer...

--
we also would like to know if you initialize a global for the following; "Pair" "Sprite" "x"
No these are arguments that accept values when the procedure is called.
Inside the Drag block they are treated as local variables.

--
We copied your code to our game to see if it would work the other components we have and it didn't. We are attaching our .aia, if you could help us out again that would be greatly appreciated 


--
I have corrected level 1's blocks.
Now try doing the other levels based on this one.


Screen1
Punnet
Directions
Levelone








Level2



Level3

--