<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/rotl-paper-published/"></div></div><div><a data-url="http://www.r-bloggers.com/rotl-paper-published/" data-counturl="http://www.r-bloggers.com/rotl-paper-published/" data-count="horizontal" data-text="rotl paper published" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://ropensci.org/blog/2016/07/26/rotl-paper-published"> rOpenSci Blog - R</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>We are excited to announce a paper describing <code>rotl</code>, our package for the<br>
<a target="_blank" href="http://www.opentreeoflife.org/">Open Tree of Life</a> data, has been<br>
<a target="_blank" href="https://doi.org/10.1111/2041-210X.12593">published</a>. The full<br>
citation is:</p>
<p>Michonneau, F., Brown, J. W. and Winter, D. J. (2016), rotl: an R<br>
package to interact with the Open Tree of Life data. <em>Methods Ecol<br>
Evol.</em> doi: <a target="_blank" href="https://doi.org/10.1111/2041-210X.12593">https://doi.org/10.1111/2041-210X.12593</a></p>
<p>The paper, which is freely available, describes the package and the data<br>
it wraps in detail. Rather than rehash the information here, we will use<br>
this post to briefly introduce the goals of the package and thank some<br>
of the people that helped it come to be.</p>
<h2>What data does Open Tree have and how can <code>rotl</code> help you get it?</h2>
<p>The <a target="_blank" href="http://www.opentreeoflife.org/">Open Tree of Life</a> combines<br>
knowledge from thousands of scientific studies to produce a single<br>
source of information about the relationships among all species on<br>
earth. In addition to storing the trees and taxonomies that go into this<br>
project, the Open Tree provides a &quot;synthesis tree&quot; that represents this<br>
combined knowledge. The Open Tree data can be accessed via the web page<br>
linked above, and through an API.<code>rotl</code> takes advantage of this API to<br>
give R users the ability to search for phylogenetic information and<br>
import the results into their R sessions. The imported data can then be<br>
used with the growing ecosystem of packages for phylogenetic and<br>
comparative biology in R.</p>
<h2>A small example</h2>
<p>Using <code>rotl</code> to get a tree for a set of names is usually a two step<br>
process. You need to start by matching the set of names you have to<br>
records in the Open Tree database, and obtain unique IDs for each one.<br>
The function <code>tnrs_match_names</code> handles this task:</p>
<div>
<pre><code data-lang="text">library(rotl)
apes &lt;- c(&quot;Pongo&quot;, &quot;Pan&quot;, &quot;Gorilla&quot;, &quot;Hoolock&quot;, &quot;Homo&quot;)
resolved_names &lt;- tnrs_match_names(apes)
resolved_names

##   search_string unique_name approximate_match ott_id is_synonym flags
## 1         pongo       Pongo             FALSE 417949      FALSE
## 2           pan         Pan             FALSE 417957      FALSE
## 3       gorilla     Gorilla             FALSE 417969      FALSE
## 4       hoolock     Hoolock             FALSE 712902      FALSE
## 5          homo        Homo             FALSE 770309      FALSE
##   number_matches
## 1              1
## 2              1
## 3              1
## 4              1
## 5              1
</code></pre>
</div>
<p>Once you have a good set of unique IDs, you will want to fetch a tree.<br>
You can use <code>ott_id</code> to extract just the IDs from the table returned by<br>
<code>tnrs_match_names</code> and pass those to <code>tol_induced_subtree</code> to fetch a<br>
tree with theses species in the tips</p>
<div>
<pre><code data-lang="text">tr &lt;- tol_induced_subtree(ott_ids=ott_id(resolved_names))
plot(tr)
</code></pre>
</div>
<p><img alt="img" src="http://i1.wp.com/ropensci.org/assets/blog-images/rotl_pub/ape_tree.png?w=456" data-recalc-dims="1"></p>
<p>The tree is an object of the <code>ape</code> class <code>phylo</code>, which is used by most<br>
other phylogeny packages in R. There are two vignettes describing how<br>
the fetched trees can be <a target="_blank" href="https://cran.rstudio.com/web/packages/rotl/vignettes/data_mashups.html">paired with other<br>
data</a><br>
and used to <a target="_blank" href="https://cran.rstudio.com/web/packages/rotl/vignettes/meta-analysis.html">reproduce a comparative<br>
analysis</a>.<br>
<a target="_blank" href="https://cran.rstudio.com/web/packages/rotl/vignettes/how-to-use-rotl.html">Another<br>
vignette</a><br>
provides and introduction to the package and includes an FAQ.</p>
<h2>Thanks</h2>
<p>We'd like to thank the Open Tree project for providing such an amazing<br>
resource, and for producing a powerful and well-documented API. <code>rotl</code> was<br>
initially developed as part of the <a target="_blank" href="https://ropensci.org/blog/2014/08/15/open-tree-of-life-hackathon/">Open Tree's hackathon in Ann Arbor<br>
in<br>
2014</a>.<br>
We'd like to thank the Open Tree project for inviting us to the meeting<br>
and all participants of that meeting for discussions and their feedback<br>
on <code>rotl</code>. The package was reviewed as part of the ROpenSci onboarding<br>
process, and we'd like to thank <a target="_blank" href="http://scottchamberlain.info/">Scott<br>
Chamberlain</a> for the time and expertise<br>
that went into this review and improved the package.</p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/rotl-paper-published/"></div></div><div><a data-url="http://www.r-bloggers.com/rotl-paper-published/" data-counturl="http://www.r-bloggers.com/rotl-paper-published/" data-count="vertical" data-text="rotl paper published" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://ropensci.org/blog/2016/07/26/rotl-paper-published"> rOpenSci Blog - R</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/Og_7CoNDSIk"></a></div>