Combined text file containing commands and data used for testing the effects of galler and parasitoid phylogenies on proportional species-level parasitism as described in Ives & Godfray (2006). Host codes refer to the willow host species of each galler (e.g., SMYR = Salix myrsinifolia), parasitoid species are denoted by six-letter abbreviations (e.g., Ptepon = Pteromalus pontaniae). Association table and tree files need to be saved into separate text files before the analysis. Replace XXXX/XXXX/XXXX in the commands with the path to the folder containing the files. ************************************************************ Run commands in R: library(picante) assocs <- read.table("C:/XXXX/XXXX/XXXX/Galler_parasitoid_associations.txt", header=TRUE, na.strings="NA") Gallers <- read.nexus("C:/XXXX/XXXX/XXXX/Galler_tree.nex") Parasitoids <- read.nexus("C:/XXXX/XXXX/XXXX/Parasitoid_tree.nex") results <- pblm(assocs,tree1=Gallers,tree2=Parasitoids,covars1=NULL,covars2=NULL,bootstrap=TRUE,nreps=1000,maxit=10000,pstart=c(.5,.5)) sink(file = "C:/XXXX/XXXX/XXXX/results.txt") results sink() ************************************************************ Galler_parasitoid_associations.txt: Ptepon Ptedol Ptesp1 Ptesp2 Eultor Euraci Eursp Eulsp1 Eulsp2 Brakop Shalap Ichsp2 Scaves Adecub SMYR 0.000 0.126 0.000 0.000 0.552 0.126 0.000 0.011 0.000 0.000 0.034 0.000 0.057 0.092 SPHY 0.000 0.130 0.000 0.043 0.609 0.217 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 SLAN 0.000 0.100 0.050 0.000 0.000 0.117 0.000 0.000 0.017 0.033 0.317 0.000 0.333 0.033 SGLA 0.079 0.225 0.000 0.000 0.315 0.112 0.000 0.000 0.000 0.045 0.034 0.000 0.124 0.067 SPOL 0.447 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.532 0.000 0.021 0.000 0.000 SRET 0.483 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.360 0.157 0.000 0.000 0.000 SLAP 0.000 0.298 0.000 0.000 0.228 0.053 0.035 0.000 0.000 0.088 0.158 0.000 0.053 0.088 ************************************************************ Galler_tree.nex: #NEXUS BEGIN TREES; TRANSLATE 1 SRET, 2 SPHY, 3 SMYR, 4 SGLA, 5 SLAP, 6 SLAN, 7 SPOL; TREE Gallers = [&R] ((((1:0.00728567,2:0.00728567):5.7816E-4,(3:0.00381666,4:0.00381666):0.00404717):0.00139981,(5:0.00389464,6:0.00389464):0.005369):0.03089176,7:0.04015539):0.02848402; END; ************************************************************ Parasitoid_tree.nex: #NEXUS BEGIN TREES; TRANSLATE 1 Ptedol, 2 Ptepon, 3 Ptesp1, 4 Ptesp2, 5 Eultor, 6 Eulsp2, 7 Eulsp1, 8 Eursp, 9 Euraci, 10 Shalap, 11 Brakop, 12 Ichsp2, 13 Scaves, 14 Adecub; TREE Parasitoids = [&R] (((((1:0.08589085,2:0.08589084):0.05153479,(3:0.056283520000000004,4:0.05628352):0.08114212):0.06488065,5:0.20230628):0.01889993,((6:0.05252906,7:0.05252906):0.11865012,(8:0.09359507,9:0.09359506000000001):0.07758412):0.05002703):0.1124303,(((10:0.18802593,11:0.18802593):0.08416485,12:0.27219078):0.03729025,(13:0.21282021,14:0.2128202):0.09666083):0.02415549); END; ************************************************************