-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path06-BiSSEtrees.nex
415 lines (397 loc) · 15 KB
/
06-BiSSEtrees.nex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
#NEXUS
[written Wed Aug 26 12:52:00 PDT 2009 by Mesquite version 2.6+ (build 508) at thrandina.zoology.ubc.ca/137.82.80.142 (Wayne Maddison)]
BEGIN TAXA;
TITLE Untitled_Block_of_Taxa;
DIMENSIONS NTAX=32;
TAXLABELS
taxon_1 taxon_2 taxon_3 taxon_4 taxon_5 taxon_6 taxon_7 taxon_8 taxon_9 taxon_10 taxon_11 taxon_12 taxon_13 taxon_14 taxon_15 taxon_16 taxon_17 taxon_18 taxon_19 taxon_20 taxon_21 taxon_22 taxon_23 taxon_24 taxon_25 taxon_26 taxon_27 taxon_28 taxon_29 taxon_30 taxon_31 taxon_32
;
IDS WM1148f47d2061 WM1148f47d2072 WM1148f47d2073 WM1148f47d2074 WM1148f47d2075 WM1148f47d2076 WM1148f47d2077 WM1148f47d2078 WM1148f47d2079 WM1148f47d20710 WM1148f47d20711 WM1148f47d20712 WM1148f47d20713 WM1148f47d20714 WM1148f47d20715 WM1148f47d20716 WM1148f47d20717 WM1148f47d20718 WM1148f47d20719 WM1148f47d20720 WM1148f47d20721 WM1148f47d20722 WM1148f47d20723 WM1148f47d20724 WM1148f47d20725 WM1148f47d20726 WM1148f47d20727 WM1148f47d20728 WM1148f47d20729 WM1148f47d20830 WM1148f47d20831 WM1148f47d20832 ;
BLOCKID WM1148f47d2081;
END;
BEGIN CHARACTERS;
TITLE 'Matrix in file "06-BiSSEtrees.nex"';
DIMENSIONS NCHAR=1;
FORMAT DATATYPE = STANDARD GAP = - MISSING = ? SYMBOLS = " 0 1";
MATRIX
taxon_1 0
taxon_2 1
taxon_3 0
taxon_4 0
taxon_5 0
taxon_6 1
taxon_7 0
taxon_8 1
taxon_9 1
taxon_10 1
taxon_11 1
taxon_12 1
taxon_13 1
taxon_14 1
taxon_15 1
taxon_16 1
taxon_17 1
taxon_18 0
taxon_19 1
taxon_20 0
taxon_21 0
taxon_22 0
taxon_23 1
taxon_24 1
taxon_25 1
taxon_26 1
taxon_27 1
taxon_28 1
taxon_29 1
taxon_30 1
taxon_31 1
taxon_32 0
;
IDS WM1148f4828fe0 ;
BLOCKID WM114988797040;
END;
BEGIN TREES;
Title 'Trees from "06-BiSSEtrees.nex"';
LINK Taxa = Untitled_Block_of_Taxa;
TRANSLATE
1 taxon_1,
2 taxon_2,
3 taxon_3,
4 taxon_4,
5 taxon_5,
6 taxon_6,
7 taxon_7,
8 taxon_8,
9 taxon_9,
10 taxon_10,
11 taxon_11,
12 taxon_12,
13 taxon_13,
14 taxon_14,
15 taxon_15,
16 taxon_16,
17 taxon_17,
18 taxon_18,
19 taxon_19,
20 taxon_20,
21 taxon_21,
22 taxon_22,
23 taxon_23,
24 taxon_24,
25 taxon_25,
26 taxon_26,
27 taxon_27,
28 taxon_28,
29 taxon_29,
30 taxon_30,
31 taxon_31,
32 taxon_32;
TREE Tree = (((((7:5.187000000000067,22:5.186999999999937):2.4919999999998366,(2:5.19600000000007,((31:2.6009999999998246,14:2.6009999999998246):2.269999999999861,26:4.870999999999961):0.32500000000000023):2.4829999999999215):0.6730000000000005,((((6:0.8290000000000006,9:0.8290000000000006):0.3140000000000002,16:1.142999999999985):2.6749999999998164,(((15:0.20300000000000015,12:0.20300000000000015):0.2490000000000002,8:0.45200000000000035):1.360999999999961,32:1.8129999999999111):2.00499999999989):3.5429999999998403,((23:0.8660000000000007,(17:0.0010,24:0.0010):0.8650000000000007):1.0020000000000004,(18:1.059999999999994,4:1.059999999999994):0.8080000000000006):5.4930000000000865):0.9910000000000008):2.2739999999998606,((((10:0.21500000000000016,29:0.21500000000000016):1.1809999999999807,21:1.395999999999957):6.895000000000504,27:8.291000000000466):2.2449999999998638,((11:0.5600000000000004,19:0.5600000000000004):7.632000000000883,3:8.192000000000526):2.343999999999853):0.09000000000000007):2.389999999999848,((5:3.7479999999996982,(20:0.03300000000000002,1:0.03300000000000002):3.714999999999702):5.209999999999916,((28:0.5840000000000004,13:0.5840000000000004):7.191000000000736,(25:1.5889999999999358,30:1.5889999999999358):6.185999999999934):1.1829999999999805):4.0579999999997804):0.0;
TREE Tree2 = (((((7:5.187000000000067,22:5.187000000000067):2.4919999999999245,(2:5.19600000000007,((31:3.7774048022868723,14:3.7774048022868723):1.093595197713089,26:4.870999999999961):0.32500000000010854):2.4829999999999215):2.0339999999996135,((((6:0.8290000000000006,9:0.8290000000000006):1.8698616304384839,16:2.6988616304384845):2.4801383695612778,(((15:0.20300000000000007,12:0.20300000000000007):1.609999999999911,32:1.8129999999999111):1.360999999999961,8:3.173999999999872):2.00499999999989):3.542999999999841,((23:0.8660000000000005,(17:0.0010000000000000009,24:0.0010000000000000009):0.8650000000000005):1.0020000000000007,(18:1.059999999999994,4:1.059999999999994):0.8080000000000072):6.853999999999602):0.9910000000000014):2.2739999999998606,((((10:0.21500000000000008,29:0.21500000000000008):1.1809999999999812,21:1.3959999999999813):6.895000000000504,27:8.291000000000485):2.2450000000002515,((11:0.5600000000000005,19:0.5600000000000005):2.8847657391088752,3:3.4447657391088757):7.091234260891861):1.4509999999987286):2.389999999999848,((5:3.747999999999702,(20:1.3302842177280931,1:1.3302842177280931):2.4177157822716087):5.210000000001016,((28:0.5840000000000005,13:0.5840000000000005):7.191000000000736,(25:1.5889999999999356,30:1.5889999999999356):6.186000000000801):1.1829999999999812):5.418999999998595):0.0;
END;
BEGIN CODONS;
CODESET * UNTITLED = universal: 1;
END;
BEGIN ASSUMPTIONS;
TYPESET * UNTITLED = unord: 1;
END;
BEGIN MESQUITECHARMODELS;
ProbModelSet * UNTITLED = 'Mk1 (est.)': 1;
END;
Begin MESQUITE;
MESQUITESCRIPTVERSION 2;
TITLE AUTO;
tell ProjectCoordinator;
getEmployee #mesquite.minimal.ManageTaxa.ManageTaxa;
tell It;
setID 0 6732219986260810463 WM1148f47d2081;
endTell;
getEmployee #mesquite.charMatrices.ManageCharacters.ManageCharacters;
tell It;
setID 0 444104661901299517 WM114988797040;
checksumv 0 2 1451138313 WM114988797040;
endTell;
getWindow;
tell It;
suppress;
setResourcesState false false 72;
setPopoutState 400;
setExplanationSize 0;
setAnnotationSize 0;
setFontIncAnnot 0;
setFontIncExp 0;
setSize 1213 622;
setLocation 5 22;
setFont SanSerif;
setFontSize 10;
getToolPalette;
tell It;
endTell;
desuppress;
endTell;
getEmployee #mesquite.trees.BasicTreeWindowCoord.BasicTreeWindowCoord;
tell It;
makeTreeWindow #6732219986260810463 #mesquite.trees.BasicTreeWindowMaker.BasicTreeWindowMaker;
tell It;
suppressEPCResponse;
setTreeSource #mesquite.trees.StoredTrees.StoredTrees;
tell It;
setTreeBlock 1;
toggleUseWeights off;
endTell;
setAssignedID 786.1187814845004.4817563795317733133;
getTreeWindow;
tell It;
setExplanationSize 30;
setAnnotationSize 20;
setFontIncAnnot 0;
setFontIncExp 0;
setSize 1141 555;
setLocation 5 22;
setFont SanSerif;
setFontSize 10;
getToolPalette;
tell It;
setTool mesquite.trees.BasicTreeWindowMaker.BasicTreeWindow.arrow;
endTell;
setActive;
getTreeDrawCoordinator #mesquite.trees.BasicTreeDrawCoordinator.BasicTreeDrawCoordinator;
tell It;
suppress;
setTreeDrawer #mesquite.trees.ArcTree.ArcTree;
tell It;
setNodeLocs #mesquite.trees.NodeLocsStandard.NodeLocsStandard;
tell It;
inhibitStretchToggle on;
branchLengthsToggle on;
toggleScale on;
toggleBroadScale off;
toggleCenter off;
toggleEven off;
endTell;
setEdgeWidth 8;
orientUp;
endTell;
setBackground White;
setBranchColor Black;
showNodeNumbers off;
showBranchColors on;
labelBranchLengths off;
centerBrLenLabels on;
showBrLensUnspecified on;
showBrLenLabelsOnTerminals on;
setBrLenLabelColor 0 0 255;
setNumBrLenDecimals 6;
desuppress;
getEmployee #mesquite.trees.BasicDrawTaxonNames.BasicDrawTaxonNames;
tell It;
setColor Black;
toggleColorPartition on;
toggleShadePartition off;
toggleShowFootnotes on;
toggleNodeLabels on;
toggleCenterNodeNames off;
toggleShowNames on;
namesAngle ?;
endTell;
endTell;
setTreeNumber 1;
setDrawingSizeMode 1;
toggleLegendFloat on;
toggleTextOnTree off;
showWindow;
newAssistant #mesquite.ancstates.TraceCharacterHistory.TraceCharacterHistory;
tell It;
suspend ;
setDisplayMode #mesquite.ancstates.ShadeStatesOnTree.ShadeStatesOnTree;
tell It;
toggleLabels off;
toggleGray off;
endTell;
setHistorySource #mesquite.ancstates.RecAncestralStates.RecAncestralStates;
tell It;
getCharacterSource #mesquite.charMatrices.CharSrcCoordObed.CharSrcCoordObed;
tell It;
setCharacterSource #mesquite.charMatrices.StoredCharacters.StoredCharacters;
tell It;
setDataSet #444104661901299517;
endTell;
endTell;
setMethod #mesquite.parsimony.ParsAncestralStates.ParsAncestralStates;
tell It;
setModelSource #mesquite.parsimony.CurrentParsModels.CurrentParsModels;
toggleMPRsMode off;
endTell;
endTell;
setCharacter 1;
setMapping 1;
toggleShowLegend on;
toggleGray off;
toggleWeights on;
setInitialOffsetX 4;
setInitialOffsetY -175;
setLegendWidth 142;
setLegendHeight 161;
resume ;
modifyColors 1 1 70 235 97;
endTell;
newWindowAssistant #mesquite.diverse.CharAssocDivViewer.CharAssocDivViewer;
tell It;
getCharSource #mesquite.charMatrices.CharSrcCoordObed.CharSrcCoordObed;
tell It;
setCharacterSource #mesquite.charMatrices.StoredCharacters.StoredCharacters;
tell It;
setDataSet #444104661901299517;
endTell;
endTell;
setCalculator #mesquite.diverse.BiSSELikelihood.BiSSELikelihood;
tell It;
suspend ;
setParameters ? ? =0 ? ? =2 ? ? =4;
setReportMode Likelihood;
getIntegTask #mesquite.diverse.BiSSELikelihoodCalculator.BiSSELikelihoodCalculator;
tell It;
suspend ;
setUnderflowCheckFreq 2;
setStepCount 1000.0;
setIterations 2;
conditionOnSurvival off;
getStartFromConstrainedModel off;
resume ;
endTell;
resume ;
endTell;
setCharacter 1;
doCounts;
endTell;
endTell;
desuppressEPCResponse;
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;
getEmployee #mesquite.ornamental.DrawTreeAssocDoubles.DrawTreeAssocDoubles;
tell It;
setOn on;
setDigits 4;
writeAsPercentage off;
toggleCentred on;
toggleHorizontal on;
setFontSize 10;
setOffset 0 0;
endTell;
getEmployee #mesquite.trees.TreeInfoValues.TreeInfoValues;
tell It;
panelOpen false;
endTell;
endTell;
endTell;
getEmployee #mesquite.charMatrices.BasicDataWindowCoord.BasicDataWindowCoord;
tell It;
showDataWindow #444104661901299517 #mesquite.charMatrices.BasicDataWindowMaker.BasicDataWindowMaker;
tell It;
getWindow;
tell It;
setExplanationSize 30;
setAnnotationSize 20;
setFontIncAnnot 0;
setFontIncExp 0;
setSize 1141 555;
setLocation 5 22;
setFont SanSerif;
setFontSize 10;
getToolPalette;
tell It;
setTool mesquite.charMatrices.BasicDataWindowMaker.BasicDataWindow.arrow;
endTell;
setTool mesquite.charMatrices.BasicDataWindowMaker.BasicDataWindow.arrow;
colorCells #mesquite.charMatrices.NoColor.NoColor;
colorRowNames #mesquite.charMatrices.TaxonGroupColor.TaxonGroupColor;
colorColumnNames #mesquite.charMatrices.CharGroupColor.CharGroupColor;
colorText #mesquite.charMatrices.NoColor.NoColor;
setBackground White;
toggleShowNames on;
toggleShowTaxonNames on;
toggleTight off;
toggleThinRows off;
toggleShowChanges on;
toggleSeparateLines off;
toggleShowStates on;
toggleAutoWCharNames on;
toggleShowDefaultCharNames off;
toggleConstrainCW on;
setColumnWidth 16;
toggleBirdsEye off;
toggleAllowAutosize on;
toggleColorsPanel off;
toggleDiagonal on;
setDiagonalHeight 80;
toggleLinkedScrolling on;
toggleScrollLinkedTables off;
endTell;
hideWindow;
getEmployee #mesquite.charMatrices.ColorCells.ColorCells;
tell It;
setColor Red;
removeColor off;
endTell;
getEmployee #mesquite.categ.StateNamesStrip.StateNamesStrip;
tell It;
showStrip off;
endTell;
getEmployee #mesquite.charMatrices.AnnotPanel.AnnotPanel;
tell It;
togglePanel off;
endTell;
getEmployee #mesquite.charMatrices.CharReferenceStrip.CharReferenceStrip;
tell It;
showStrip off;
endTell;
getEmployee #mesquite.charMatrices.QuickKeySelector.QuickKeySelector;
tell It;
autotabOff;
endTell;
getEmployee #mesquite.categ.SmallStateNamesEditor.SmallStateNamesEditor;
tell It;
panelOpen true;
endTell;
endTell;
endTell;
newAssistant #mesquite.basic.ExamplesNavigator.ExamplesNavigator;
tell It;
setNextFileName '07-contTreeSim.nex';
setPrevFileName '05-BiSSENetViewer.nex';
getWindow;
tell It;
popAsTile false;
popOut;
setExplanationSize 0;
setAnnotationSize 0;
setFontIncAnnot 0;
setFontIncExp 0;
setSize 564 433;
setLocation 58 458;
setFont SanSerif;
setFontSize 10;
getToolPalette;
tell It;
endTell;
setExplanation 'To save BiSSE results (with parameter values) for multiple trees, you can either do a chart for Trees (indicating you want to save a results table) or you can set up a tree window as shown, with the BiSSE analysis running. Then, go to the Tree menu of the Tree window, and select Step Through Trees. Indicate you want to record results from BiSSE Speciation/Extinction Likelihood. A tab-delimited table will be stored in a text file with the results. You can examine this file in a text editor or open it with a spreadsheet program.^n^nAn alternative to Step Through Trees is to use scripting. To do this. go to the Window menu of the Tree window, and select Scripting>Send script. In the dialog box, paste the following script. It goes through the trees and saves the results in a file, which will be in the same directory as the data file.^n^n[===== script to tree window for BiSSE calculations =====]^n String.resultsFile ''results.txt'';^nsaveMessageToFile *String.resultsFile ''RESULTS with different trees'';^nappendReturnToFile *String.resultsFile;^ngetWindow;^ntell It;^n getNumTrees;^n Integer.numReps *It;^n ifNotCombinable *Integer.numReps;^n Integer.numReps 10; [in case indefinite number of trees]^n endIf;^nendTell;^ndebug;^nInteger.count 0;^nfor *Integer.numReps;^n increment.count;^n getWindow;^n tell It;^n setTreeNumber *Integer.count;^n endTell;^n getEmployee #mesquite.diverse.CharAssocDivViewer.CharAssocDivViewer;^n tell It;^n doCounts; [because counts dont auto-update when scripting]^n endTell;^n getEmployee #mesquite.diverse.BiSSELikelihood.BiSSELikelihood;^n tell It;^n getLastResult;^n String.result *It;^n appendMessageToFile *String.resultsFile *String.result;^n appendReturnToFile *String.resultsFile;^n endTell;^nendFor;^n';
setTitle Results_from_Multiple_Trees;
toggleFileNames off;
setPrevButtonName Previous;
setNextButtonName Next;
endTell;
showWindow;
endTell;
endTell;
end;