(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 29215, 909]*) (*NotebookOutlinePosition[ 29895, 932]*) (* CellTagsIndexPosition[ 29851, 928]*) (*WindowFrame->Normal*) Notebook[{ Cell["\<\ MendelCreature Genetics Neutral Gender w/Crossover Example\ \>", "Subtitle", TextAlignment->Center], Cell[TextData[{ "\tThis notebook is an annotated walkthrough of the ", StyleBox["MendelCreature ", FontSlant->"Italic"], "genetics package, using the MendelBeans package to explore concepts of \ chromosome crossover. Note that the fictional MendelBeans have the same \ traits as MendelPeas, but a different chromosomal arrangement." }], "Text", FontSize->14], Cell[TextData[{ StyleBox["Getting started\n", "Section"], "\tTo begin, we set the appropriate package directory and import the \ MendelBeans.m package" }], "Text", FontSize->14], Cell[BoxData[{ \(\(SetDirectory["\"];\)\), "\n", \(<< MendelBeans.m\)}], "Input"], Cell["\tType explains a bit about the genome we have just loaded", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(TYPE\)], "Input"], Cell[BoxData[ \("Plant genome (sexless) with self-fertilization."\)], "Output"] }, Open ]], Cell[TextData[{ "\tInstead of making an original and new population, we can load one from \ memory, so it will be the same for the walkthrough (", StyleBox["BeanPatch = MakePop[5000]", "Input"], " generates a new, random population)." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(<< MendelBeansEg.mx\), "\[IndentingNewLine]", \(Length[BeanPatch]\), "\[IndentingNewLine]", \(\(Sample\ = \ Take[BeanPatch, 10];\)\), "\[IndentingNewLine]", \(ShowPop[Sample]\)}], "Input"], Cell[BoxData[ \(5000\)], "Output"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"Neutral Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral \ Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral \ Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral \ Gender\"\>", "\<\"Neutral Gender\"\>"}, {"\<\"Smooth Seeds\"\>", "\<\"Smooth Seeds\"\>", "\<\"Smooth \ Seeds\"\>", "\<\"Smooth Seeds\"\>", "\<\"Wrinkled Seeds\"\>", "\<\"Smooth \ Seeds\"\>", "\<\"Smooth Seeds\"\>", "\<\"Wrinkled Seeds\"\>", "\<\"Smooth \ Seeds\"\>", "\<\"Smooth Seeds\"\>"}, {"\<\"Yellow Seeds\"\>", "\<\"Yellow Seeds\"\>", "\<\"Green Seeds\"\ \>", "\<\"Yellow Seeds\"\>", "\<\"Yellow Seeds\"\>", "\<\"Green Seeds\"\>", "\ \<\"Yellow Seeds\"\>", "\<\"Green Seeds\"\>", "\<\"Green Seeds\"\>", \ "\<\"Yellow Seeds\"\>"}, {"\<\"Tall Stems\"\>", "\<\"Tall Stems\"\>", "\<\"Tall Stems\"\>", \ "\<\"Tall Stems\"\>", "\<\"Dwarf Stems\"\>", "\<\"Tall Stems\"\>", "\<\"Tall \ Stems\"\>", "\<\"Tall Stems\"\>", "\<\"Dwarf Stems\"\>", "\<\"Tall \ Stems\"\>"}, {"\<\"Inflated Pods\"\>", "\<\"Constricted Pods\"\>", "\<\"Inflated \ Pods\"\>", "\<\"Inflated Pods\"\>", "\<\"Inflated Pods\"\>", "\<\"Constricted \ Pods\"\>", "\<\"Constricted Pods\"\>", "\<\"Inflated Pods\"\>", "\<\"Inflated \ Pods\"\>", "\<\"Constricted Pods\"\>"}, {"\<\"Green Pods\"\>", "\<\"Green Pods\"\>", "\<\"Green Pods\"\>", \ "\<\"Yellow Pods\"\>", "\<\"Yellow Pods\"\>", "\<\"Yellow Pods\"\>", \ "\<\"Green Pods\"\>", "\<\"Yellow Pods\"\>", "\<\"Green Pods\"\>", "\<\"Green \ Pods\"\>"}, {"\<\"White Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"White \ Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"Purple \ Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"Purple \ Flowers\"\>", "\<\"Purple Flowers\"\>"}, {"\<\"Terminal Flowers\"\>", "\<\"Axial Flowers\"\>", "\<\"Axial \ Flowers\"\>", "\<\"Terminal Flowers\"\>", "\<\"Axial Flowers\"\>", "\<\"Axial \ Flowers\"\>", "\<\"Axial Flowers\"\>", "\<\"Axial Flowers\"\>", "\<\"Axial \ Flowers\"\>", "\<\"Terminal Flowers\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[TextData[{ StyleBox["Trait Linkages", "Section"], "\n\tSelect all individuals from the large population with what appear to \ be all dominant traits, and choose one of them. " }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(DomFind\ = \ FindTraitMatches[ BeanPatch, {"\", "\", "\", "\", \ "\", "\", \ "\"}, And];\)\), "\[IndentingNewLine]", \(\(OneDom\ = \ DomFind[\([1]\)];\)\), "\[IndentingNewLine]", \(ShowOne[OneDom]\)}], "Input"], Cell[BoxData[ InterpretationBox[GridBox[{ {"\<\"Neutral Gender\"\>"}, {"\<\"Smooth Seeds\"\>"}, {"\<\"Yellow Seeds\"\>"}, {"\<\"Tall Stems\"\>"}, {"\<\"Inflated Pods\"\>"}, {"\<\"Green Pods\"\>"}, {"\<\"Purple Flowers\"\>"}, {"\<\"Axial Flowers\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ {"Neutral Gender", "Smooth Seeds", "Yellow Seeds", "Tall Stems", "Inflated Pods", "Green Pods", "Purple Flowers", "Axial Flowers"}]]], "Output"] }, Open ]], Cell["\<\ \tWe could try the same for recessive traits, but our chances of \ finding a seven time recessive are small. How small? Lets see count the \ recessives for one trait.\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(CountTrait[BeanPatch, "\"]\)], "Input"], Cell[BoxData[ \({1266, 5000, 633\/2500}\)], "Output"] }, Open ]], Cell[TextData[{ "\tFor an even (50/50) distribution of recessive and dominant alleles, we \ would expect 1/4 (.5*.5 = .25) of the individuals to have both and be \ homozygous recessive, which is essentially what we get. For seven recessive \ traits, we would expect only one in ", Cell[BoxData[ \(TraditionalForm\`4\^7\)]], ", or one in every 16,384 individuals, to be seven times recessive. \ Because the BeanPatch only has 5000 individuals, our chances are about 30% \ that we have such an individual in the population..." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(RecFind\ = \ FindTraitMatches[ BeanPatch, {"\", "\", "\", "\", \ "\", "\", \ \[IndentingNewLine]"\"}, And];\)\), "\[IndentingNewLine]", \(\(OneRec\ = \ RecFind[\([1]\)];\)\), "\[IndentingNewLine]", \(ShowOne[OneRec]\)}], "Input"], Cell[BoxData[ InterpretationBox[GridBox[{ {"\<\"Neutral Gender\"\>"}, {"\<\"Wrinkled Seeds\"\>"}, {"\<\"Green Seeds\"\>"}, {"\<\"Dwarf Stems\"\>"}, {"\<\"Constricted Pods\"\>"}, {"\<\"Yellow Pods\"\>"}, {"\<\"White Flowers\"\>"}, {"\<\"Terminal Flowers\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ {"Neutral Gender", "Wrinkled Seeds", "Green Seeds", "Dwarf Stems", "Constricted Pods", "Yellow Pods", "White Flowers", "Terminal Flowers"}]]], "Output"] }, Open ]], Cell["\<\ \tApparently we were lucky. (Or, more likely, we made a few extra \ patches and used one with the rare recessive in it...)\ \>", "Text", FontSize->14], Cell["\<\ \tWe would expect our recessive plant to produce all recessives \ (100 of 100) when crossed with itself:\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(RecGen1\ = \ Breed[OneRec, OneRec, 100];\)\), "\[IndentingNewLine]", \(CountTrait[RecGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[RecGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[RecGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[RecGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[RecGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[RecGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[RecGen1, "\"]\)}], "Input"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"] }, Open ]], Cell["\<\ \tOur so-called 'dominant', however, could be heterozygous, which \ will also show itself in a self-fertilization. 100% dominant offspring means \ homozygous parent, 75% dominant offspring means heterozygous parent.\ \>", \ "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(DomGen1\ = \ Breed[OneDom, OneDom, 100];\)\), "\[IndentingNewLine]", \(ssct = CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(ysct = CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(tsct = CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(ipct = CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(gpct = CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(pfct = CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(afct = CountTrait[DomGen1, "\"]\)}], "Input"], Cell[BoxData[ \({80, 100, 4\/5}\)], "Output"], Cell[BoxData[ \({78, 100, 39\/50}\)], "Output"], Cell[BoxData[ \({74, 100, 37\/50}\)], "Output"], Cell[BoxData[ \({72, 100, 18\/25}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({75, 100, 3\/4}\)], "Output"] }, Open ]], Cell["\<\ \tHomozygous: Green Pods, Purple Flowers \tHeterozygous: Smooth Seeds, Yellow Seeds,Tall Stems,Inflated Pods, Axial \ Flowers \tIf traits are independently assorted, then (fraction of population with \ first trait) * (fraction of population with second trait) = (fraction of \ population with both traits). Let's test these traits for \ independence.\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(ssct[\([3]\)]*ysct[\([3]\)]\), "\[IndentingNewLine]", \(CountTraitMatch[DomGen1, {"\", "\"}, And]\)}], "Input"], Cell[BoxData[ \(21\/100\)], "Output"], Cell[BoxData[ \({42, 100, 21\/50}\)], "Output"] }, Open ]], Cell[TextData[{ "\tHmm... twice as many Smooth ", StyleBox["and", FontWeight->"Bold"], " Yellow as expected. Looks like these two traits are linked. Similarly \ for others:" }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(ssct[\([3]\)]*tsct[\([3]\)]\), "\[IndentingNewLine]", \(CountTraitMatch[DomGen1, {"\", "\"}, And]\)}], "Input"], Cell[BoxData[ \(1\/2\)], "Output"], Cell[BoxData[ \({74, 100, 37\/50}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(ssct[\([3]\)]*ipct[\([3]\)]\), "\[IndentingNewLine]", \(CountTraitMatch[DomGen1, {"\", "\"}, And]\)}], "Input"], Cell[BoxData[ \(23\/100\)], "Output"], Cell[BoxData[ \({46, 100, 23\/50}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(ssct[\([3]\)]*gpct[\([3]\)]\), "\[IndentingNewLine]", \(CountTraitMatch[DomGen1, {"\", "\"}, And]\)}], "Input"], Cell[BoxData[ \(53\/200\)], "Output"], Cell[BoxData[ \({61, 100, 61\/100}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(ssct[\([3]\)]*pfct[\([3]\)]\), "\[IndentingNewLine]", \(CountTraitMatch[DomGen1, {"\", "\"}, And]\)}], "Input"], Cell[BoxData[ \(1\/2\)], "Output"], Cell[BoxData[ \({74, 100, 37\/50}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(ssct[\([3]\)]*afct[\([3]\)]\), "\[IndentingNewLine]", \(CountTraitMatch[DomGen1, {"\", "\"}, And]\)}], "Input"], Cell[BoxData[ \(1\/2\)], "Output"], Cell[BoxData[ \({74, 100, 37\/50}\)], "Output"] }, Open ]], Cell["\<\ \tEach other trait appears to be linked to the first trait, which, \ in turn, means they are all linked to each other! We can explore this \ linkage more once we have a couple of pure homozygous lines.\ \>", "Text", FontSize->14], Cell[TextData[{ StyleBox["Establishing homozygous genotypes", "Section"], "\n\tIt is relatively easy to find a homozygous recessive genotype - simply \ find an individual with the recessive traits, which we already have in ", StyleBox["OneRec", "Input"], ", and can rename as ", StyleBox["HomRec", "Input"], "." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(HomRec\ = \ OneRec;\)\), "\[IndentingNewLine]", \(ShowOne[HomRec]\)}], "Input"], Cell[BoxData[ InterpretationBox[GridBox[{ {"\<\"Neutral Gender\"\>"}, {"\<\"Wrinkled Seeds\"\>"}, {"\<\"Green Seeds\"\>"}, {"\<\"Dwarf Stems\"\>"}, {"\<\"Constricted Pods\"\>"}, {"\<\"Yellow Pods\"\>"}, {"\<\"White Flowers\"\>"}, {"\<\"Terminal Flowers\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ {"Neutral Gender", "Wrinkled Seeds", "Green Seeds", "Dwarf Stems", "Constricted Pods", "Yellow Pods", "White Flowers", "Terminal Flowers"}]]], "Output"] }, Open ]], Cell[TextData[{ "\tIt is quite a bit harder to find a purely homozygous individual, \ particularly for lots of traits, because heterozygous individuals look the \ same! Our original all dominant selection, ", StyleBox["OneDom", "Input"], ", only had two homozygous traits. We can select from others in the \ original list, ", StyleBox["DomFind", "Input"], ", breeding each with itself until we find one with at least four or five \ homozygous traits:" }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(TestDom1\ = \ DomFind[\([11]\)];\)\), "\[IndentingNewLine]", \(\(DomGen1 = \ Breed[TestDom1, TestDom1, 100];\)\), "\[IndentingNewLine]", \(CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen1, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen1, "\"]\)}], "Input"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({79, 100, 79\/100}\)], "Output"], Cell[BoxData[ \({76, 100, 19\/25}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"] }, Open ]], Cell["\<\ \tWe select from the dominant trait individuals and repeat the \ process with the next generation:\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(DomFind1\ = \ FindTraitMatches[DomGen1, {"\", "\"}, And];\)\), "\[IndentingNewLine]", \(\(TestDom2\ = \ DomFind1[\([1]\)];\)\), "\[IndentingNewLine]", \(\(DomGen2 = \ Breed[TestDom2, TestDom2, 100];\)\), "\[IndentingNewLine]", \(CountTrait[DomGen2, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen2, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen2, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen2, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen2, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen2, "\"]\), "\[IndentingNewLine]", \(CountTrait[DomGen2, "\"]\)}], "Input"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"] }, Open ]], Cell["\<\ \tWe now have an individual plant that is homozygous dominant in \ all seven traits.\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(HomDom\ = \ TestDom2;\)\), "\[IndentingNewLine]", \(ShowOne[HomDom]\)}], "Input"], Cell[BoxData[ InterpretationBox[GridBox[{ {"\<\"Neutral Gender\"\>"}, {"\<\"Smooth Seeds\"\>"}, {"\<\"Yellow Seeds\"\>"}, {"\<\"Tall Stems\"\>"}, {"\<\"Inflated Pods\"\>"}, {"\<\"Green Pods\"\>"}, {"\<\"Purple Flowers\"\>"}, {"\<\"Axial Flowers\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ {"Neutral Gender", "Smooth Seeds", "Yellow Seeds", "Tall Stems", "Inflated Pods", "Green Pods", "Purple Flowers", "Axial Flowers"}]]], "Output"] }, Open ]], Cell[TextData[{ StyleBox["Observing Crossover", "Section"], "\n\tCrossing homozygous dominant and homozygous recessive lines will yield \ all heterozygous offspring, so we will expect 100% dominant traits." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(DoReGen\ = \ Breed[HomDom, HomRec, 100];\)\), "\[IndentingNewLine]", \(CountTrait[DoReGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[DoReGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[DoReGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[DoReGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[DoReGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[DoReGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[DoReGen, "\"]\), "\[IndentingNewLine]", \(\(Heter\ = \ DoReGen[\([1]\)];\)\)}], "Input"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"], Cell[BoxData[ \({100, 100, 1}\)], "Output"] }, Open ]], Cell["\<\ \tBecause the traits are linked, however, a heterozygous parent \ will be expected to pass all-dominant or all-recessive genes to their \ offspring. Looking at a single trait demonstrates the expected 50/50 split \ between heterozygous and homozygous recessive that we would expect from a \ cross of heterozygous and homozygous recessive parents. We make this \ population big because we want to look at the numbers more closely.\ \>", \ "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(HetRecGen\ = \ Breed[Heter, HomRec, 1000];\)\), "\[IndentingNewLine]", \(CountTrait[HetRecGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[HetRecGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[HetRecGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[HetRecGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[HetRecGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[HetRecGen, "\"]\), "\[IndentingNewLine]", \(CountTrait[HetRecGen, "\"]\)}], "Input"], Cell[BoxData[ \({521, 1000, 521\/1000}\)], "Output"], Cell[BoxData[ \({526, 1000, 263\/500}\)], "Output"], Cell[BoxData[ \({514, 1000, 257\/500}\)], "Output"], Cell[BoxData[ \({510, 1000, 51\/100}\)], "Output"], Cell[BoxData[ \({512, 1000, 64\/125}\)], "Output"], Cell[BoxData[ \({499, 1000, 499\/1000}\)], "Output"], Cell[BoxData[ \({498, 1000, 249\/500}\)], "Output"] }, Open ]], Cell[TextData[{ "\tFor ", StyleBox["linked", FontSlant->"Italic"], " traits, individuals with one dominant trait should have received all \ seven dominant traits, and individuals with recessive traits should have ", StyleBox["all", FontWeight->"Bold"], " recessive and ", StyleBox["no", FontWeight->"Bold"], " dominant traits. Lets see if this is true. For example, we would expect \ no individuals with both recessive Wrinkled Seeds and dominant Yellow Seeds, \ but... " }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(CountTraitMatch[HetRecGen, {"\", "\"}, And]\)], "Input"], Cell[BoxData[ \({50, 1000, 1\/20}\)], "Output"] }, Open ]], Cell["\<\ \tAnd there are even more with recessive Wrinkled Seeds and \ dominant Tall Stems!\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(CountTraitMatch[HetRecGen, {"\", "\"}, And]\)], "Input"], Cell[BoxData[ \({93, 1000, 93\/1000}\)], "Output"] }, Open ]], Cell[TextData[{ "\tThis phenomenon indicates ", StyleBox["crossover", FontWeight->"Bold"], ", when two chromosomes inside a parent swap ", StyleBox["parts", FontSlant->"Italic"], " of their genetic material before dividing. For nearly 100 of the \ heterozygous parent plants there was a switch where the recessive chromosome \ kept the part with 'seed texture' allele but gave up the part with the 'stem \ length' allele in a swap with the dominant chromosome. The number of \ individuals that cross over can be used to tell how far apart two genes are \ on a chromosome. If they are close together, they tend to get swapped at the \ same time, and the crossover is not noticable. If they are far apart, they \ will be separated by crossover quite often.\n\tGenetic distances can be \ measured in percentage length of the chromosome, i.e. in 'parts out of 100'. \ The 'seed texture' and 'stem length' genes cross over about 10 times out of \ 100, so they are about 10 genetic units apart (assuming single crossovers - \ double crossovers are not implemented in the MendelBeans model!). Let's see \ how far the other genes are from the Wrinkled Seeds gene." }], "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(CountTraitMatch[HetRecGen, {"\", "\"}, And]\)], "Input"], Cell[BoxData[ \({148, 1000, 37\/250}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(CountTraitMatch[HetRecGen, {"\", "\"}, And]\)], "Input"], Cell[BoxData[ \({199, 1000, 199\/1000}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(CountTraitMatch[ HetRecGen, {"\", "\"}, And]\)], "Input"], Cell[BoxData[ \({246, 1000, 123\/500}\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(CountTraitMatch[HetRecGen, {"\", "\"}, And]\)], "Input"], Cell[BoxData[ \({299, 1000, 299\/1000}\)], "Output"] }, Open ]], Cell["\<\ \tApparently the other genes are spaced out at about every 5 \ genetic units or so, which means the recessive Dwarf Stems should be about 15 \ units from the dominant Purple Flowers, for about 150 crossovers per 1000. \ Let's see...\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[ \(CountTraitMatch[HetRecGen, {"\", "\"}, And]\)], "Input"], Cell[BoxData[ \({153, 1000, 153\/1000}\)], "Output"] }, Open ]], Cell["\<\ \tPretty close! For one last look at crossover, lets look at a \ sample of the 'crossover' generation. Remember that without crossover these \ should be all heterozygous (dominant) or all homozygous recessive. Can you \ see one that is not? Can you identify 'where' crossover occured? (Dominant \ is Smooth/Yellow/Tall/Inflated/Green/Purple/Axial).\ \>", "Text", FontSize->14], Cell[CellGroupData[{ Cell[BoxData[{ \(\(CrossSample\ = \ Take[HetRecGen, 10];\)\), "\[IndentingNewLine]", \(ShowPop[CrossSample]\)}], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"\<\"Neutral Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral \ Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral \ Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral Gender\"\>", "\<\"Neutral \ Gender\"\>", "\<\"Neutral Gender\"\>"}, {"\<\"Wrinkled Seeds\"\>", "\<\"Wrinkled Seeds\"\>", "\<\"Smooth \ Seeds\"\>", "\<\"Wrinkled Seeds\"\>", "\<\"Smooth Seeds\"\>", "\<\"Smooth \ Seeds\"\>", "\<\"Smooth Seeds\"\>", "\<\"Wrinkled Seeds\"\>", "\<\"Wrinkled \ Seeds\"\>", "\<\"Wrinkled Seeds\"\>"}, {"\<\"Green Seeds\"\>", "\<\"Green Seeds\"\>", "\<\"Yellow \ Seeds\"\>", "\<\"Green Seeds\"\>", "\<\"Yellow Seeds\"\>", "\<\"Yellow \ Seeds\"\>", "\<\"Yellow Seeds\"\>", "\<\"Green Seeds\"\>", "\<\"Green Seeds\"\ \>", "\<\"Yellow Seeds\"\>"}, {"\<\"Dwarf Stems\"\>", "\<\"Dwarf Stems\"\>", "\<\"Tall \ Stems\"\>", "\<\"Dwarf Stems\"\>", "\<\"Tall Stems\"\>", "\<\"Tall \ Stems\"\>", "\<\"Tall Stems\"\>", "\<\"Dwarf Stems\"\>", "\<\"Dwarf \ Stems\"\>", "\<\"Tall Stems\"\>"}, {"\<\"Constricted Pods\"\>", "\<\"Constricted Pods\"\>", \ "\<\"Inflated Pods\"\>", "\<\"Constricted Pods\"\>", "\<\"Constricted \ Pods\"\>", "\<\"Constricted Pods\"\>", "\<\"Inflated Pods\"\>", \ "\<\"Constricted Pods\"\>", "\<\"Constricted Pods\"\>", "\<\"Inflated \ Pods\"\>"}, {"\<\"Yellow Pods\"\>", "\<\"Green Pods\"\>", "\<\"Yellow \ Pods\"\>", "\<\"Yellow Pods\"\>", "\<\"Yellow Pods\"\>", "\<\"Yellow \ Pods\"\>", "\<\"Green Pods\"\>", "\<\"Green Pods\"\>", "\<\"Yellow Pods\"\>", \ "\<\"Green Pods\"\>"}, {"\<\"White Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"White \ Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"White Flowers\"\>", "\<\"White \ Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"Purple Flowers\"\>", "\<\"White \ Flowers\"\>", "\<\"Purple Flowers\"\>"}, {"\<\"Terminal Flowers\"\>", "\<\"Axial Flowers\"\>", "\<\"Terminal \ Flowers\"\>", "\<\"Axial Flowers\"\>", "\<\"Terminal Flowers\"\>", \ "\<\"Terminal Flowers\"\>", "\<\"Terminal Flowers\"\>", "\<\"Axial \ Flowers\"\>", "\<\"Axial Flowers\"\>", "\<\"Axial Flowers\"\>"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[TextData[{ StyleBox["The End\n", "Section"], "\tThe statement below was used to save the original patch in the file you \ initially loaded." }], "Text", FontSize->14], Cell[BoxData[ \(\(DumpSave["\", {BeanPatch}];\)\)], "Input"], Cell[TextData[{ "\t", StyleBox["This notebook created by Dr. Garrett R. Love for the Shodor \ Education Foundation. Copyright 2002", "SmallText"] }], "Text", FontSize->14] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 800}, {0, 527}}, WindowSize->{578, 523}, WindowMargins->{{Automatic, 86}, {13, Automatic}}, StyleDefinitions -> "Classroom.nb" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[1705, 50, 111, 4, 66, "Subtitle"], Cell[1819, 56, 371, 8, 90, "Text"], Cell[2193, 66, 183, 5, 89, "Text"], Cell[2379, 73, 149, 3, 133, "Input"], Cell[2531, 78, 90, 1, 30, "Text"], Cell[CellGroupData[{ Cell[2646, 83, 37, 1, 55, "Input"], Cell[2686, 86, 83, 1, 79, "Output"] }, Open ]], Cell[2784, 90, 268, 6, 71, "Text"], Cell[CellGroupData[{ Cell[3077, 100, 225, 4, 133, "Input"], Cell[3305, 106, 38, 1, 54, "Output"], Cell[3346, 109, 2348, 40, 223, "Output"] }, Open ]], Cell[5709, 152, 212, 5, 89, "Text"], Cell[CellGroupData[{ Cell[5946, 161, 371, 7, 211, "Input"], Cell[6320, 170, 646, 17, 219, "Output"] }, Open ]], Cell[6981, 190, 207, 5, 50, "Text"], Cell[CellGroupData[{ Cell[7213, 199, 76, 1, 55, "Input"], Cell[7292, 202, 57, 1, 69, "Output"] }, Open ]], Cell[7364, 206, 565, 11, 130, "Text"], Cell[CellGroupData[{ Cell[7954, 221, 409, 8, 211, "Input"], Cell[8366, 231, 662, 17, 223, "Output"] }, Open ]], Cell[9043, 251, 162, 4, 50, "Text"], Cell[9208, 257, 144, 4, 50, "Text"], Cell[CellGroupData[{ Cell[9377, 265, 608, 9, 237, "Input"], Cell[9988, 276, 47, 1, 54, "Output"], Cell[10038, 279, 47, 1, 54, "Output"], Cell[10088, 282, 47, 1, 54, "Output"], Cell[10138, 285, 47, 1, 54, "Output"], Cell[10188, 288, 47, 1, 54, "Output"], Cell[10238, 291, 47, 1, 54, "Output"], Cell[10288, 294, 47, 1, 54, "Output"] }, Open ]], Cell[10350, 298, 257, 6, 70, "Text"], Cell[CellGroupData[{ Cell[10632, 308, 677, 13, 237, "Input"], Cell[11312, 323, 49, 1, 69, "Output"], Cell[11364, 326, 51, 1, 69, "Output"], Cell[11418, 329, 51, 1, 69, "Output"], Cell[11472, 332, 51, 1, 69, "Output"], Cell[11526, 335, 47, 1, 54, "Output"], Cell[11576, 338, 47, 1, 54, "Output"], Cell[11626, 341, 49, 1, 69, "Output"] }, Open ]], Cell[11690, 345, 391, 9, 134, "Text"], Cell[CellGroupData[{ Cell[12106, 358, 174, 3, 107, "Input"], Cell[12283, 363, 41, 1, 69, "Output"], Cell[12327, 366, 51, 1, 69, "Output"] }, Open ]], Cell[12393, 370, 213, 7, 51, "Text"], Cell[CellGroupData[{ Cell[12631, 381, 172, 3, 107, "Input"], Cell[12806, 386, 38, 1, 69, "Output"], Cell[12847, 389, 51, 1, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[12935, 395, 175, 3, 133, "Input"], Cell[13113, 400, 41, 1, 69, "Output"], Cell[13157, 403, 51, 1, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[13245, 409, 172, 3, 107, "Input"], Cell[13420, 414, 41, 1, 69, "Output"], Cell[13464, 417, 52, 1, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[13553, 423, 176, 3, 133, "Input"], Cell[13732, 428, 38, 1, 69, "Output"], Cell[13773, 431, 51, 1, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[13861, 437, 175, 3, 133, "Input"], Cell[14039, 442, 38, 1, 69, "Output"], Cell[14080, 445, 51, 1, 69, "Output"] }, Open ]], Cell[14146, 449, 242, 5, 70, "Text"], Cell[14391, 456, 351, 9, 90, "Text"], Cell[CellGroupData[{ Cell[14767, 469, 108, 2, 81, "Input"], Cell[14878, 473, 662, 17, 223, "Output"] }, Open ]], Cell[15555, 493, 490, 11, 112, "Text"], Cell[CellGroupData[{ Cell[16070, 508, 673, 10, 263, "Input"], Cell[16746, 520, 47, 1, 54, "Output"], Cell[16796, 523, 47, 1, 54, "Output"], Cell[16846, 526, 52, 1, 69, "Output"], Cell[16901, 529, 51, 1, 69, "Output"], Cell[16955, 532, 47, 1, 54, "Output"], Cell[17005, 535, 47, 1, 54, "Output"], Cell[17055, 538, 47, 1, 54, "Output"] }, Open ]], Cell[17117, 542, 138, 4, 50, "Text"], Cell[CellGroupData[{ Cell[17280, 550, 818, 13, 315, "Input"], Cell[18101, 565, 47, 1, 54, "Output"], Cell[18151, 568, 47, 1, 54, "Output"], Cell[18201, 571, 47, 1, 54, "Output"], Cell[18251, 574, 47, 1, 54, "Output"], Cell[18301, 577, 47, 1, 54, "Output"], Cell[18351, 580, 47, 1, 54, "Output"], Cell[18401, 583, 47, 1, 54, "Output"] }, Open ]], Cell[18463, 587, 124, 4, 30, "Text"], Cell[CellGroupData[{ Cell[18612, 595, 110, 2, 81, "Input"], Cell[18725, 599, 646, 17, 219, "Output"] }, Open ]], Cell[19386, 619, 238, 5, 89, "Text"], Cell[CellGroupData[{ Cell[19649, 628, 667, 10, 263, "Input"], Cell[20319, 640, 47, 1, 54, "Output"], Cell[20369, 643, 47, 1, 54, "Output"], Cell[20419, 646, 47, 1, 54, "Output"], Cell[20469, 649, 47, 1, 54, "Output"], Cell[20519, 652, 47, 1, 54, "Output"], Cell[20569, 655, 47, 1, 54, "Output"], Cell[20619, 658, 47, 1, 54, "Output"] }, Open ]], Cell[20681, 662, 473, 9, 110, "Text"], Cell[CellGroupData[{ Cell[21179, 675, 616, 9, 237, "Input"], Cell[21798, 686, 56, 1, 69, "Output"], Cell[21857, 689, 55, 1, 69, "Output"], Cell[21915, 692, 55, 1, 69, "Output"], Cell[21973, 695, 54, 1, 69, "Output"], Cell[22030, 698, 54, 1, 69, "Output"], Cell[22087, 701, 56, 1, 69, "Output"], Cell[22146, 704, 55, 1, 69, "Output"] }, Open ]], Cell[22216, 708, 526, 15, 91, "Text"], Cell[CellGroupData[{ Cell[22767, 727, 115, 2, 107, "Input"], Cell[22885, 731, 51, 1, 69, "Output"] }, Open ]], Cell[22951, 735, 122, 4, 30, "Text"], Cell[CellGroupData[{ Cell[23098, 743, 113, 2, 81, "Input"], Cell[23214, 747, 54, 1, 69, "Output"] }, Open ]], Cell[23283, 751, 1207, 21, 283, "Text"], Cell[CellGroupData[{ Cell[24515, 776, 116, 2, 107, "Input"], Cell[24634, 780, 54, 1, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[24725, 786, 113, 2, 81, "Input"], Cell[24841, 790, 56, 1, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[24934, 796, 124, 3, 107, "Input"], Cell[25061, 801, 55, 1, 69, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[25153, 807, 116, 2, 107, "Input"], Cell[25272, 811, 56, 1, 69, "Output"] }, Open ]], Cell[25343, 815, 273, 6, 70, "Text"], Cell[CellGroupData[{ Cell[25641, 825, 114, 2, 107, "Input"], Cell[25758, 829, 56, 1, 69, "Output"] }, Open ]], Cell[25829, 833, 391, 7, 90, "Text"], Cell[CellGroupData[{ Cell[26245, 844, 131, 2, 81, "Input"], Cell[26379, 848, 2374, 41, 223, "Output"] }, Open ]], Cell[28768, 892, 177, 5, 69, "Text"], Cell[28948, 899, 83, 1, 55, "Input"], Cell[29034, 902, 177, 5, 30, "Text"] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)