Re: [R-sig-phylo] Mixup with plotted bootstrap values
The bug reported by Alastair is now fixed. This required to change some C code, and so the whole package needs to be recompiled (this will be in the next release of ape). The svn has been updated. For developers, the code in src/tree_build.c has been slightly improved at this occasion and it may be generalized further to decode Newick strings in an efficient and fast way. Emmanuel Emmanuel Paradis wrote on 24/02/2011 16:14: Alastair, That's indeed the correct work-around. The is because a different code is used whether the NEXUS file has a TRANSLATE block or not. I'll fix the bug very soon. Cheers, Emmanuel PS: thanks for the tip on using Figtree. Alastair Potts wrote on 24/02/2011 14:57: Hi All, I think I have located the problem. As usual I had experienced it before and I found (or someone else found) a workaround - but I couldn't remember it. The bootstrap values ($node.label) is mixed up when I save the bootstrap tree as a nexus file with a translation table in PAUP (this is the default by the way). If I save the bootstrap tree without a translation table (i.e. FORMAT=ALTNEX), then the BS values are in their correct places. If I open both saved bootstrap trees (i.e. with and without translation tables) in FigTree, I get identical trees with the bootstrap labels in the correct places. Obviously this has not been the case in R. I think that there may be a problem when reading in the translation table when there are values included with each node. I've included examples of both saved files from PAUP if anyone wishes to play around with the problem. So, for those of you using PAUP, the quick work-around to avoid this problem in future is to use SAVETREES ... FORMAT=ALTNEX ... Cheers, Alastair - Alastair Potts PhD candidate Botany Department University of Cape Town alastair.po...@uct.ac.za or pott...@gmail.com University Private Bag, Rondebosch 7700, South Africa or PO Box 115, Loxton 6985, South Africa Cell: 082 491-7275 - Emmanuel Paradis wrote: Hi Alastair, I copied the Newick string below into R, read it with read.tree, and this seems to work as normal. I also tried to do the same with Figtree: the tree and its tip labels are OK, but the node labels are not (eg, it displays 377 for the root instead of 100). My guess is that it's a problem when decoding the strings (maybe specific to Linux). Best, Emmanuel Alastair Potts wrote on 23/02/2011 21:09: Hi All, I'm sure I've had this problem before and found a way to fix it. I've spent an hour looking for the solution, but can't seem to find it. In short, I've run a bootstrap analysis in PAUP* which provided a consensus tree with bootstrap values. This tree opens fine in FigTree. I read it in using ape's read.nexus and plot the node using nodelabel and the $node.label property of the imported tree. I've done nothing else to the tree (e.g. ladderize which I know sometimes causes problems), yet my node label bootstrap values are all shuffled around in some way and I can't figure out why. My code is simply: pt - read.nexus('dataset1.bootstrap.swap.NNI.tree') plot(pt,cex=0.7) nodelabels(pt$node.label) Possibly the problem lies with the nexus tree, so here it is for what it's worth: tree PAUP_1 = [U] (1:0,((2:100,(3:100,4:100)80:80,5:100,6:100,(7:100,10:100)60:60,8:100,9:100,(11:100,34:100)60:60,15:100,(16:100,37:100,54:100,56:100,57:100,71:100,72:100)70:70,18:100,(23:100,25:100,30:100,31:100,35:100,116:100,117:100)59:59,26:100,27:100,32:100,33:100,39:100,48:100,58:100,59:100,60:100,64:100,69:100,70:100,78:100,79:100,80:100,82:100,(83:100,84:100,85:100)52:52,94:100,99:100,101:100,102:100,107:100,119:100)70:70,(12:100,(13:100,14:100,53:100,90:100)69:69,28:100,(62:100,63:100)96:96,(66:100,67:100)69:69,68:100,91:100,92:100,93:100,97:100,98:100,100:100)81:81,(17:100,19:100,21:100,24:100,38:100,42:100,43:100,(44:100,45:100)67:67,47:100,49:100,50:100,61:100)82:82,(20:100,40:100,41:100,51:100,52:100,73:100,74:100,108:100,109:100,110:100,118:100)65:65,(22:100,29:100,36:100,46:100,75:100,76:100,105:100,111:100,112:100,113:100,114:100,115:100)97:97,55:100,(65:100,86:100,89:100,96:100)68:68,(77:100,(81:100,95:100,103:100,104:100)68:68,106:100)65:65,(87:100,88:100)98:98)100:100) 1 00 ; My apologies for not setting up a standard replication of the error - but I'm not really sure how to go about it with this example. Thanks in advance for your help. Cheers, Alastair ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- Emmanuel Paradis IRD, Jakarta, Indonesia http://ape.mpl.ird.fr/ ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Mixup with plotted bootstrap values
Alastair, That's indeed the correct work-around. The is because a different code is used whether the NEXUS file has a TRANSLATE block or not. I'll fix the bug very soon. Cheers, Emmanuel PS: thanks for the tip on using Figtree. Alastair Potts wrote on 24/02/2011 14:57: Hi All, I think I have located the problem. As usual I had experienced it before and I found (or someone else found) a workaround - but I couldn't remember it. The bootstrap values ($node.label) is mixed up when I save the bootstrap tree as a nexus file with a translation table in PAUP (this is the default by the way). If I save the bootstrap tree without a translation table (i.e. FORMAT=ALTNEX), then the BS values are in their correct places. If I open both saved bootstrap trees (i.e. with and without translation tables) in FigTree, I get identical trees with the bootstrap labels in the correct places. Obviously this has not been the case in R. I think that there may be a problem when reading in the translation table when there are values included with each node. I've included examples of both saved files from PAUP if anyone wishes to play around with the problem. So, for those of you using PAUP, the quick work-around to avoid this problem in future is to use SAVETREES ... FORMAT=ALTNEX ... Cheers, Alastair - Alastair Potts PhD candidate Botany Department University of Cape Town alastair.po...@uct.ac.za or pott...@gmail.com University Private Bag, Rondebosch 7700, South Africa or PO Box 115, Loxton 6985, South Africa Cell: 082 491-7275 - Emmanuel Paradis wrote: Hi Alastair, I copied the Newick string below into R, read it with read.tree, and this seems to work as normal. I also tried to do the same with Figtree: the tree and its tip labels are OK, but the node labels are not (eg, it displays 377 for the root instead of 100). My guess is that it's a problem when decoding the strings (maybe specific to Linux). Best, Emmanuel Alastair Potts wrote on 23/02/2011 21:09: Hi All, I'm sure I've had this problem before and found a way to fix it. I've spent an hour looking for the solution, but can't seem to find it. In short, I've run a bootstrap analysis in PAUP* which provided a consensus tree with bootstrap values. This tree opens fine in FigTree. I read it in using ape's read.nexus and plot the node using nodelabel and the $node.label property of the imported tree. I've done nothing else to the tree (e.g. ladderize which I know sometimes causes problems), yet my node label bootstrap values are all shuffled around in some way and I can't figure out why. My code is simply: pt - read.nexus('dataset1.bootstrap.swap.NNI.tree') plot(pt,cex=0.7) nodelabels(pt$node.label) Possibly the problem lies with the nexus tree, so here it is for what it's worth: tree PAUP_1 = [U] (1:0,((2:100,(3:100,4:100)80:80,5:100,6:100,(7:100,10:100)60:60,8:100,9:100,(11:100,34:100)60:60,15:100,(16:100,37:100,54:100,56:100,57:100,71:100,72:100)70:70,18:100,(23:100,25:100,30:100,31:100,35:100,116:100,117:100)59:59,26:100,27:100,32:100,33:100,39:100,48:100,58:100,59:100,60:100,64:100,69:100,70:100,78:100,79:100,80:100,82:100,(83:100,84:100,85:100)52:52,94:100,99:100,101:100,102:100,107:100,119:100)70:70,(12:100,(13:100,14:100,53:100,90:100)69:69,28:100,(62:100,63:100)96:96,(66:100,67:100)69:69,68:100,91:100,92:100,93:100,97:100,98:100,100:100)81:81,(17:100,19:100,21:100,24:100,38:100,42:100,43:100,(44:100,45:100)67:67,47:100,49:100,50:100,61:100)82:82,(20:100,40:100,41:100,51:100,52:100,73:100,74:100,108:100,109:100,110:100,118:100)65:65,(22:100,29:100,36:100,46:100,75:100,76:100,105:100,111:100,112:100,113:100,114:100,115:100)97:97,55:100,(65:100,86:100,89:100,96:100)68:68,(77:100,(81:100,95:100,103:100,104:100)68:68,106:100)65:65,(87:100,88:100)98:98)100:100)1 00 ; My apologies for not setting up a standard replication of the error - but I'm not really sure how to go about it with this example. Thanks in advance for your help. Cheers, Alastair ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- Emmanuel Paradis IRD, Jakarta, Indonesia http://ape.mpl.ird.fr/ ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
[R-sig-phylo] Mixup with plotted bootstrap values
Hi All, I'm sure I've had this problem before and found a way to fix it. I've spent an hour looking for the solution, but can't seem to find it. In short, I've run a bootstrap analysis in PAUP* which provided a consensus tree with bootstrap values. This tree opens fine in FigTree. I read it in using ape's read.nexus and plot the node using nodelabel and the $node.label property of the imported tree. I've done nothing else to the tree (e.g. ladderize which I know sometimes causes problems), yet my node label bootstrap values are all shuffled around in some way and I can't figure out why. My code is simply: pt - read.nexus('dataset1.bootstrap.swap.NNI.tree') plot(pt,cex=0.7) nodelabels(pt$node.label) Possibly the problem lies with the nexus tree, so here it is for what it's worth: tree PAUP_1 = [U] (1:0,((2:100,(3:100,4:100)80:80,5:100,6:100,(7:100,10:100)60:60,8:100,9:100,(11:100,34:100)60:60,15:100,(16:100,37:100,54:100,56:100,57:100,71:100,72:100)70:70,18:100,(23:100,25:100,30:100,31:100,35:100,116:100,117:100)59:59,26:100,27:100,32:100,33:100,39:100,48:100,58:100,59:100,60:100,64:100,69:100,70:100,78:100,79:100,80:100,82:100,(83:100,84:100,85:100)52:52,94:100,99:100,101:100,102:100,107:100,119:100)70:70,(12:100,(13:100,14:100,53:100,90:100)69:69,28:100,(62:100,63:100)96:96,(66:100,67:100)69:69,68:100,91:100,92:100,93:100,97:100,98:100,100:100)81:81,(17:100,19:100,21:100,24:100,38:100,42:100,43:100,(44:100,45:100)67:67,47:100,49:100,50:100,61:100)82:82,(20:100,40:100,41:100,51:100,52:100,73:100,74:100,108:100,109:100,110:100,118:100)65:65,(22:100,29:100,36:100,46:100,75:100,76:100,105:100,111:100,112:100,113:100,114:100,115:100)97:97,55:100,(65:100,86:100,89:100,96:100)68:68,(77:100,(81:100,95:100,103:100,104:100)68:68,106:100)65:65,(87:100,88:100)98:98)100:100)100; My apologies for not setting up a standard replication of the error - but I'm not really sure how to go about it with this example. Thanks in advance for your help. Cheers, Alastair ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Mixup with plotted bootstrap values
Hi Alastair, I copied the Newick string below into R, read it with read.tree, and this seems to work as normal. I also tried to do the same with Figtree: the tree and its tip labels are OK, but the node labels are not (eg, it displays 377 for the root instead of 100). My guess is that it's a problem when decoding the strings (maybe specific to Linux). Best, Emmanuel Alastair Potts wrote on 23/02/2011 21:09: Hi All, I'm sure I've had this problem before and found a way to fix it. I've spent an hour looking for the solution, but can't seem to find it. In short, I've run a bootstrap analysis in PAUP* which provided a consensus tree with bootstrap values. This tree opens fine in FigTree. I read it in using ape's read.nexus and plot the node using nodelabel and the $node.label property of the imported tree. I've done nothing else to the tree (e.g. ladderize which I know sometimes causes problems), yet my node label bootstrap values are all shuffled around in some way and I can't figure out why. My code is simply: pt - read.nexus('dataset1.bootstrap.swap.NNI.tree') plot(pt,cex=0.7) nodelabels(pt$node.label) Possibly the problem lies with the nexus tree, so here it is for what it's worth: tree PAUP_1 = [U] (1:0,((2:100,(3:100,4:100)80:80,5:100,6:100,(7:100,10:100)60:60,8:100,9:100,(11:100,34:100)60:60,15:100,(16:100,37:100,54:100,56:100,57:100,71:100,72:100)70:70,18:100,(23:100,25:100,30:100,31:100,35:100,116:100,117:100)59:59,26:100,27:100,32:100,33:100,39:100,48:100,58:100,59:100,60:100,64:100,69:100,70:100,78:100,79:100,80:100,82:100,(83:100,84:100,85:100)52:52,94:100,99:100,101:100,102:100,107:100,119:100)70:70,(12:100,(13:100,14:100,53:100,90:100)69:69,28:100,(62:100,63:100)96:96,(66:100,67:100)69:69,68:100,91:100,92:100,93:100,97:100,98:100,100:100)81:81,(17:100,19:100,21:100,24:100,38:100,42:100,43:100,(44:100,45:100)67:67,47:100,49:100,50:100,61:100)82:82,(20:100,40:100,41:100,51:100,52:100,73:100,74:100,108:100,109:100,110:100,118:100)65:65,(22:100,29:100,36:100,46:100,75:100,76:100,105:100,111:100,112:100,113:100,114:100,115:100)97:97,55:100,(65:100,86:100,89:100,96:100)68:68,(77:100,(81:100,95:100,103:100,104:100)68:68,106:100)65:65,(87:100,88:100)98:98)100:100)100 ; My apologies for not setting up a standard replication of the error - but I'm not really sure how to go about it with this example. Thanks in advance for your help. Cheers, Alastair ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo -- Emmanuel Paradis IRD, Jakarta, Indonesia http://ape.mpl.ird.fr/ ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Re: [R-sig-phylo] Mixup with plotted bootstrap values
Hi Emmanuel, I can read in the tree fine using read.nexus too (I've attached the file this time). When in FigTree, if you leave the Node Labels display at 'Node Heights', then you will see 377 at the root of the tree. If you change this setting to 'label', you will see that the bootstrap values are shown (i.e. 100 at the root). If you compare this to: pt - read.nexus('dataset3.bootstrap.swap.NNI.tree') plot(pt,cex=0.7) nodelabels(pt$node.label) then you will see that the bootstrap values do not mirror the fig tree placement (which to me looks like the correct placement). The PAUP analysis and R have been run on a Windows Vista machine. Thanks for your time, Cheers, Alastair - Alastair Potts PhD candidate Botany Department University of Cape Town alastair.po...@uct.ac.za or pott...@gmail.com University Private Bag, Rondebosch 7700, South Africa or PO Box 115, Loxton 6985, South Africa Cell: 082 491-7275 - Emmanuel Paradis wrote: Hi Alastair, I copied the Newick string below into R, read it with read.tree, and this seems to work as normal. I also tried to do the same with Figtree: the tree and its tip labels are OK, but the node labels are not (eg, it displays 377 for the root instead of 100). My guess is that it's a problem when decoding the strings (maybe specific to Linux). Best, Emmanuel Alastair Potts wrote on 23/02/2011 21:09: Hi All, I'm sure I've had this problem before and found a way to fix it. I've spent an hour looking for the solution, but can't seem to find it. In short, I've run a bootstrap analysis in PAUP* which provided a consensus tree with bootstrap values. This tree opens fine in FigTree. I read it in using ape's read.nexus and plot the node using nodelabel and the $node.label property of the imported tree. I've done nothing else to the tree (e.g. ladderize which I know sometimes causes problems), yet my node label bootstrap values are all shuffled around in some way and I can't figure out why. My code is simply: pt - read.nexus('dataset1.bootstrap.swap.NNI.tree') plot(pt,cex=0.7) nodelabels(pt$node.label) Possibly the problem lies with the nexus tree, so here it is for what it's worth: tree PAUP_1 = [U] (1:0,((2:100,(3:100,4:100)80:80,5:100,6:100,(7:100,10:100)60:60,8:100,9:100,(11:100,34:100)60:60,15:100,(16:100,37:100,54:100,56:100,57:100,71:100,72:100)70:70,18:100,(23:100,25:100,30:100,31:100,35:100,116:100,117:100)59:59,26:100,27:100,32:100,33:100,39:100,48:100,58:100,59:100,60:100,64:100,69:100,70:100,78:100,79:100,80:100,82:100,(83:100,84:100,85:100)52:52,94:100,99:100,101:100,102:100,107:100,119:100)70:70,(12:100,(13:100,14:100,53:100,90:100)69:69,28:100,(62:100,63:100)96:96,(66:100,67:100)69:69,68:100,91:100,92:100,93:100,97:100,98:100,100:100)81:81,(17:100,19:100,21:100,24:100,38:100,42:100,43:100,(44:100,45:100)67:67,47:100,49:100,50:100,61:100)82:82,(20:100,40:100,41:100,51:100,52:100,73:100,74:100,108:100,109:100,110:100,118:100)65:65,(22:100,29:100,36:100,46:100,75:100,76:100,105:100,111:100,112:100,113:100,114:100,115:100)97:97,55:100,(65:100,86:100,89:100,96:100)68:68,(77:100,(81:100,95:100,103:100,104:100)68:68,106:100)65:65,(87:100,88:100)98:98)100:100)100 ; My apologies for not setting up a standard replication of the error - but I'm not really sure how to go about it with this example. Thanks in advance for your help. Cheers, Alastair ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo #NEXUS Begin trees; [Treefile saved Wed Feb 23 19:58:46 2011] [! Data file = Aguiler.Feliner.2003.dataset3.nex Bootstrap method with heuristic search: Number of bootstrap replicates = 100 Starting seed = 1628266672 Optimality criterion = parsimony Character-status summary: Of 615 total characters: All characters are of user-defined type mymatrix All characters have equal weight 466 characters are constant 94 variable characters are parsimony-uninformative Number of parsimony-informative characters = 55 Starting tree(s) obtained via stepwise addition Addition sequence: random Number of replicates = 10 Starting seed = 1474473804 Number of trees held at each step during stepwise addition = 1 Branch-swapping algorithm: nearest-neighbor interchange (NNI) Steepest descent option not in effect No more than 10 trees of score (length) greater than or equal to 1 will be saved in each replicate Initial 'MaxTrees' setting = 1000 (will be auto-increased by 1000) Branches collapsed (creating polytomies) if maximum branch length is zero 'MulTrees' option in effect Topological constraints not enforced Trees are unrooted 100 bootstrap replicates completed Time used = 01:24:02.7 ] Translate 1
Re: [R-sig-phylo] Mixup with plotted bootstrap values
Hi All, I think I have located the problem. As usual I had experienced it before and I found (or someone else found) a workaround - but I couldn't remember it. The bootstrap values ($node.label) is mixed up when I save the bootstrap tree as a nexus file with a translation table in PAUP (this is the default by the way). If I save the bootstrap tree without a translation table (i.e. FORMAT=ALTNEX), then the BS values are in their correct places. If I open both saved bootstrap trees (i.e. with and without translation tables) in FigTree, I get identical trees with the bootstrap labels in the correct places. Obviously this has not been the case in R. I think that there may be a problem when reading in the translation table when there are values included with each node. I've included examples of both saved files from PAUP if anyone wishes to play around with the problem. So, for those of you using PAUP, the quick work-around to avoid this problem in future is to use SAVETREES ... FORMAT=ALTNEX ... Cheers, Alastair - Alastair Potts PhD candidate Botany Department University of Cape Town alastair.po...@uct.ac.za or pott...@gmail.com University Private Bag, Rondebosch 7700, South Africa or PO Box 115, Loxton 6985, South Africa Cell: 082 491-7275 - Emmanuel Paradis wrote: Hi Alastair, I copied the Newick string below into R, read it with read.tree, and this seems to work as normal. I also tried to do the same with Figtree: the tree and its tip labels are OK, but the node labels are not (eg, it displays 377 for the root instead of 100). My guess is that it's a problem when decoding the strings (maybe specific to Linux). Best, Emmanuel Alastair Potts wrote on 23/02/2011 21:09: Hi All, I'm sure I've had this problem before and found a way to fix it. I've spent an hour looking for the solution, but can't seem to find it. In short, I've run a bootstrap analysis in PAUP* which provided a consensus tree with bootstrap values. This tree opens fine in FigTree. I read it in using ape's read.nexus and plot the node using nodelabel and the $node.label property of the imported tree. I've done nothing else to the tree (e.g. ladderize which I know sometimes causes problems), yet my node label bootstrap values are all shuffled around in some way and I can't figure out why. My code is simply: pt - read.nexus('dataset1.bootstrap.swap.NNI.tree') plot(pt,cex=0.7) nodelabels(pt$node.label) Possibly the problem lies with the nexus tree, so here it is for what it's worth: tree PAUP_1 = [U] (1:0,((2:100,(3:100,4:100)80:80,5:100,6:100,(7:100,10:100)60:60,8:100,9:100,(11:100,34:100)60:60,15:100,(16:100,37:100,54:100,56:100,57:100,71:100,72:100)70:70,18:100,(23:100,25:100,30:100,31:100,35:100,116:100,117:100)59:59,26:100,27:100,32:100,33:100,39:100,48:100,58:100,59:100,60:100,64:100,69:100,70:100,78:100,79:100,80:100,82:100,(83:100,84:100,85:100)52:52,94:100,99:100,101:100,102:100,107:100,119:100)70:70,(12:100,(13:100,14:100,53:100,90:100)69:69,28:100,(62:100,63:100)96:96,(66:100,67:100)69:69,68:100,91:100,92:100,93:100,97:100,98:100,100:100)81:81,(17:100,19:100,21:100,24:100,38:100,42:100,43:100,(44:100,45:100)67:67,47:100,49:100,50:100,61:100)82:82,(20:100,40:100,41:100,51:100,52:100,73:100,74:100,108:100,109:100,110:100,118:100)65:65,(22:100,29:100,36:100,46:100,75:100,76:100,105:100,111:100,112:100,113:100,114:100,115:100)97:97,55:100,(65:100,86:100,89:100,96:100)68:68,(77:100,(81:100,95:100,103:100,104:100)68:68,106:100)65:65,(87:100,88:100)98:98)100:100)100 ; My apologies for not setting up a standard replication of the error - but I'm not really sure how to go about it with this example. Thanks in advance for your help. Cheers, Alastair ___ R-sig-phylo mailing list R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo #NEXUS Begin trees; [Treefile saved Thu Feb 24 09:43:41 2011] [! Data file = E:\ITS.PROJECT\Aguiler.Feliner.2003\Aguiler.Feliner.2003.dataset4.nex Bootstrap method with heuristic search: Number of bootstrap replicates = 100 Starting seed = 1353324558 Optimality criterion = parsimony Character-status summary: Of 615 total characters: All characters are of type 'unord' All characters have equal weight 467 characters are constant 97 variable characters are parsimony-uninformative Number of parsimony-informative characters = 51 Starting tree(s) obtained via stepwise addition Addition sequence: random Number of replicates = 10 Starting seed = 2055594967 Number of trees held at each step during stepwise addition = 1 Branch-swapping algorithm: nearest-neighbor interchange (NNI) Steepest descent option not in effect No more than 10 trees of score (length) greater than or equal to 1 will be