<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I've actually been waiting for the phylo4 API to stabilize so that I can add conversion to Rmesquite. Rmesquite does already convert from Mesquite to phylo.<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>-hilmar<div><br><div><div>On Oct 6, 2009, at 12:21 PM, Brian O'Meara wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">A question that might of interest for phylobase (i.e., should we try to advocate for mesquite&lt;-&gt;phylo4 interactions rather than just mesquite&lt;-&gt;phylo, will this change the priority of any features in phylobase, etc.).<div><br></div><div>Brian<br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Wayne Maddison &lt;<a href="mailto:wmaddisn@interchange.ubc.ca">wmaddisn@interchange.ubc.ca</a>&gt;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">October 6, 2009 12:10:42 PM EDT</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Sam Brown &lt;<a href="mailto:s_d_j_brown@hotmail.com">s_d_j_brown@hotmail.com</a>&gt;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Cc: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:r-sig-phylo@r-project.org">r-sig-phylo@r-project.org</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>Re: [R-sig-phylo] Tree manipulations (pruning and grafting)</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div>This and the previous query about importing a phylogeny into R raises a question that was embedded in an email several months ago: &nbsp;How useful would it be for you to be able to call a function like newphylo &lt;- mesquite.editTree(phylo) that would put a tree from R into a Mesquite window, you would edit it there, hit a button, and then the modified tree would be returned as the function result in R?<br><br>We might be able to offer a test version of that soon, if there is interest.<br><br>Wayne<br><br><br>At 12:37 PM +1300 6.10.2009, Sam Brown wrote:<br><blockquote type="cite">Dear all<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">To prepare for SH tests between optimised and "expected" trees, I've been attempting to do tree manipulations in R. Pruning is easy with the dual functions of extract.clade() and drop.tip(), however grafting the clade into a different place using bind.tree() is proving much more difficult.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What seems to be happening is that during the tree binding process, some tips are becoming nodes and vice versa.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Any help is much appreciated!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thank you!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Sam<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Some code:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">library(ape)<br></blockquote><blockquote type="cite">data(bird.orders)<br></blockquote><blockquote type="cite">phy&lt;-bird.orders<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">node&lt;-43 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Node with taxa of interest (Columbiformes:Passeriformes)<br></blockquote><blockquote type="cite">site&lt;-21 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Where above group is expected to be (In a clade with Struthioniformes:Anseriformes)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">j&lt;-allDesc(node) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#See function definition below<br></blockquote><blockquote type="cite">grp&lt;-extract.clade(phy, node)<br></blockquote><blockquote type="cite">rest&lt;-drop.tip(phy, j)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">tr&lt;-bind.tree(rest, grp, where=site)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">plot(tr) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Should get an error: "Error in plot.phylo(tr) : NA/NaN/Inf in foreign function call (arg 6)"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">write.tree(tr) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#Can see Upupiformes as sister to NODE11, among others.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">where:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">allDesc&lt;-function(node){<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;N&lt;-length(phy$tip.label)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;index&lt;-which(phy$edge[,1]==node)<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;desc&lt;-phy$edge[index,2]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;taxa&lt;-desc[desc&lt;=N]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;desc&lt;-desc[desc&gt;N]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;while(length(desc)&gt;=1){<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ind&lt;-NULL<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(i in 1:length(desc)){<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ind&lt;-c(ind,which(phy$edge[,1]==desc[i]))<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;desc&lt;-phy$edge[ind,2]<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;taxa&lt;-c(taxa,desc[desc&lt;=N])<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;desc&lt;-desc[desc&gt;N]<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;}<br></blockquote><blockquote type="cite"> &nbsp;&nbsp;&nbsp;taxa<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"> <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> _________________________________________________________________<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Facebook.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">k-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-nz:SI_SB_2:092010<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span>[[alternative HTML version deleted]]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">R-sig-phylo mailing list<br></blockquote><blockquote type="cite"><a href="mailto:R-sig-phylo@r-project.org">R-sig-phylo@r-project.org</a><br></blockquote><blockquote type="cite"><a href="https://stat.ethz.ch/mailman/listinfo/r-sig-phylo">https://stat.ethz.ch/mailman/listinfo/r-sig-phylo</a><br></blockquote><br><br>-- <br>--------------------------------------------------------<br>Wayne Maddison<br> Professor and Canada Research Chair<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Depts. of Zoology and Botany and<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Biodiversity Research Centre<br> &amp; Director<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Beaty Biodiversity Museum<br> 6270 University Boulevard<br> University of British Columbia<br> Vancouver, BC &nbsp;V6T 1Z4 &nbsp;&nbsp;Canada<br><br>email: <a href="mailto:wmaddisn@interchange.ubc.ca">wmaddisn@interchange.ubc.ca</a> &nbsp;&nbsp;FAX: +1 604 822-2416<br><br>Mesquite: <a href="http://mesquiteproject.org">http://mesquiteproject.org</a><br>MacClade: <a href="http://macclade.org">http://macclade.org</a><br>Salticidae: &nbsp;<a href="http://salticidae.org">http://salticidae.org</a><br>Tree of Life: <a href="http://tolweb.org">http://tolweb.org</a><br>Beaty Biodiversity Museum: <a href="http://beatymuseum.ubc.ca">http://beatymuseum.ubc.ca</a><br>Home page: <a href="http://salticidae.org/wpm/home.html">http://salticidae.org/wpm/home.html</a><br><br>_______________________________________________<br>R-sig-phylo mailing list<br><a href="mailto:R-sig-phylo@r-project.org">R-sig-phylo@r-project.org</a><br><a href="https://stat.ethz.ch/mailman/listinfo/r-sig-phylo">https://stat.ethz.ch/mailman/listinfo/r-sig-phylo</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>Phylobase-devl mailing list<br><a href="mailto:Phylobase-devl@lists.r-forge.r-project.org">Phylobase-devl@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/phylobase-devl</a><br></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; ">--&nbsp;</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; ">===========================================================</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; ">: Hilmar Lapp&nbsp; -:-&nbsp; Durham, NC&nbsp; -:- hlapp at duke dot edu :</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; ">===========================================================</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 11px; "><br class="khtml-block-placeholder"></span></font></div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 11px; "><span class="Apple-style-span" style="font-size: 10px; font-family: Monaco; "></span></span></font></span></span><br class="Apple-interchange-newline"></span></div></span><br class="Apple-interchange-newline"> </div><br></div></div></body></html>