#Nexus [This is a sample file for Brownie 2.] [Data files should include a trees block and a characters block. The brownie block is optional]; [Here is a taxa block] begin taxa; dimensions ntax=21; taxlabels hein spV spT modestus magnus cfmag macro visay wood sp1 spG2 micro1 aratho spD sp2 cfacan acan leyt spI palav parvus ; end; [Note that trees should have branch lengths] Begin TREES; Translate 1 hein, 2 spV, 3 spT, 4 modestus, 5 magnus, 6 cfmag, 7 macro, 8 visay, 9 wood, 10 sp1, 11 spG2, 12 micro1, 13 aratho, 14 spD, 15 sp2, 16 cfacan, 17 acan, 18 leyt, 19 spI, 20 palav, 21 parvus ; [control tree; one parameter] TREE tree1 = (((((((((((1:{0,0.33801400},2:{0,0.33801400}):{0,0.09012600},3:{0,0.42814000}):{0,0.02265500},(4:{0,0.42129600},((5:{0,0.34799200},6:{0,0.34799200}):{0,0.05004000},((7:{0,0.24942400},8:{0,0.24942400}):{0,0.08754700},9:{0,0.33697000}):{0,0.06106200}):{0,0.02326300}):{0,0.02949900},10:{0,0.45079500}):{0,0.05737100},11:{0,0.50816600}):{0,0.01555400},12:{0,0.52372000}):{0,0.01753400},13:{0,0.54125400}):{0,0.01162400},(14:{0,0.42327000},15:{0,0.42327000}):{0,0.12960800}):{0,0.02401700},(16:{0,0.29471600},17:{0,0.29471600}):{0,0.28217900}):{0,0.06140500},18:{0,0.63830000}):{0,0.29380300},19:{0,0.93210400}):{0,0.06789600},(21:{0,0.51768100},20:{0,0.51768100}):{0,0.48231900}); [test tree; two parameters; 1 is philippines or Borneo, 0 is Sulawesi] TREE tree2 = (((((((((((1:{0,0.33801400},2:{0,0.33801400}):{0,0.09012600},3:{0,0.42814000}):{0,0.02265500},(4:{0,0.42129600},((5:{1,0.34799200},6:{1,0.34799200}):{1,0.05004000},((7:{1,0.24942400},8:{1,0.24942400}):{1,0.08754700},9:{1,0.33697000}):{1,0.06106200}):{1,0.02326300}):{0,0.02949900},10:{0,0.45079500}):{0,0.05737100},11:{0,0.50816600}):{0,0.01555400},12:{0,0.52372000}):{0,0.01753400},13:{0,0.54125400}):{0,0.01162400},(14:{0,0.42327000},15:{0,0.42327000}):{0,0.12960800}):{0,0.02401700},(16:{1,0.29471600},17:{1,0.29471600}):{1,0.28217900}):{1,0.06140500},18:{1,0.63830000}):{1,0.29380300},19:{0,0.93210400}):{1,0.06789600},(21:{1,0.51768100},20:{1,0.51768100}):{1,0.48231900}); End; [Here is our characters block. Numbers can be less than zero and can have different precision (since, right now, all measurements are treated as being known exactly)] BEGIN characters; DIMENSIONS NCHAR=1 NTAX=21; FORMAT DATATYPE=CONTINUOUS ; MATRIX hein 4.199 spV 3.609 spT 3.704 modestus 3.931 magnus 4.377 cfmag 4.549 macro 4.586 visay 4.223 wood 4.172 sp1 3.562 spG2 3.852 micro1 4.193 aratho 3.627 spD 4.561 sp2 3.866 cfacan 4.365 acan 4.209 leyt 3.768 spI 4.903 palav 3.275 parvus 3.189 [ hein 66.63 spV 36.95 spT 40.62 modestus 50.94 magnus 79.61 cfmag 94.52 macro 98.15 visay 68.24 wood 64.85 sp1 35.23 spG2 47.11 micro1 66.20 aratho 37.59 spD 95.68 sp2 47.73 cfacan 78.67 acan 67.31 leyt 43.31 spI 134.73 palav 26.45 parvus 24.25 ] ; END; [begin assumptions;] [taxset CladeA= A_simoni A_garfunkeli A_lennoni;] [end;] begin brownie; help; [To get a list of commands, type help] blocks; [Outputs a list of stored Nexus blocks] [model type = BMS; NumOpt Iter = 10000; continuous; choose tree=2; model type = BMS; NumOpt Iter = 1000000; continuous;] [choose ?; [To get more info on a given command, type the command name followed by a question mark] vcv ?; [Get help on VCV] vcv taxset=CladeA; [Output the VCV matrix for CladeA, defined in the assumptions block] choose tree=2; [Select a different tree] vcv taxset=CladeA; [Output the VCV matrix for CladeA under this tree.] vcv taxset=NOTCladeA; [By default, a complementary taxset (starting with NOT) is created for every named taxset.] taxset GenusB=4-6; [We can also create taxsets in the program, not just in the assumptions block. Note that this group of taxa is not a clade.] ratetest taxset=CladeA; [Does the ratetest. Since we only give it one taxset, it automatically compares this subtree corresponding to this taxset with the subtree corresponding to the complementary taxset, NOTCladeA (a paraphyletic group, but that's okay).] choose char=2; [Select a different character] ratetest taxset=CladeA; [Does the ratetest with character 2] echo file=BrownieBatch.nex replace=yes; [An echo file is like a log file for manual user input. It is stored as a Brownie batch file and can be appended to your data file to repeat your analyses. (though with a different random seed). Remove the #NEXUS if you're appending it.] log file=BrownieLog.txt replace=yes; [We can save output] vcv t=NOTGenusB; [Remember, though we didn't define NOTGenusB, the program created it. Also note that we can use abbreviations for options: "t" instead of "taxset".] ratetest ?; [Help on the ratetest command] ratetest taxset=CladeA treeloop=yes; [Does the rate test, looping across all trees and weighting the results by the tree weights.] log stop; [Note that the replace option (above) requires =yes (or =no) to follow it, as does append, but stop and start do not. Echo works the same way.] ratetest taxset=CladeA taxset=GenusB treeloop=yes charloop=yes reps=0 quiet=yes file=RatetestOutput.txt; [Since we provided ratetest with two taxsets, it only compares the rate in the subtree corresponding to CladeA with the subtree corresponding to GenusB. Though GenusB is polyphyletic with respect to all the remaining taxa, it is paraphyletic with respect to CladeA (taxa not in either taxset are not used in the calculations). Thus, comparing CladeA and GenusB is valid, whereas comparing GenusB with NOTGenusB (two polyphyletic groups) would not be valid. We perform the comparison across all characters and all trees, but we do not do parametric bootstrapping (reps=0). The detailed results are saved to the RatetestOutput.txt file in tab-delimited form, suitable for loading into a program like Microsoft Excel. Quiet=yes tells the program to suppress output for each individual tree-character combination (it will still be saved in the file).] ] [echo stop;] [quit;] [Quits the program. Bracketed out so the program doesn't automatically quit.] end;