forked from phylotastic/datelife
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.knit.html
180 lines (154 loc) · 19.7 KB
/
README.knit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Welcome to DateLife’s R package GitHub repository! • datelife</title><script src="deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="Welcome to DateLife’s R package GitHub repository!"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-dark navbar-expand-lg bg-primary"><div class="container">
<a class="navbar-brand me-2" href="index.html">datelife</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.6.0</small>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="collapse navbar-collapse ms-2">
<ul class="navbar-nav me-auto"><li class="nav-item">
<a class="nav-link" href="reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="articles/Getting_started_with_datelife.html">Getting started with `datelife`</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/phylotastic/datelife/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul></div>
</div>
</nav><div class="container template-title-body">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="" class="logo" alt=""><h1>Welcome to DateLife’s R package GitHub repository!</h1>
<small class="dont-index">Source: <a href="https://github.com/phylotastic/datelife/blob/HEAD/README.knit.md" class="external-link"><code>README.knit.md</code></a></small>
</div>
<p><img src="reference/figures/datelife-hexsticker-ai.png" align="right" style="width:150px"></p>
<!-- badges: start -->
<!-- [![R build status](https://github.com/phylotastic/datelife/workflows/R-CMD-check/badge.svg)](https://github.com/phylotastic/datelife/actions) -->
<p><img src="https://img.shields.io/github/r-package/v/phylotastic/datelife?color=green" alt="GitHub R package version"><a href="https://app.codecov.io/gh/phylotastic/datelife" class="external-link"><img src="https://codecov.io/gh/phylotastic/datelife/branch/master/graph/badge.svg" alt="codecov"></a> <a href="https://github.com/phylotastic/datelife/issues" class="external-link"><img src="https://img.shields.io/github/issues-raw/phylotastic/datelife.svg" alt="Github Open Issues"></a> <a href="https://github.com/phylotastic/datelife/issues?q=is%3Aissue+is%3Aclosed" class="external-link"><img src="https://img.shields.io/github/issues-closed-raw/phylotastic/datelife.svg" alt="Github Closed Issues"></a> <a href="https://zenodo.org/badge/latestdoi/23036/phylotastic/datelife" class="external-link"><img src="https://zenodo.org/badge/23036/phylotastic/datelife.svg" alt="DOI"></a> <a href="https://nsf.gov/awardsearch/showAward?AWD_ID=1458603" class="external-link"><img src="https://img.shields.io/badge/NSF-1458603-white.svg" alt="NSF-1458603"></a> <a href="https://nsf.gov/awardsearch/showAward?AWD_ID=0905606" class="external-link"><img src="https://img.shields.io/badge/NSF-0905606-white.svg" alt="NSF-0905606"></a> <a href="https://nsf.gov/awardsearch/showAward?AWD_ID=1458572" class="external-link"><img src="https://img.shields.io/badge/NSF-1458572-white.svg" alt="NSF-1458572"></a> <a href="https://github.com/phylotastic/datelife/actions" class="external-link"><img src="https://github.com/phylotastic/datelife/workflows/R-CMD-check/badge.svg" alt="R-CMD-check"></a> <!-- badges: end --></p>
<div id="welcome-to-datelifes-r-package-github-repository" class="section level1">
<p>Get a phylogenetic tree with branch lengths proportional to geologic time (aka a <em><strong>chronogram</strong></em>) of any two or more lineages of interest to you.</p>
<p>Use the <code>datelife</code> R package locally, or through <a href="http://datelife.org/query/" class="external-link">DateLife’s website</a> to search for chronograms available for your lineages in <a href="https://tree.opentreeoflife.org/curator" class="external-link">Open Tree of Life’s tree store</a>.</p>
<p>You can also date a phylogenetic tree of your own making (or choosing one from the literature), using node ages from chronograms found with <code>datelife</code>, using the congruification method (<a href="https://doi.org/10.1111/2041-210X.12051" class="external-link">Eastman et al. 2013</a>) implemented with <em>geiger</em> (<a href="https://doi.org/10.1093/bioinformatics/btm538" class="external-link">Harmon et al. 2008</a>).</p>
<p><code>datelife</code> has been developed as part of the <a href="http://phylotastic.org/" class="external-link">phylotastic</a> (NSF-funded) project, and is still under development.</p>
<ol style="list-style-type: decimal"><li><a href="#installation">Installation</a></li>
<li><a href="#citation">Citation</a></li>
<li><a href="#feedback">Feedback and info for developers</a></li>
<li><a href="#license">License</a></li>
</ol><div class="section level2">
<h2 id="installation">1. Installation<a class="anchor" aria-label="anchor" href="#installation"></a></h2>
<p>Once accepted on CRAN, <code>datelife</code>s stable version will be available for installation with:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"datelife"</span><span class="op">)</span></code></pre></div>
<p>For now, you can install the development version from the GitHub repository:</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">devtools</span><span class="fu">::</span><span class="fu"><a href="https://devtools.r-lib.org/reference/remote-reexports.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"phylotastic/datelife"</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level2">
<h2 id="citation">2. Citation<a class="anchor" aria-label="anchor" href="#citation"></a></h2>
<p>If you use <code>datelife</code> for a publication, please cite the R package and the accompanying paper:</p>
<p>
O’Meara B, Sanchez-Reyes L, Eastman J, Heath T, Wright A, Schliep K, Chamberlain S, Midford P, Harmon L, Brown J, Pennell M, Alfaro M (2022). <em>datelife: Go from a List of Taxa or a Tree to a Chronogram using Open Scientific Data on Time of Lineage Divergence</em>. R package version 0.5.0.
</p>
<p>
Sanchez-Reyes L, O’Meara B (2019). “datelife: Leveraging databases and analytical tools to reveal the dated Tree of Life.” <em>bioRxiv</em>, <b>782094</b>. doi: <a href="https://doi.org/10.1101/782094" class="external-link">10.1101/782094</a>.
</p>
<p>You can get these citations and the bibtex entry with:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/citation.html" class="external-link">citation</a></span><span class="op">(</span><span class="st">"datelife"</span><span class="op">)</span>
<span class="fu"><a href="https://rdrr.io/r/utils/toLatex.html" class="external-link">toBibtex</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/utils/citation.html" class="external-link">citation</a></span><span class="op">(</span><span class="st">"datelife"</span><span class="op">)</span><span class="op">)</span></code></pre></div>
<p>.bibtex files are available</p>
</div>
<div class="section level2">
<h2 id="feedback-and-information-for-developers">3. Feedback and Information for Developers<a class="anchor" aria-label="anchor" href="#feedback-and-information-for-developers"></a></h2>
<p>We welcome and encourage to post a <a href="https://github.com/phylotastic/datelife/issues/new" class="external-link">GitHub issue</a> with any comments, ideas and questions about <code>datelife</code>’s software and website. If you want to contribute with code directly, we welcome and encourage <a href="https://github.com/phylotastic/datelife/pulls" class="external-link">pull requests</a>.</p>
<div class="section level4">
<h4 id="function-documentation">Function documentation:<a class="anchor" aria-label="anchor" href="#function-documentation"></a></h4>
<p>Package and function documentation was generated with <a href="https://CRAN.R-project.org/package=roxygen2" class="external-link">roxygen2</a>:</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">roxygen2</span><span class="fu">::</span><span class="fu"><a href="https://roxygen2.r-lib.org/reference/roxygenize.html" class="external-link">roxygenise</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level4">
<h4 id="styling-code">Styling code:<a class="anchor" aria-label="anchor" href="#styling-code"></a></h4>
<p>We used the package <a href="https://CRAN.R-project.org/package=lintr" class="external-link">lintr</a> to check for coding style:</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">lintr</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/lintr/man/lint_package.html" class="external-link">lint_package</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level4">
<h4 id="calculating-test-coverage">Calculating test coverage:<a class="anchor" aria-label="anchor" href="#calculating-test-coverage"></a></h4>
<p>Code coverage was calculated with the package <a href="https://CRAN.R-project.org/package=covr" class="external-link">covr</a>:</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">cov</span> <span class="op"><-</span> <span class="fu">covr</span><span class="fu">::</span><span class="fu"><a href="http://covr.r-lib.org/reference/package_coverage.html" class="external-link">package_coverage</a></span><span class="op">(</span><span class="op">)</span>
<span class="fu">usethis</span><span class="fu">::</span><span class="fu"><a href="https://usethis.r-lib.org/reference/use_data.html" class="external-link">use_data</a></span><span class="op">(</span><span class="va">cov</span>, overwrite <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></code></pre></div>
<p>You can see an interactive report of testing coverage:</p>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">covr</span><span class="fu">::</span><span class="fu"><a href="http://covr.r-lib.org/reference/report.html" class="external-link">report</a></span><span class="op">(</span><span class="va">cov</span><span class="op">)</span></code></pre></div>
<p>And, find code with zero coverage:</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">covr</span><span class="fu">::</span><span class="fu"><a href="http://covr.r-lib.org/reference/zero_coverage.html" class="external-link">zero_coverage</a></span><span class="op">(</span><span class="va">cov</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level4">
<h4 id="releasing-to-cran">Releasing to CRAN:<a class="anchor" aria-label="anchor" href="#releasing-to-cran"></a></h4>
<p>To be able to release to CRAN, the first step is to pass a check. To run a local check, you can use the command <code>R CMD check</code> from your terminal. For that, change directories to the one above your working clone of the <code>datelife</code> repo:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="bu">cd</span> ../</a></code></pre></div>
<p>Generate a tar ball for your package by running <code>R CMD build package-name</code>:</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="ex">R</span> CMD build datelife</a></code></pre></div>
<p>Finally, run <code>R CMD check package-tar-ball</code> on the tar ball that you just generated:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb11-1" data-line-number="1"><span class="ex">R</span> CMD check datelife_0.6.0.tar.gz</a></code></pre></div>
<p>If you do not have access to different OS to test your package on, the <a href="https://CRAN.R-project.org/package=rhub" class="external-link">rhub</a> package allows remote testing on a variety of OS with the command:</p>
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">rhub</span><span class="fu">::</span><span class="fu"><a href="https://r-hub.github.io/rhub/reference/check_for_cran.html" class="external-link">check_for_cran</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level4">
<h4 id="generating-datelifes-hexsticker">Generating <code>datelife</code>’s hexsticker:<a class="anchor" aria-label="anchor" href="#generating-datelifes-hexsticker"></a></h4>
<p>Code used to generate current <code>datelife</code>’s logo hexsticker is in <a href="https://github.com/phylotastic/datelife/blob/master/data-raw/hexsticker-current.R" class="external-link">data-raw/hexsticker-current.R</a></p>
</div>
<div class="section level4">
<h4 id="rendering-the-vignettes">Rendering the vignettes:<a class="anchor" aria-label="anchor" href="#rendering-the-vignettes"></a></h4>
<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">knitr</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/knitr/man/knit.html" class="external-link">knit</a></span><span class="op">(</span><span class="st">"vignettes/Getting_started_with_datelife.Rmd"</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level4">
<h4 id="creating-a-website-for-the-package">Creating a website for the package<a class="anchor" aria-label="anchor" href="#creating-a-website-for-the-package"></a></h4>
<p>Using <code>pkgdown</code> for this is quite straightforwrd and fun:</p>
<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">usethis</span><span class="fu">::</span><span class="fu"><a href="https://usethis.r-lib.org/reference/use_pkgdown.html" class="external-link">use_pkgdown</a></span><span class="op">(</span><span class="op">)</span>
<span class="fu">pkgdown</span><span class="fu">::</span><span class="fu"><a href="https://pkgdown.r-lib.org/reference/build_site.html" class="external-link">build_site</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</div>
<div class="section level4">
<h4 id="submitting-to-cran">Submitting to CRAN<a class="anchor" aria-label="anchor" href="#submitting-to-cran"></a></h4>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu">devtools</span><span class="fu">::</span><span class="fu"><a href="https://devtools.r-lib.org/reference/release.html" class="external-link">release</a></span><span class="op">(</span><span class="op">)</span></code></pre></div>
</div>
</div>
<div class="section level2">
<h2 id="license">4. License<a class="anchor" aria-label="anchor" href="#license"></a></h2>
<p>This package is free and open source software, licensed under GPL.</p>
</div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Brian O’Meara, Jonathan Eastman, Tracy Heath, April Wright, Klaus Schliep, Scott Chamberlain, Peter Midford, Luke Harmon, Joseph Brown, Matt Pennell, Mike Alfaro, Luna L. Sanchez Reyes.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.1.</p>
</div>
</footer></div>
</body></html>