Re: [R-sig-phylo] converting TNT(?) tree to newick tree
Hi Eduardo, Thanks for the link. That did the trick! Chris Law Graduate Student Dept of Ecology & Evolutionary Biology Long Marine Lab - University of California, Santa Cruz cj...@ucsc.edu http://research.pbsci.ucsc.edu/eeb/cjlaw/ On Mon, Feb 27, 2017 at 2:35 PM, Eduardo Ascarrunzwrote: > Hi Chris, > > The tntfile2R and tntfile2newick functions from Nick Matzke's package > TNTR should help you with that. Here's the link: > > http://phylo.wdfiles.com/local--files/tntr/tnt_R_utils_v1.R > > You can also export files in Newick format directly from TNT using the > command EXPORT with the flag "=". > > Cheers, > > Eduardo > > 2017-02-27 19:10 GMT+01:00 Chris Law : > >> Hi all, >> >> We have a set of consensus trees in an unknown file format (attached) >> originally from the TNT software. We wish to convert it to a newick format >> so that they can be imported into R. Does anybody know the what would be >> the best way to do so? Alternatively, is there an R function that can read >> a file format from TNT? >> >> Thanks! >> Chris >> >> ___ >> R-sig-phylo mailing list - R-sig-phylo@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >> Searchable archive at http://www.mail-archive.com/r- >> sig-ph...@r-project.org/ >> > > [[alternative HTML version deleted]] ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] converting TNT(?) tree to newick tree
Hi Chris, The tntfile2R and tntfile2newick functions from Nick Matzke's package TNTR should help you with that. Here's the link: http://phylo.wdfiles.com/local--files/tntr/tnt_R_utils_v1.R You can also export files in Newick format directly from TNT using the command EXPORT with the flag "=". Cheers, Eduardo 2017-02-27 19:10 GMT+01:00 Chris Law: > Hi all, > > We have a set of consensus trees in an unknown file format (attached) > originally from the TNT software. We wish to convert it to a newick format > so that they can be imported into R. Does anybody know the what would be > the best way to do so? Alternatively, is there an R function that can read > a file format from TNT? > > Thanks! > Chris > > ___ > R-sig-phylo mailing list - R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > Searchable archive at http://www.mail-archive.com/r- > sig-ph...@r-project.org/ > [[alternative HTML version deleted]] ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] Plotting uncertainty in continuous ASR
Hi Dave. Yes. It is not perfect, but I have shown how to do this here: http://blog.phytools.org/2017/02/more-on-adding-error-bars-to-contmap.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 2/27/2017 2:45 PM, David Bapst wrote: That's really cool, Liam. Would it also be possible for one to do multiple such error bars per node, for plotting ASRs for multiple traits? -Dave On Mon, Feb 27, 2017 at 12:13 PM, Liam J. Revellwrote: Hi Kevin. This is not automatic - but it is indeed fairly easy to do using phytools. To be honest, I thought this would look terrible - but it actually looks much better than I expected, at least for a relatively small tree. I have posted a demo to my blog here: http://blog.phytools.org/2017/02/adding-colorful-error-bars-to-internal.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 2/27/2017 11:16 AM, Arbuckle, Kevin wrote: Hi all, I was wondering about plotting the output of an ancestral state 'reconstruction' of a continuous trait while incorporating at least some of the uncertainty around the estimates. One approach I thought of was to map the ASR onto a tree in a standard way, then at each node have essentially a mini-legend that is of a length reflecting the width of the confidence interval of the estimate at that node, and is coloured on the same colour-scale as the overall tree legend. For instance, if the colour scheme for the tree goes from blue through yellow to red as the value increases, then a node with a relatively precise and high estimate will have a short bar only ranging through different shades of red, whereas a highly uncertain low estimate will have a wider bar coloured from (say) dark blue to orange/light red. I hope that description makes sense. I was wondering if anyone is aware of a function that already implements such an approach, otherwise I'll try to put one together myself. I am aware of phytool's fancyTree(type="phenogram95") as a way of incorporating uncertainty into a plotted ASR for continuous traits. However, this often results in difficulty in distinguishing different nodes where estimates are similar and also does not lend itself easily to, for instance, plotting pie charts representing discrete trait ASRs onto a tree mapped with a continuous trait. Hence I can imagine a more general approach as above but don't want to duplicate effort if a function already exists (and also if others feel this is a useful idea it can be added to existing packages If I share it as above). Best wishes, Kev ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] Plotting uncertainty in continuous ASR
Hi Kevin. I now show one way to do this here: http://blog.phytools.org/2017/02/more-on-adding-error-bars-to-contmap.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 2/27/2017 2:32 PM, Arbuckle, Kevin wrote: Hi Liam, Thank for that, definitely much quicker than I could have figured it out. The only other thing I'd do would be have the length varying to reflect the range of the estimates, giving an immediate visual display of both the range of variation and the actual values encompassed, but that's something that can be tailored relatively easily from that code so thanks again. Kev From: Liam J. Revell [liam.rev...@umb.edu] Sent: 27 February 2017 19:13 To: Arbuckle, Kevin; r-sig-phylo@r-project.org Subject: Re: [R-sig-phylo] Plotting uncertainty in continuous ASR Hi Kevin. This is not automatic - but it is indeed fairly easy to do using phytools. To be honest, I thought this would look terrible - but it actually looks much better than I expected, at least for a relatively small tree. I have posted a demo to my blog here: http://blog.phytools.org/2017/02/adding-colorful-error-bars-to-internal.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 2/27/2017 11:16 AM, Arbuckle, Kevin wrote: Hi all, I was wondering about plotting the output of an ancestral state 'reconstruction' of a continuous trait while incorporating at least some of the uncertainty around the estimates. One approach I thought of was to map the ASR onto a tree in a standard way, then at each node have essentially a mini-legend that is of a length reflecting the width of the confidence interval of the estimate at that node, and is coloured on the same colour-scale as the overall tree legend. For instance, if the colour scheme for the tree goes from blue through yellow to red as the value increases, then a node with a relatively precise and high estimate will have a short bar only ranging through different shades of red, whereas a highly uncertain low estimate will have a wider bar coloured from (say) dark blue to orange/light red. I hope that description makes sense. I was wondering if anyone is aware of a function that already implements such an approach, otherwise I'll try to put one together myself. I am aware of phytool's fancyTree(type="phenogram95") as a way of incorporating uncertainty into a plotted ASR for continuous traits. However, this often results in difficulty in distinguishing different nodes where estimates are similar and also does not lend itself easily to, for instance, plotting pie charts representing discrete trait ASRs onto a tree mapped with a continuous trait. Hence I can imagine a more general approach as above but don't want to duplicate effort if a function already exists (and also if others feel this is a useful idea it can be added to existing packages If I share it as above). Best wishes, Kev ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
Re: [R-sig-phylo] Plotting uncertainty in continuous ASR
That's really cool, Liam. Would it also be possible for one to do multiple such error bars per node, for plotting ASRs for multiple traits? -Dave On Mon, Feb 27, 2017 at 12:13 PM, Liam J. Revellwrote: > Hi Kevin. > > This is not automatic - but it is indeed fairly easy to do using phytools. > To be honest, I thought this would look terrible - but it actually looks > much better than I expected, at least for a relatively small tree. I have > posted a demo to my blog here: > http://blog.phytools.org/2017/02/adding-colorful-error-bars-to-internal.html. > > All the best, Liam > > Liam J. Revell, Associate Professor of Biology > University of Massachusetts Boston > web: http://faculty.umb.edu/liam.revell/ > email: liam.rev...@umb.edu > blog: http://blog.phytools.org > > > On 2/27/2017 11:16 AM, Arbuckle, Kevin wrote: >> >> Hi all, >> >> I was wondering about plotting the output of an ancestral state >> 'reconstruction' of a continuous trait while incorporating at least some of >> the uncertainty around the estimates. >> >> One approach I thought of was to map the ASR onto a tree in a standard >> way, then at each node have essentially a mini-legend that is of a length >> reflecting the width of the confidence interval of the estimate at that >> node, and is coloured on the same colour-scale as the overall tree legend. >> For instance, if the colour scheme for the tree goes from blue through >> yellow to red as the value increases, then a node with a relatively precise >> and high estimate will have a short bar only ranging through different >> shades of red, whereas a highly uncertain low estimate will have a wider bar >> coloured from (say) dark blue to orange/light red. I hope that description >> makes sense. >> >> I was wondering if anyone is aware of a function that already implements >> such an approach, otherwise I'll try to put one together myself. I am aware >> of phytool's fancyTree(type="phenogram95") as a way of incorporating >> uncertainty into a plotted ASR for continuous traits. However, this often >> results in difficulty in distinguishing different nodes where estimates are >> similar and also does not lend itself easily to, for instance, plotting pie >> charts representing discrete trait ASRs onto a tree mapped with a continuous >> trait. Hence I can imagine a more general approach as above but don't want >> to duplicate effort if a function already exists (and also if others feel >> this is a useful idea it can be added to existing packages If I share it as >> above). >> >> Best wishes, >> Kev >> ___ >> R-sig-phylo mailing list - R-sig-phylo@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo >> Searchable archive at >> http://www.mail-archive.com/r-sig-phylo@r-project.org/ >> > > ___ > R-sig-phylo mailing list - R-sig-phylo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-phylo > Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/ -- David W. Bapst, PhD Adjunct Asst. Professor, Geology and Geol. Eng. South Dakota School of Mines and Technology 501 E. St. Joseph Rapid City, SD 57701 http://webpages.sdsmt.edu/~dbapst/ http://cran.r-project.org/web/packages/paleotree/index.html ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/
[R-sig-phylo] Plotting uncertainty in continuous ASR
Hi all, I was wondering about plotting the output of an ancestral state 'reconstruction' of a continuous trait while incorporating at least some of the uncertainty around the estimates. One approach I thought of was to map the ASR onto a tree in a standard way, then at each node have essentially a mini-legend that is of a length reflecting the width of the confidence interval of the estimate at that node, and is coloured on the same colour-scale as the overall tree legend. For instance, if the colour scheme for the tree goes from blue through yellow to red as the value increases, then a node with a relatively precise and high estimate will have a short bar only ranging through different shades of red, whereas a highly uncertain low estimate will have a wider bar coloured from (say) dark blue to orange/light red. I hope that description makes sense. I was wondering if anyone is aware of a function that already implements such an approach, otherwise I'll try to put one together myself. I am aware of phytool's fancyTree(type="phenogram95") as a way of incorporating uncertainty into a plotted ASR for continuous traits. However, this often results in difficulty in distinguishing different nodes where estimates are similar and also does not lend itself easily to, for instance, plotting pie charts representing discrete trait ASRs onto a tree mapped with a continuous trait. Hence I can imagine a more general approach as above but don't want to duplicate effort if a function already exists (and also if others feel this is a useful idea it can be added to existing packages If I share it as above). Best wishes, Kev ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/