From: <rv...@us...> - 2009-12-15 18:14:34
|
Revision: 376 http://treebase.svn.sourceforge.net/treebase/?rev=376&view=rev Author: rvos Date: 2009-12-15 18:14:26 +0000 (Tue, 15 Dec 2009) Log Message: ----------- Added Paths: ----------- trunk/treebase-core/lib/examples/Coalescence/ trunk/treebase-core/lib/examples/Coalescence/00-introduction.nex trunk/treebase-core/lib/examples/Coalescence/01-coalescence.nex trunk/treebase-core/lib/examples/Coalescence/02-coalescence2.nex trunk/treebase-core/lib/examples/Coalescence/03-coalescenceDepth.nex trunk/treebase-core/lib/examples/Coalescence/04-associations.nex trunk/treebase-core/lib/examples/Coalescence/05-twoPopulations.nex trunk/treebase-core/lib/examples/Coalescence/06-twoPopulations2.nex trunk/treebase-core/lib/examples/Coalescence/08-fluctuating.nex trunk/treebase-core/lib/examples/Coalescence/09-genesInSpecies.nex trunk/treebase-core/lib/examples/Coalescence/10-speciesTreeSearch.nex trunk/treebase-core/lib/examples/Coalescence/11-geneInSpecies2.nex trunk/treebase-core/lib/examples/Coalescence/outOfAfrica/ trunk/treebase-core/lib/examples/Coalescence/outOfAfrica/01-outOfAfrica.nex trunk/treebase-core/lib/examples/Coalescence/outOfAfrica/02-outOfAfrica.nex trunk/treebase-core/lib/examples/Coalescence/outOfAfrica/03-outOfAfrica.nex trunk/treebase-core/lib/examples/Coalescence/outOfAfrica/04-outOfAfrica.nex trunk/treebase-core/lib/examples/Coalescence/tutorial/ trunk/treebase-core/lib/examples/Coalescence/tutorial/01-associationsHow1.nex trunk/treebase-core/lib/examples/Coalescence/tutorial/02-associationsHow2.nex trunk/treebase-core/lib/examples/Coalescence/tutorial/02b-associationsHow2.nex trunk/treebase-core/lib/examples/Coalescence/tutorial/03-associationsHow3.nex trunk/treebase-core/lib/examples/Coalescence/tutorial/04-associationsHow4.nex Added: trunk/treebase-core/lib/examples/Coalescence/00-introduction.nex =================================================================== --- trunk/treebase-core/lib/examples/Coalescence/00-introduction.nex (rev 0) +++ trunk/treebase-core/lib/examples/Coalescence/00-introduction.nex 2009-12-15 18:14:26 UTC (rev 376) @@ -0,0 +1,40 @@ +#NEXUS +[written Mon Sep 03 09:21:05 PDT 2007 by Mesquite version 2.0BETA3 (build i55) at Thrandina.local/127.0.0.1 (Wayne Maddison)] +BEGIN NOTES; + + TEXT FILE TEXT = 'Example files for coalescence calculations^n^nThe files linked to this one illustrate some of the coalescence calculations that can be done by the package of coalescence modules of the Mesquite system. To learn more about this package, use the Coalescence Package menu item of the Help menu, or touch on the banner in the Mesquite Startup window. (It should take you to your web browser, perhaps after asking you to locate the browser.)^n^nTo go from one file to another, hit the "Go" button in the green window.'; + +END; + +Begin MESQUITE; + MESQUITESCRIPTVERSION 2; + TITLE AUTO; + tell ProjectCoordinator; + newAssistant #mesquite.basic.ExamplesNavigator.ExamplesNavigator; + tell It; + setNextFileName '01-coalescence.nex'; + getWindow; + tell It; + setExplanationSize 0; + setAnnotationSize 0; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 415 316; + setLocation 8 22; + setFont SanSerif; + setFontSize 14; + setActive; + setExplanation 'Example files for coalescence calculations^n^nThe files linked to this one illustrate some of the coalescence calculations that can be done by the package of coalescence modules of the Mesquite system. To learn more about this package, go to the population genetics section of the manual using the button below, or use the Coalescence Package menu item of the Help menu, or touch on the banner in the Mesquite Startup window. (It should take you to your web browser, perhaps after asking you to locate the browser.)^n^nTo go from one file to another, hit the "Next" button.'; + setTitle Coalescence_examples; + toggleFileNames off; + setPrevButtonName Previous; + setNextButtonName Next; + addWebLink Manual 'mesquite:docs/mesquite/popGen/popGen.html'; + addFileLink Return_to_main_Introduction '../Introduction.nex'; + endTell; + showWindow; + endTell; + endTell; +end; + + Property changes on: trunk/treebase-core/lib/examples/Coalescence/00-introduction.nex ___________________________________________________________________ Added: svn:executable + * Added: trunk/treebase-core/lib/examples/Coalescence/01-coalescence.nex =================================================================== --- trunk/treebase-core/lib/examples/Coalescence/01-coalescence.nex (rev 0) +++ trunk/treebase-core/lib/examples/Coalescence/01-coalescence.nex 2009-12-15 18:14:26 UTC (rev 376) @@ -0,0 +1,195 @@ +#NEXUS +[written Mon Sep 03 09:21:19 PDT 2007 by Mesquite version 2.0BETA3 (build i55) at Thrandina.local/127.0.0.1 (Wayne Maddison)] + +BEGIN TAXA; + DIMENSIONS NTAX=9; + TAXLABELS + g1 g2 g3 g4 g5 g6 g7 g8 g9 + ; + BLOCKID WM1148c10e06e14; + +END; + + +BEGIN CHARACTERS; + DIMENSIONS NCHAR=19; + FORMAT DATATYPE = DNA GAP = - MISSING = ?; + MATRIX + g1 AACATCTGGGAACCGTGCG + + g2 C?CGTCTGAGACCCGTCCG + + g3 AAGATACGGGTACCGTCCG + + g4 AACATACGGGAAGCGTCCG + + g5 AAGGTACGGGAACCGTCCG + + g6 AAAGTACGGGACCCGTGCG + + g7 AACGTACGGGAACCGTGCG + + g8 AAAGCACGGGAACCGTGCG + + g9 AACGCACGAGAACCGTGCG + + +; + + + BLOCKID WM1148c10e0900; + + +END; + +BEGIN NOTES; + + TEXT FILE TEXT = 'This file shows a tree window with gene trees simulated by coalescence within a population. Scroll through trees to see other simulated gene trees. The organisms simulated are haploids. The effective population size is by default 10000. To change this, choose Set Ne from the Tree menu.^n^nTo go to next example file: click the button in the "Go To File" window.^n^nTo duplicate this file: Select "New" from the File menu, and indicate the name of the set of taxa (genes) and the number of taxa (gene copies). In the list window that will be shown, you may rename the taxa. Then, select the set of taxa from the "Tree Window" submenu of the Taxa&Trees menu to show a tree window. Initially, default trees will be shown. Go to the Tree menu of the tree window, and select "Coalescent trees" from "Simulated Trees" submenu of the the "Tree source" submenu of the "Tree" menu.^n^nTo make it pretty, choose "Curvogram" from the "Tree form" submenu of the Tree menu, then choose "Show Branch Lengths" from the Tree menu. To make it so all trees are displayed on the same scale, choose Fixed Scaling and indicate a number about 2-4 times the effective population size. ^n'; + +END; + +BEGIN CODONS; +CODESET * UNTITLED = universal: 1 - 19; + + +END; + +BEGIN ASSUMPTIONS; + TYPESET * UNTITLED = unord: 1 - 19; +TYPESET Current_Parsimony_Models = unord: 1 - 19; + +END; + +BEGIN MESQUITECHARMODELS; + ProbModelSet * UNTITLED = 'Jukes-Cantor': 1 - 19; +END; + +Begin MESQUITE; + MESQUITESCRIPTVERSION 2; + TITLE AUTO; + tell ProjectCoordinator; + getEmployee #mesquite.minimal.ManageTaxa.ManageTaxa; + tell It; + setID 0 1469954533384391314 WM1148c10e06e14; + endTell; + getEmployee #mesquite.charMatrices.ManageCharacters.ManageCharacters; + tell It; + setID 0 4636206365576148138 WM1148c10e0900; + checksum 0 1947097330 WM1148c10e0900; + endTell; + getEmployee #mesquite.trees.BasicTreeWindowCoord.BasicTreeWindowCoord; + tell It; + makeTreeWindow #1469954533384391314 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker; + tell It; + setTreeSource #mesquite.trees.SimulateTree.SimulateTree; + tell It; + setTreeSimulator #mesquite.coalesce.CoalescentTrees.CoalescentTrees; + tell It; + getEmployee #mesquite.coalesce.NeutralCoalescence.NeutralCoalescence; + tell It; + setEffective 10000; + toggleExponential on; + endTell; + endTell; + setSeed 983242417684; + endTell; + setAssignedID 302.971276427933.7117688824995678366; + getTreeWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 459 407; + setLocation 490 22; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.trees.ArcTree.ArcTree; + tell It; + setNodeLocs #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle on; + toggleScale on; + toggleBroadScale off; + toggleCenter on; + toggleEven on; + setFixedScaling 30000.0; + namesAngle ?; + endTell; + setEdgeWidth 4; + orientUp; + endTell; + setBackground White; + setBranchColor Black; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition on; + toggleShadePartition off; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + setTreeNumber 1; + useSuggestedSize off; + toggleSizeToFit on; + toggleTextOnTree off; + endTell; + showWindow; + getEmployee #mesquite.trees.ColorBranches.ColorBranches; + tell It; + setColor Red; + removeColor off; + endTell; + getEmployee #mesquite.ornamental.BranchNotes.BranchNotes; + tell It; + setAlwaysOn off; + endTell; + getEmployee #mesquite.ornamental.ColorTreeByPartition.ColorTreeByPartition; + tell It; + colorByPartition off; + endTell; + endTell; + endTell; + newAssistant #mesquite.basic.ExamplesNavigator.ExamplesNavigator; + tell It; + setNextFileName '02-coalescence2.nex'; + setPrevFileName '00-introduction.nex'; + getWindow; + tell It; + setExplanationSize 0; + setAnnotationSize 0; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 459 415; + setLocation 10 22; + setFont SanSerif; + setFontSize 10; + setActive; + setExplanation 'This file shows a tree window with gene trees simulated by coalescence within a population. Scroll through trees to see other simulated gene trees. The organisms simulated are haploids. The effective population size is by default 10000. To change this, choose Set Ne from the Coalescent Simulation submenu of the Tree menu.^n^nTo duplicate this file: Select "New" from the File menu, and indicate the name of the set of taxa (genes) and the number of taxa (gene copies). In the list window that will be shown, you may rename the taxa. Then, select the set of taxa from the "Tree Window" submenu of the Taxa&Trees menu to show a tree window. Initially, default trees will be shown. Go to the Tree menu of the tree window, and select "Coalescent trees" from "Simulated Trees" submenu of the the "Tree Source" submenu of the "Tree" menu.^n^nTo make it pretty, choose "Curvogram" from the "Tree Form" submenu of the Drawing menu, then choose "Branches Proportional to Lengths" from the Drawing menu. To make it so all trees are displayed on the same scale, choose Fixed Scaling and indicate a number about 2-4 times the effective population size. ^n'; + setTitle Simulated_gene_trees; + toggleFileNames off; + setPrevButtonName Previous; + setNextButtonName Next; + endTell; + showWindow; + endTell; + endTell; +end; + + Property changes on: trunk/treebase-core/lib/examples/Coalescence/01-coalescence.nex ___________________________________________________________________ Added: svn:executable + * Added: trunk/treebase-core/lib/examples/Coalescence/02-coalescence2.nex =================================================================== --- trunk/treebase-core/lib/examples/Coalescence/02-coalescence2.nex (rev 0) +++ trunk/treebase-core/lib/examples/Coalescence/02-coalescence2.nex 2009-12-15 18:14:26 UTC (rev 376) @@ -0,0 +1,181 @@ +#NEXUS +[written Mon Sep 10 21:53:06 EDT 2007 by Mesquite version 2.0BETA3 (build i57) at Thrandina.local/10.71.1.127 (Wayne Maddison)] + +BEGIN TAXA; + DIMENSIONS NTAX=9; + TAXLABELS + g1 g2 g3 g4 g5 g6 g7 g8 g9 + ; + BLOCKID WM1148c1835ae15; + +END; + + +BEGIN CHARACTERS; + DIMENSIONS NCHAR=19; + FORMAT DATATYPE = DNA GAP = - MISSING = ?; + MATRIX + g1 AACATCTGGGAACCGTGCG + + g2 C?CGTCTGAGACCCGTCCG + + g3 AAGATACGGGTACCGTCCG + + g4 AACATACGGGAAGCGTCCG + + g5 AAGGTACGGGAACCGTCCG + + g6 AAAGTACGGGACCCGTGCG + + g7 AACGTACGGGAACCGTGCG + + g8 AAAGCACGGGAACCGTGCG + + g9 AACGCACGAGAACCGTGCG + + +; + + + BLOCKID WM1148c1835cf0; + + +END; + +BEGIN NOTES; + + TEXT FILE TEXT = 'At left is a "Multi Tree Window" to show a series of gene trees simulated by coalescence within a population. You can scroll down to see other such simulated trees. Note that the root tends to be between 1000 and 2000 generations deep.^n^nThe effective population size is 1000 (haploid), and can be changed using the "Set Ne.." menu item in the Multi-Tree menu of the Trees window.'; + +END; + +BEGIN CODONS; +CODESET * UNTITLED = universal: 1 - 19; + + +END; + +BEGIN ASSUMPTIONS; + TYPESET * UNTITLED = unord: 1 - 19; +TYPESET Current_Parsimony_Models = unord: 1 - 19; + +END; + +BEGIN MESQUITECHARMODELS; + ProbModelSet * UNTITLED = 'Jukes-Cantor': 1 - 19; +END; + +Begin MESQUITE; + MESQUITESCRIPTVERSION 2; + TITLE AUTO; + tell ProjectCoordinator; + getEmployee #mesquite.minimal.ManageTaxa.ManageTaxa; + tell It; + setID 0 4451700786596653131 WM1148c1835ae15; + endTell; + getEmployee #mesquite.charMatrices.ManageCharacters.ManageCharacters; + tell It; + setID 0 4972659033594616137 WM1148c1835cf0; + checksum 0 1947097330 WM1148c1835cf0; + endTell; + newAssistant #mesquite.trees.MultiTreeWindowMaker.MultiTreeWindowMaker; + tell It; + setTaxa #4451700786596653131; + setNumColumns 4; + setNumRows 4; + getTreeSource #mesquite.trees.DefiniteTreeSource.DefiniteTreeSource; + tell It; + setTreeSource #mesquite.trees.SimulateTree.SimulateTree; + tell It; + setTreeSimulator #mesquite.coalesce.CoalescentTrees.CoalescentTrees; + tell It; + getEmployee #mesquite.coalesce.NeutralCoalescence.NeutralCoalescence; + tell It; + setEffective 1000; + toggleExponential on; + endTell; + endTell; + setSeed 1189475568974; + endTell; + assignNumTrees 100; + endTell; + makeWindow; + toggleLegendBotRight off; + setNamesVisible on; + getWindow; + tell It; + popOut; + setExplanationSize 0; + setAnnotationSize 0; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 626 641; + setLocation 456 22; + setFont SanSerif; + setFontSize 10; + setActive; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.trees.ArcTree.ArcTree; + tell It; + setNodeLocs #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle on; + toggleScale on; + toggleBroadScale off; + toggleCenter on; + toggleEven on; + setFixedScaling 2500.0; + namesAngle ?; + endTell; + setEdgeWidth 3; + orientUp; + endTell; + setBackground White; + setBranchColor Black; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition on; + toggleShadePartition off; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + showWindow; + endTell; + newAssistant #mesquite.basic.ExamplesNavigator.ExamplesNavigator; + tell It; + setNextFileName '03-coalescenceDepth.nex'; + setPrevFileName '01-coalescence.nex'; + getWindow; + tell It; + setExplanationSize 0; + setAnnotationSize 0; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 420 268; + setLocation 13 22; + setFont SanSerif; + setFontSize 10; + setExplanation 'At left is a "Multi Tree Window" to show a series of gene trees simulated by coalescence within a population. You can scroll down to see other such simulated trees. Note that the root tends to be between 1000 and 2000 generations deep.^n^nThe effective population size is 1000 (haploid), and can be changed using the "Set Ne.." menu item in the Coalescent SImulation submenu of the Multi-Tree menu of the Trees window.'; + setTitle Gene_trees; + toggleFileNames off; + setPrevButtonName Previous; + setNextButtonName Next; + endTell; + showWindow; + endTell; + endTell; +end; + + Property changes on: trunk/treebase-core/lib/examples/Coalescence/02-coalescence2.nex ___________________________________________________________________ Added: svn:executable + * Added: trunk/treebase-core/lib/examples/Coalescence/03-coalescenceDepth.nex =================================================================== --- trunk/treebase-core/lib/examples/Coalescence/03-coalescenceDepth.nex (rev 0) +++ trunk/treebase-core/lib/examples/Coalescence/03-coalescenceDepth.nex 2009-12-15 18:14:26 UTC (rev 376) @@ -0,0 +1,161 @@ +#NEXUS +[written Tue Aug 21 23:00:45 PDT 2007 by Mesquite version 2.0BETA3 (build i50) at Thrandina.local/10.0.1.2 (Wayne Maddison)] + +BEGIN TAXA; + DIMENSIONS NTAX=9; + TAXLABELS + g1 g2 g3 g4 g5 g6 g7 g8 g9 + ; + BLOCKID WM1148c2865d916; + +END; + + +BEGIN CHARACTERS; + DIMENSIONS NCHAR=19; + FORMAT DATATYPE = DNA GAP = - MISSING = ?; + MATRIX + g1 AACATCTGGGAACCGTGCG + + g2 C?CGTCTGAGACCCGTCCG + + g3 AAGATACGGGTACCGTCCG + + g4 AACATACGGGAAGCGTCCG + + g5 AAGGTACGGGAACCGTCCG + + g6 AAAGTACGGGACCCGTGCG + + g7 AACGTACGGGAACCGTGCG + + g8 AAAGCACGGGAACCGTGCG + + g9 AACGCACGAGAACCGTGCG + + +; + + + BLOCKID WM1148c2865eb0; + + +END; + +BEGIN NOTES; + + TEXT FILE TEXT = 'This file contains a small set of taxa representing gene copies within a population. The chart shows the depth to the last coalescence in a sample of 100 gene trees simulated by coalescence. ^n^nTo change the number of trees sampled, go to the chart window and select "Number of Trees" from the Chart menu. The effective population size (haploid) is 1000; change this by choosing "Set Ne" from the Chart window..^n^nTo duplicate this file: Select "New" from the file menu. Once the file is established, choose "Tree Values" from the Charts menu. Indicate "Tree Depth" as the value, then "Simulate Trees" as the tree source, "Coalescent trees" as the simulator. Then, choose "Fixed Number of Groups" under "Grouping on X" and set number to 50.^n'; + +END; + +BEGIN CODONS; +CODESET * UNTITLED = universal: 1 - 19; + + +END; + +BEGIN ASSUMPTIONS; + TYPESET * UNTITLED = unord: 1 - 19; +TYPESET Current_Parsimony_Models = unord: 1 - 19; + +END; + +BEGIN MESQUITECHARMODELS; + ProbModelSet * UNTITLED = 'Jukes-Cantor': 1 - 19; +END; + +Begin MESQUITE; + MESQUITESCRIPTVERSION 2; + TITLE AUTO; + tell ProjectCoordinator; + getEmployee #mesquite.minimal.ManageTaxa.ManageTaxa; + tell It; + setID 0 2914423799126459326 WM1148c2865d916; + endTell; + getEmployee #mesquite.charMatrices.ManageCharacters.ManageCharacters; + tell It; + setID 0 5851865005210875165 WM1148c2865eb0; + checksum 0 1947097330; + endTell; + newAssistant #mesquite.charts.TreeValuesChart.TreeValuesChart; + tell It; + suspendCalculations; + setTaxa #2914423799126459326; + setTreeSource #mesquite.trees.SimulateTree.SimulateTree; + tell It; + setTreeSimulator #mesquite.coalesce.CoalescentTrees.CoalescentTrees; + tell It; + getEmployee #mesquite.coalesce.NeutralCoalescence.NeutralCoalescence; + tell It; + setEffective 1000; + toggleExponential on; + endTell; + endTell; + setSeed 983242234061; + endTell; + setCalculator #mesquite.coalesce.TreeDepth.TreeDepth; + getCharter #mesquite.charts.ItemValuesChart.ItemValuesChart; + tell It; + getWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 443 426; + setLocation 472 22; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + itemsByValues; + setChartType #mesquite.charts.Histogram.Histogram; + tell It; + showAverageToggle on; + setCumulativeMode 0; + showAsBarChartToggle on; + showRawToggle off; + setNumberIntervals 50; + setIntervalSize 1.0; + setMovingWindowSize 5.0 1.0; + setMode 4; + endTell; + toggleColorItems off; + setNumberItems 100; + endTell; + enableCalculations; + endTell; + setChartVisible; + doCounts; + resumeCalculations; + showWindow; + endTell; + newAssistant #mesquite.basic.ExamplesNavigator.ExamplesNavigator; + tell It; + setNextFileName '04-associations.nex'; + setPrevFileName '02-coalescence2.nex'; + getWindow; + tell It; + setExplanationSize 0; + setAnnotationSize 0; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 443 434; + setLocation 2 23; + setFont SanSerif; + setFontSize 10; + setActive; + setExplanation 'This file contains a small set of taxa representing gene copies within a population. The chart shows the depth to the last coalescence in a sample of 100 gene trees simulated by coalescence. ^n^nTo change the number of trees sampled, go to the chart window and select "Number of Trees" from the Chart menu. The effective population size (haploid) is 1000; change this by choosing "Set Ne" from the Coalescent Simulation submenu of the Chart menu of the Chart window.^n^nTo duplicate this file: Select "New" from the file menu. Once the file is established, choose Analysis>New Bar & Line Chart for>Tree Values. In the dialog box that appears, check Show Secondary Choices, then select Tree Depth as the value, then "Simulate Trees" as the tree source, "Coalescent trees" as the simulator, and set the effective population size to 1000. Once the histogram appears, choose "Fixed Number of Groups" in the "Grouping on X" submenu from the Chart menu, and set number to 50.^n'; + setTitle Gene_tree_depths; + toggleFileNames off; + setPrevButtonName Previous; + setNextButtonName Next; + endTell; + showWindow; + endTell; + endTell; +end; + + Property changes on: trunk/treebase-core/lib/examples/Coalescence/03-coalescenceDepth.nex ___________________________________________________________________ Added: svn:executable + * Added: trunk/treebase-core/lib/examples/Coalescence/04-associations.nex =================================================================== --- trunk/treebase-core/lib/examples/Coalescence/04-associations.nex (rev 0) +++ trunk/treebase-core/lib/examples/Coalescence/04-associations.nex 2009-12-15 18:14:26 UTC (rev 376) @@ -0,0 +1,398 @@ +#NEXUS +[written Tue Aug 21 23:04:42 PDT 2007 by Mesquite version 2.0BETA3 (build i50) at Thrandina.local/10.0.1.2 (Wayne Maddison)] + +BEGIN TAXA; + TITLE Species; + DIMENSIONS NTAX=3; + TAXLABELS + speciesA speciesB speciesC + ; + BLOCKID WM1148c28a29d17; + +END; + + + +BEGIN TAXA; + TITLE Genes; + DIMENSIONS NTAX=5; + TAXLABELS + geneA1 geneA2 geneB geneC1 geneC2 + ; + BLOCKID WM1148c28a2ae18; + +END; + + +BEGIN TaxaAssociation; +TITLE how_genes_fit_into_species; +TAXA Species , Genes; +ASSOCIATES + + speciesA / geneA1 geneA2 , + speciesB / geneB , + speciesC / geneC1 geneC2 + +; + +END; + + +BEGIN TREES; + LINK Taxa = Species; + TRANSLATE + 1 speciesA, + 2 speciesB, + 3 speciesC; + TREE Species_tree = ((1,2),3); + +END; + + +BEGIN TREES; + LINK Taxa = Genes; + TRANSLATE + 1 geneA1, + 2 geneA2, + 3 geneB, + 4 geneC1, + 5 geneC2; + TREE concordant = (((1,2),3),(4,5)); + TREE discordant = ((1,2),((4,3),5)); + TREE unresolved = ((1,2),4,3,5); + +END; + + +BEGIN NOTES; + + TEXT FILE TEXT = 'The ability to handle more than one set of taxa in a file, and to associate the taxa between the sets, allows analysis of gene trees within species trees. This file has a set of taxa of three species, and a second set of taxa for five genes (see tree windows at left). Above is a species tree drawn using the "Contained Associates" tree drawer, showing a gene tree within the species tree. Scroll through trees in the gene tree window at left to see that there are three stored trees, one concordant with the species tree, one discordant, and one poorly resolved.^n^nTo see each of these trees within the species trees, scroll through them in the "Contained Tree" legend. The gene tree is reconstructed within the species tree so as to minimized the depth of coalescences. The "Cost" indicated in the legend is the number of failures to coalesce within a species lineage (the number of "extra" gene lineages of W. Maddison 1997, Syst. Biol. 46:523). The red lines shown for the unresolved gene tree are lineages that were resolved out of a polytomy (assuming the gene tree polytomy represents lack of resolution).^n^nTo see how to duplicate this file, check out the tutorial files by clicking on the Blue "Go To File" window. '; + +END; + +Begin MESQUITE; + MESQUITESCRIPTVERSION 2; + TITLE AUTO; + tell ProjectCoordinator; + getEmployee #mesquite.minimal.ManageTaxa.ManageTaxa; + tell It; + setID 0 6147812854687186808 WM1148c28a29d17; + setID 1 6651160229924971687 WM1148c28a2ae18; + endTell; + getEmployee #mesquite.trees.BasicTreeWindowCoord.BasicTreeWindowCoord; + tell It; + makeTreeWindow #6147812854687186808 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker; + tell It; + setTreeSource #mesquite.trees.StoredTrees.StoredTrees; + tell It; + setTaxa #6147812854687186808; + setTreeBlock 1; + toggleUseWeights off; + endTell; + setAssignedID 558.964495543348.6195579460590305404; + getTreeWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 556 317; + setLocation 612 502; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.trees.DiagonalDrawTree.DiagonalDrawTree; + tell It; + setNodeLocs #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle off; + toggleScale on; + toggleBroadScale off; + toggleCenter off; + toggleEven off; + namesAngle ?; + endTell; + setEdgeWidth 12; + orientUp; + endTell; + setBackground White; + setBranchColor Black; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition on; + toggleShadePartition off; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + setTreeNumber 1; + useSuggestedSize off; + toggleSizeToFit on; + toggleTextOnTree off; + newAssistant #mesquite.trees.TreeNotesMaker.TreeNotesMaker; + tell It; + getNote; + tell It; + setBounds 4 32 100 22; + setFont SanSerif; + setFontSize 14; + setOffsetX 4; + setOffsetY 32; + setNote Species_Tree; + setOffsetX 4; + setOffsetY 32; + endTell; + endTell; + endTell; + showWindow; + getEmployee #mesquite.trees.ColorBranches.ColorBranches; + tell It; + setColor Red; + removeColor off; + endTell; + getEmployee #mesquite.ornamental.BranchNotes.BranchNotes; + tell It; + setAlwaysOn off; + endTell; + getEmployee #mesquite.ornamental.ColorTreeByPartition.ColorTreeByPartition; + tell It; + colorByPartition off; + endTell; + endTell; + makeTreeWindow #6651160229924971687 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker; + tell It; + setTreeSource #mesquite.trees.StoredTrees.StoredTrees; + tell It; + setTaxa #6651160229924971687; + setTreeBlock 1; + toggleUseWeights off; + endTell; + setAssignedID 577.964495543796.3141002713096155948; + getTreeWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 556 317; + setLocation 5 445; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.trees.DiagonalDrawTree.DiagonalDrawTree; + tell It; + setNodeLocs #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle off; + toggleScale on; + toggleBroadScale off; + toggleCenter off; + toggleEven off; + namesAngle ?; + endTell; + setEdgeWidth 12; + orientUp; + endTell; + setBackground White; + setBranchColor Black; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition on; + toggleShadePartition off; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + setTreeNumber 1; + useSuggestedSize off; + toggleSizeToFit on; + toggleTextOnTree off; + newAssistant #mesquite.trees.TreeNotesMaker.TreeNotesMaker; + tell It; + getNote; + tell It; + setBounds 4 34 100 22; + setFont SanSerif; + setFontSize 14; + setOffsetX 4; + setOffsetY 34; + setNote Gene_Tree; + setOffsetX 4; + setOffsetY 34; + endTell; + endTell; + endTell; + showWindow; + getEmployee #mesquite.trees.ColorBranches.ColorBranches; + tell It; + setColor Red; + removeColor off; + endTell; + getEmployee #mesquite.ornamental.BranchNotes.BranchNotes; + tell It; + setAlwaysOn off; + endTell; + getEmployee #mesquite.ornamental.ColorTreeByPartition.ColorTreeByPartition; + tell It; + colorByPartition off; + endTell; + endTell; + makeTreeWindow #6147812854687186808 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker; + tell It; + setTreeSource #mesquite.trees.StoredTrees.StoredTrees; + tell It; + setTaxa #6147812854687186808; + setTreeBlock 1; + toggleUseWeights off; + endTell; + setAssignedID 596.964495544767.2058576892485762804; + getTreeWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 608 391; + setLocation 590 22; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.assoc.ContainedAssociates.ContainedAssociates; + tell It; + suppress ; + getAssociationSource #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + getReconstructor #mesquite.coalesce.RecCoalescenceHistory.RecCoalescenceHistory; + tell It; + toggleUnrooted off; + toggleResolve on; + toggleUseLengths on; + endTell; + setEdgeWidth 64; + setTreeSource #mesquite.trees.StoredTrees.StoredTrees; + tell It; + setTaxa #6651160229924971687; + setTreeBlock 1; + toggleUseWeights off; + endTell; + setContained 1; + toggleScale on; + setInitialOffsetX -406; + setInitialOffsetY -160; + desuppress ; + getEmployee #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle off; + toggleScale on; + toggleBroadScale off; + toggleCenter on; + toggleEven on; + namesAngle ?; + endTell; + endTell; + setBackground White; + setBranchColor Blue; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition on; + toggleShadePartition off; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + setTreeNumber 1; + useSuggestedSize off; + toggleSizeToFit on; + toggleTextOnTree off; + endTell; + showWindow; + getEmployee #mesquite.trees.ColorBranches.ColorBranches; + tell It; + setColor Red; + removeColor off; + endTell; + getEmployee #mesquite.ornamental.BranchNotes.BranchNotes; + tell It; + setAlwaysOn off; + endTell; + getEmployee #mesquite.ornamental.ColorTreeByPartition.ColorTreeByPartition; + tell It; + colorByPartition off; + endTell; + endTell; + endTell; + newAssistant #mesquite.basic.ExamplesNavigator.ExamplesNavigator; + tell It; + setNextFileName '05-twoPopulations.nex'; + setPrevFileName '03-coalescenceDepth.nex'; + getWindow; + tell It; + setExplanationSize 0; + setAnnotationSize 0; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 556 325; + setLocation 8 22; + setFont SanSerif; + setFontSize 10; + setActive; + setExplanation 'The ability to handle more than one set of taxa in a file, and to associate the taxa between the sets, allows analysis of gene trees within species trees. This file has a set of taxa of three species, and a second set of taxa for five genes (see tree windows at left). At right is a species tree drawn using the "Contained Associates" tree drawer, showing a gene tree within the species tree. Scroll through trees in the gene tree window below to see that there are three stored trees, one concordant with the species tree, one discordant, and one poorly resolved.^n^nTo see each of these trees within the species trees, scroll through them in the "Contained Tree" legend. The gene tree is reconstructed within the species tree so as to minimize the depth of coalescences. The "Cost" indicated in the legend is the number of failures to coalesce within a species lineage (the number of "extra" gene lineages of W. Maddison 1997, Syst. Biol. 46:523). The red lines shown for the unresolved gene tree are lineages that were resolved out of a polytomy (assuming the gene tree polytomy represents lack of resolution).^n^nTo see how to duplicate this file, check out the tutorial files by clicking on the "Go" button, below. '; + setTitle Associations_between_taxa; + toggleFileNames off; + setPrevButtonName Previous; + setNextButtonName Next; + addFileLink 'Tutorial: How to duplicate this file' 'tutorial/01-associationsHow1.nex'; + endTell; + showWindow; + endTell; + endTell; +end; + + Property changes on: trunk/treebase-core/lib/examples/Coalescence/04-associations.nex ___________________________________________________________________ Added: svn:executable + * Added: trunk/treebase-core/lib/examples/Coalescence/05-twoPopulations.nex =================================================================== --- trunk/treebase-core/lib/examples/Coalescence/05-twoPopulations.nex (rev 0) +++ trunk/treebase-core/lib/examples/Coalescence/05-twoPopulations.nex 2009-12-15 18:14:26 UTC (rev 376) @@ -0,0 +1,353 @@ +#NEXUS +[written Tue Aug 21 23:05:35 PDT 2007 by Mesquite version 2.0BETA3 (build i50) at Thrandina.local/10.0.1.2 (Wayne Maddison)] + +BEGIN TAXA; + TITLE Populations; + DIMENSIONS NTAX=2; + TAXLABELS + East West + ; + BLOCKID WM1148c2c4a0319; + +END; + + + +BEGIN TAXA; + TITLE genes_sampled; + DIMENSIONS NTAX=9; + TAXLABELS + East1 East2 East3 East4 West1 West2 West3 West4 West5 + ; + BLOCKID WM1148c2c4a1820; + +END; + + +BEGIN LABELS; +TAXAGROUPLABEL Eastern_samples COLOR = (RGB 0.20392157 1.0 0.42745098) ; +TAXAGROUPLABEL Western_Samples COLOR = (RGB 1.0 0.81568627 0.20392157) ; + + +END; + +BEGIN SETS; +TAXPARTITION * UNTITLED (TAXA = genes_sampled) = Eastern_samples : 1 - 4, Western_Samples : 5 - 9; + +END; + +BEGIN TREES; + LINK Taxa = Populations; + TRANSLATE + 1 East, + 2 West; + TREE tree = (1:10.0,2:10.0):100.0; + TREE tree = (1:50.0,2:50.0):100.0; + TREE tree = (1:100.0,2:100.0):100.0; + TREE tree = (1:200.0,2:200.0):100.0; + +END; + + +BEGIN TaxaAssociation; +TITLE location; +TAXA Populations , genes_sampled; +ASSOCIATES + + East / East1 East2 East3 East4 , + West / West1 West2 West3 West4 West5 + +; + +END; + + +BEGIN NOTES; + + TEXT FILE TEXT = 'Coalescence simulations can be blended with associations between containing and contained trees by simulating gene trees within a species tree. In this file, the species tree is actually a population tree, and there are only two populations.^n^nThere are two sets of taxa, one representing populations (East and West) and the other representing genes sampled from those populations. At left is a population tree within which is simulated a gene tree by coalescence. The time since the populations split was 50 generations; the effective population size is 100 (you can change time divergence as described below; change Ne using the menu item in the Contained menu of the tree window). Scroll through simulated gene trees by hitting the arrows under "Contained Tree" in the legend.^n^nThe degree to which the gene tree is expected to show a clean separation of genes sampled in the West from those sampled in the East depends on the time since separation of the populations. To increase the time since separation of the populations, change the branch lengths of the species tree. Do this in one of two ways: (1) use the ruler tool (to change both branches at once, select both branches using the branch select tool, holding down the shift key as you are selecting the second branch to accumulate the selection. Then, once both branches are selected, apply the ruler tool to one of them), or (2) select "Set all branch lengths" from the "Branch lengths" submenu of the Tree menu of the tree window.^n^nNote that the longer are the branch lengths, the more completely the genes in each population have coalesced before they reach the ancestral populations. You can see this clearly in the tree window showing a gene tree by itself. Because there is a TaxaPartition stored in the data file that indicates the West samples are to be colored tan and the East samples to be colored green, their names in the gene tree window are colored accordingly. This gene tree is simulated, and as you change the lengths of the branches of the population tree, you may see a change in the degree of mixing of the East and West samples in the gene tree.^n^nTo go to the next example, hit the button in the "Go To File" window at left.^n^nTo duplicate this file, create a file with two sets of taxa and an association block indicating how they are linked. Ask to show a tree window for the populations. Select "Contained Associates" for the tree form, selecting Simulate Tree and Contained Coalescence for the tree source. Ask to show branch lengths.'; + +END; + +Begin MESQUITE; + MESQUITESCRIPTVERSION 2; + TITLE AUTO; + tell ProjectCoordinator; + getEmployee #mesquite.minimal.ManageTaxa.ManageTaxa; + tell It; + setID 0 2717996828273828747 WM1148c2c4a0319; + setID 1 2319072353600653909 WM1148c2c4a1820; + endTell; + getEmployee #mesquite.trees.BasicTreeWindowCoord.BasicTreeWindowCoord; + tell It; + makeTreeWindow #2717996828273828747 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker; + tell It; + setTreeSource #mesquite.trees.StoredTrees.StoredTrees; + tell It; + setTaxa #2717996828273828747; + setTreeBlock 1; + toggleUseWeights off; + endTell; + setAssignedID 1442.971300502392.3825508766828255405; + getTreeWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 536 458; + setLocation 572 32; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.assoc.ContainedAssociates.ContainedAssociates; + tell It; + suppress ; + getAssociationSource #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + getReconstructor #mesquite.coalesce.RecCoalescenceHistory.RecCoalescenceHistory; + tell It; + toggleUnrooted off; + toggleResolve on; + toggleUseLengths on; + endTell; + setEdgeWidth 64; + setTreeSource #mesquite.trees.SimulateTree.SimulateTree; + tell It; + setTreeSimulator #mesquite.coalesce.ContainedCoalescence.ContainedCoalescence; + tell It; + getAssociationTask #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + getTreeSource #mesquite.trees.TreeOfContext.TreeOfContext; + tell It; + setContextID 1442.971300502392.3825508766828255405; + endTell; + setSimulator #mesquite.coalesce.ContainedCoalescSim.ContainedCoalescSim; + tell It; + getEmployee #mesquite.coalesce.NeutralCoalescence.NeutralCoalescence; + tell It; + setEffective 100; + toggleExponential on; + endTell; + endTell; + forgetAssociation ; + endTell; + setSeed 984411246198; + endTell; + setContained 1; + toggleScale on; + setInitialOffsetX -424; + setInitialOffsetY -177; + desuppress ; + getEmployee #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle on; + toggleScale on; + toggleBroadScale off; + toggleCenter on; + toggleEven on; + namesAngle ?; + endTell; + endTell; + setBackground White; + setBranchColor Blue; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition on; + toggleShadePartition on; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + setTreeNumber 1; + setTree '(1:50.0,2:50.0):100.0;'; + useSuggestedSize off; + toggleSizeToFit on; + toggleTextOnTree off; + newAssistant #mesquite.trees.TreeNotesMaker.TreeNotesMaker; + tell It; + getNote; + tell It; + setBounds 328 221 123 86; + setFont Serif; + setFontSize 18; + setOffsetX 328; + setOffsetY 221; + setNote Population_tree_with_contained_gene_tree; + setOffsetX 328; + setOffsetY 221; + endTell; + endTell; + endTell; + showWindow; + getEmployee #mesquite.trees.ColorBranches.ColorBranches; + tell It; + setColor Red; + removeColor off; + endTell; + getEmployee #mesquite.ornamental.BranchNotes.BranchNotes; + tell It; + setAlwaysOn off; + endTell; + getEmployee #mesquite.ornamental.ColorTreeByPartition.ColorTreeByPartition; + tell It; + colorByPartition off; + endTell; + endTell; + makeTreeWindow #2319072353600653909 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker; + tell It; + setTreeSource #mesquite.trees.SimulateTree.SimulateTree; + tell It; + setTreeSimulator #mesquite.coalesce.ContainedCoalescence.ContainedCoalescence; + tell It; + getAssociationTask #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + getTreeSource #mesquite.trees.TreeOfContext.TreeOfContext; + tell It; + setContextID 1442.971300502392.3825508766828255405; + endTell; + setSimulator #mesquite.coalesce.ContainedCoalescSim.ContainedCoalescSim; + tell It; + getEmployee #mesquite.coalesce.NeutralCoalescence.NeutralCoalescence; + tell It; + setEffective 100; + toggleExponential on; + endTell; + endTell; + forgetAssociation ; + endTell; + setSeed 984411246666; + endTell; + setAssignedID 1471.971300503030.3721084600339604932; + getTreeWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 518 301; + setLocation 587 584; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.trees.ArcTree.ArcTree; + tell It; + setNodeLocs #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle off; + toggleScale on; + toggleBroadScale off; + toggleCenter on; + toggleEven on; + namesAngle ?; + endTell; + setEdgeWidth 4; + orientUp; + endTell; + setBackground White; + setBranchColor Black; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition off; + toggleShadePartition on; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + setTreeNumber 1; + useSuggestedSize off; + toggleSizeToFit on; + toggleTextOnTree off; + newAssistant #mesquite.trees.TreeNotesMaker.TreeNotesMaker; + tell It; + getNote; + tell It; + setBounds 23 4 100 24; + setFont Serif; + setFontSize 18; + setOffsetX 23; + setOffsetY 4; + setNote Gene_tree; + setOffsetX 23; + setOffsetY 4; + endTell; + endTell; + endTell; + showWindow; + getEmployee #mesquite.trees.ColorBranches.ColorBranches; + tell It; + setColor Red; + removeColor off; + endTell; + getEmployee #mesquite.ornamental.BranchNotes.BranchNotes; + tell It; + setAlwaysOn off; + endTell; + getEmployee #mesquite.ornamental.ColorTreeByPartition.ColorTreeByPartition; + tell It; + colorByPartition off; + endTell; + endTell; + endTell; + newAssistant #mesquite.basic.ExamplesNavigator.ExamplesNavigator; + tell It; + setNextFileName '06-twoPopulations2.nex'; + setPrevFileName '04-associations.nex'; + getWindow; + tell It; + setExplanationSize 0; + setAnnotationSize 0; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 531 631; + setLocation 5 22; + setFont SanSerif; + setFontSize 10; + setActive; + setExplanation 'Coalescence simulations can be blended with associations between containing and contained trees by simulating gene trees within a species tree. In this file, the species tree is actually a population tree, and there are only two populations.^n^nThere are two sets of taxa, one representing populations (East and West) and the other representing genes sampled from those populations. At right, above, is a population tree within which is simulated a gene tree by coalescence. The time since the populations split was 50 generations; the effective population size is 100 (you can change time divergence as described below; change Ne using the menu item in the Coalescent Simulation submenu of the Contained menu of the tree window). Scroll through simulated gene trees by hitting the arrows under "Contained Tree" in the legend.^n^nThe degree to which the gene tree is expected to show a clean separation of genes sampled in the West from those sampled in the East depends on the time since separation of the populations. To increase the time since separation of the populations, change the branch lengths of the species tree. Do this in one of two ways: (1) use the ruler tool (to change both branches at once, select both branches using the branch select tool, holding down the shift key as you are selecting the second branch to accumulate the selection. Then, once both branches are selected, apply the ruler tool to one of them), or (2) select "Set all branch lengths" from the "Branch lengths" submenu of the Tree menu of the tree window.^n^nNote that the longer are the branch lengths, the more completely the genes in each population have coalesced before they reach the ancestral populations. You can see this clearly in the tree window, below, showing a gene tree by itself. Because the taxa are partitioned into two groups, and set so that the West samples are to be colored tan and the East samples to be colored green, their names in the gene tree window are colored accordingly. This gene tree is simulated, and as you change the lengths of the branches of the population tree, you may see a change in the degree of mixing of the East and West samples in the gene tree.^n^nTo duplicate this file, create a file with two sets of taxa and an association block indicating how they are linked. Ask to show a tree window for the populations. Select "Contained Associates" for the tree form, selecting Simulate Tree and Contained Coalescence within Current Tree for the tree source. Ask to show branch lengths.'; + setTitle Diverging_populations; + toggleFileNames off; + setPrevButtonName Previous; + setNextButtonName Next; + endTell; + showWindow; + endTell; + endTell; +end; + + Property changes on: trunk/treebase-core/lib/examples/Coalescence/05-twoPopulations.nex ___________________________________________________________________ Added: svn:executable + * Added: trunk/treebase-core/lib/examples/Coalescence/06-twoPopulations2.nex =================================================================== --- trunk/treebase-core/lib/examples/Coalescence/06-twoPopulations2.nex (rev 0) +++ trunk/treebase-core/lib/examples/Coalescence/06-twoPopulations2.nex 2009-12-15 18:14:26 UTC (rev 376) @@ -0,0 +1,300 @@ +#NEXUS +[written Wed Aug 22 09:07:26 PDT 2007 by Mesquite version 2.0BETA3 (build i50) at Thrandina.local/10.0.1.2 (Wayne Maddison)] + +BEGIN TAXA; + TITLE Populations; + DIMENSIONS NTAX=2; + TAXLABELS + East West + ; + BLOCKID WM1148e5376f035; + +END; + + + +BEGIN TAXA; + TITLE genes_sampled; + DIMENSIONS NTAX=9; + TAXLABELS + East1 East2 East3 East4 West1 West2 West3 West4 West5 + ; + BLOCKID WM1148e5376fa36; + +END; + + +BEGIN LABELS; +TAXAGROUPLABEL Eastern_samples COLOR = (RGB 0.20392157 1.0 0.42745098) ; +TAXAGROUPLABEL Western_Samples COLOR = (RGB 1.0 0.81568627 0.20392157) ; + + +END; + +BEGIN SETS; +TAXPARTITION * UNTITLED (TAXA = genes_sampled) = Eastern_samples : 1 - 4, Western_Samples : 5 - 9; + +END; + +BEGIN TREES; + LINK Taxa = Populations; + TRANSLATE + 1 East, + 2 West; + TREE tree = (1:10.0,2:10.0):100.0; + TREE tree = (1:50.0,2:50.0):100.0; + TREE tree = (1:100.0,2:100.0):100.0; + TREE tree = (1:200.0,2:200.0):100.0; + +END; + + +BEGIN TaxaAssociation; +TITLE location; +TAXA Populations , genes_sampled; +ASSOCIATES + + East / East1 East2 East3 East4 , + West / West1 West2 West3 West4 West5 + +; + +END; + + +BEGIN NOTES; + + TEXT FILE TEXT = 'The degree to which the gene tree is expected to show a clean separation of genes sampled in the West from those sampled in the East depends on the time since separation of the populations. Slatkin and Maddison (1989) suggested using as a statistic the number of parsimony steps in a character for the genes whose states represent the source population of the genes (i.e., location sampled). The time since separation can be estimated by measuring "s" on a reconstructed gene tree, and comparing it to the expected s values for gene trees that have undergone neutral coalescence in populations with varying times since separation. (This assumes there has not been ongoing gene flow and that the two populations have maintained similar population sizes.). ^n^nAt left is a chart of the s value for a sample of 100 gene trees simulated within the population tree by coalescence. An "s" value of 1 would mean that at least one of the population''s sampled genes were monophyletic on the gene tree. When the populations have been split for 0.5 generations times the effective population size (Ne = 100), as shown initially here, the most common s is 2.^n^nBy changing the branch lengths in the population tree, you can affect the value of s in the chart. To change the branch lengths, go to the the "Set all branch lengths" item in the Branch Lengths submenu of the Tree menu of the tree window.^n^nTo duplicate the chart at left, select Value for Trees from the Charts window, indicate s of Slatkin and Maddison as the value to be calculated, the tree source to be Simulate Tree, and the simulator to be Contained Coalescence.'; + +END; + +Begin MESQUITE; + MESQUITESCRIPTVERSION 2; + TITLE AUTO; + tell ProjectCoordinator; + getEmployee #mesquite.minimal.ManageTaxa.ManageTaxa; + tell It; + setID 0 7114850956850836156 WM1148e5376f035; + setID 1 4791169349505029750 WM1148e5376fa36; + endTell; + getEmployee #mesquite.trees.BasicTreeWindowCoord.BasicTreeWindowCoord; + tell It; + makeTreeWindow #7114850956850836156 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker; + tell It; + setTreeSource #mesquite.trees.StoredTrees.StoredTrees; + tell It; + setTaxa #7114850956850836156; + setTreeBlock 1; + toggleUseWeights off; + endTell; + setAssignedID 1533.971300618301.6347497454875668222; + getTreeWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 467 413; + setLocation 565 29; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator; + tell It; + suppress; + setTreeDrawer #mesquite.assoc.ContainedAssociates.ContainedAssociates; + tell It; + suppress ; + getAssociationSource #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + getReconstructor #mesquite.coalesce.RecCoalescenceHistory.RecCoalescenceHistory; + tell It; + toggleUnrooted off; + toggleResolve on; + toggleUseLengths on; + endTell; + setEdgeWidth 64; + setTreeSource #mesquite.trees.SimulateTree.SimulateTree; + tell It; + setTreeSimulator #mesquite.coalesce.ContainedCoalescence.ContainedCoalescence; + tell It; + getAssociationTask #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + getTreeSource #mesquite.trees.TreeOfContext.TreeOfContext; + tell It; + setContextID 1533.971300618301.6347497454875668222; + endTell; + setSimulator #mesquite.coalesce.ContainedCoalescSim.ContainedCoalescSim; + tell It; + getEmployee #mesquite.coalesce.NeutralCoalescence.NeutralCoalescence; + tell It; + setEffective 100; + toggleExponential on; + endTell; + endTell; + forgetAssociation ; + endTell; + setSeed 984411288026; + endTell; + setContained 1; + toggleScale on; + setInitialOffsetX -142; + setInitialOffsetY -160; + desuppress ; + getEmployee #mesquite.trees.NodeLocsStandard.NodeLocsStandard; + tell It; + stretchToggle off; + branchLengthsToggle on; + toggleScale on; + toggleBroadScale off; + toggleCenter on; + toggleEven on; + namesAngle ?; + endTell; + endTell; + setBackground White; + setBranchColor Blue; + showNodeNumbers off; + showBranchColors on; + labelBranchLengths off; + desuppress; + getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames; + tell It; + setFont SanSerif; + setFontSize 10; + setColor Black; + toggleColorPartition on; + toggleShadePartition off; + toggleNodeLabels on; + toggleCenterNodeNames off; + toggleShowNames on; + endTell; + endTell; + setTreeNumber 2; + useSuggestedSize off; + toggleSizeToFit on; + toggleTextOnTree off; + endTell; + showWindow; + getEmployee #mesquite.trees.ColorBranches.ColorBranches; + tell It; + setColor Red; + removeColor off; + endTell; + getEmployee #mesquite.ornamental.BranchNotes.BranchNotes; + tell It; + setAlwaysOn off; + endTell; + getEmployee #mesquite.ornamental.ColorTreeByPartition.ColorTreeByPartition; + tell It; + colorByPartition off; + endTell; + endTell; + endTell; + newAssistant #mesquite.charts.TreeValuesChart.TreeValuesChart; + tell It; + suspendCalculations; + setTaxa #4791169349505029750; + setTreeSource #mesquite.trees.SimulateTree.SimulateTree; + tell It; + setTreeSimulator #mesquite.coalesce.ContainedCoalescence.ContainedCoalescence; + tell It; + getAssociationTask #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + getTreeSource #mesquite.trees.TreeOfContext.TreeOfContext; + tell It; + setContextID 1533.971300618301.6347497454875668222; + endTell; + setSimulator #mesquite.coalesce.ContainedCoalescSim.ContainedCoalescSim; + tell It; + getEmployee #mesquite.coalesce.NeutralCoalescence.NeutralCoalescence; + tell It; + setEffective 100; + toggleExponential on; + endTell; + endTell; + forgetAssociation ; + endTell; + setSeed 984411288443; + endTell; + setCalculator #mesquite.coalesce.SlatkinMaddisonS.SlatkinMaddisonS; + tell It; + getEmployee #mesquite.assoc.StoredAssociations.StoredAssociations; + tell It; + setCurrentAssociation 0; + endTell; + endTell; + getCharter #mesquite.charts.ItemValuesChart.ItemValuesChart; + tell It; + getWindow; + tell It; + popOut; + setExplanationSize 20; + setAnnotationSize 20; + setFontIncAnnot 0; + setFontIncExp 0; + setSize 513 323; + setLocation 10 515; + setFont SanSerif; + setFontSize 10; + getToolPalette; + tell It; + endTell; + setActive; + itemsByValues; + setChartType #mesquite.charts.Histogram.Histogram; + tell It; + showAverageToggle on; + setCumulativeMode 0; + showAsBarChartToggle on; + showRawToggle off; + setNumberIntervals 20; + setIntervalSize 1.0; + setMovingWindowSize 5.0 1.0; + setMode 0; + endTell; + toggleColorItems off; + setNumberItems 100; + endTell; + enableCalculations; + endTell; + setChartVisible; + doCounts; + resumeCalculations; + showWindow; + endTell; + newAssistan... [truncated message content] |