-
Notifications
You must be signed in to change notification settings - Fork 25
/
Installation.html
205 lines (185 loc) · 14.9 KB
/
Installation.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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!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.0">
<title>Installation details • nat</title>
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><meta property="og:title" content="Installation details">
<meta property="og:description" content="">
<meta name="twitter:card" content="summary">
<!-- 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>
<div class="container template-article">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">nat</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Articles
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/neurons-intro.html">Introduction to neurons and neuronlists</a>
</li>
<li>
<a href="../articles/neurons-as-graph.html">Working with individual neurons as graph structures</a>
</li>
<li>
<a href="../articles/NeuroGeometry.html">NeuroGeometry: Analysing 3D morphology of neurons</a>
</li>
</ul>
</li>
<li>
<a href="../news/index.html">News</a>
</li>
<li>
<a href="../articles/Installation.html">Installation</a>
</li>
<li>
<a href="../index.html#learn">Learn</a>
</li>
<li>
<a href="../index.html#help">Help</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/jefferis/nat">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
<!--/.container -->
</div>
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
<h1>Installation details</h1>
<h4 class="author">Gregory Jefferis</h4>
<h4 class="date">2019-07-22</h4>
<small class="dont-index">Source: <a href="https://github.com/jefferis/nat/blob/master/vignettes/Installation.Rmd"><code>vignettes/Installation.Rmd</code></a></small>
<div class="hidden name"><code>Installation.Rmd</code></div>
</div>
<div id="preface" class="section level2">
<h2 class="hasAnchor">
<a href="#preface" class="anchor"></a>Preface</h2>
<p>This document provides additional details about installation that may help you solve certain difficulties, especially on Windows or Mac platforms.</p>
<p>The source code for this vignette is available at <a href="https://github.com/jefferis/nat/blob/master/vignettes/Installation.Rmd" class="uri">https://github.com/jefferis/nat/blob/master/vignettes/Installation.Rmd</a>. If you find something unclear or notice a typo, I would be very happy if you would click on the Pencil Icon on that page or follow <a href="https://github.com/jefferis/nat/edit/master/vignettes/Installation.Rmd">this link to edit</a> and suggest an alternative wording. Don’t be shy about doing this; I have to review any change and even if your suggestion is not perfect it will still be a prompt for me to improve this document. Thank you!</p>
</div>
<div id="prerequisites" class="section level1">
<h1 class="hasAnchor">
<a href="#prerequisites" class="anchor"></a>Prerequisites</h1>
<p><strong>nat</strong> is an R package and therefore runs on Mac/Linux/Windows. The only pre-requisite for most functionality is a recent version of R (>=3.1.0 recommended).</p>
<ul>
<li><a href="https://www.r-project.org" class="uri">https://www.r-project.org</a></li>
</ul>
<p>3D visualisation is provided by the rgl package based on OpenGL. On Mac OS X if you use RStudio or R from the terminal, you must have a copy of XQuartz, the X11 window manager, installed. This is no longer a default install since Mac OS X 10.8. You need to install XQuartz, before installing the nat package. Logout and login for the installation to take effect. You can get it from <a href="https://xquartz.macosforge.org/landing/" class="uri">https://xquartz.macosforge.org/landing/</a>. This page is also linked from the <a href="https://cran.r-project.org/bin/macosx/">Download R for (Mac) OS X</a> page.</p>
<p>If you want to apply non-rigid registrations calculated by the Computational Morphometry Toolkit (CMTK) you will need to install that separately – see section <em>External Dependencies</em> below.</p>
</div>
<div id="basic-installation" class="section level1">
<h1 class="hasAnchor">
<a href="#basic-installation" class="anchor"></a>Basic Installation</h1>
<p>As of v1.0 there is a released version on CRAN. This is normally updated only every few months.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"nat"</span>)</a></code></pre></div>
<p>If you wish to run the package tests, it is necessary to install with all dependencies:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"nat"</span>, <span class="dt">dependencies=</span><span class="ot">TRUE</span>)</a></code></pre></div>
</div>
<div id="development-version" class="section level1">
<h1 class="hasAnchor">
<a href="#development-version" class="anchor"></a>Development version</h1>
<p><strong>nat</strong> remains under quite active development, so we generally suggest using the development version directly from github. The recommended way to do this is to install Hadley Wickham’s invaluable <a href="https://CRAN.R-project.org/package=devtools">devtools</a> package (if you have not already done so) and then use that to install nat.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="co"># install devtools if required</span></a>
<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="cf">if</span> (<span class="op">!</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">require</a></span>(<span class="st">"devtools"</span>)) <span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"devtools"</span>)</a>
<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="co"># then install nat</span></a>
<a class="sourceLine" id="cb3-4" data-line-number="4">devtools<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/devtools/topics/reexports">install_github</a></span>(<span class="st">"jefferis/nat"</span>)</a></code></pre></div>
<p>The <strong>nat</strong> package includes extensive unit tests which are run along with R’s (extremely fastidious) package check routines by the <a href="http://travis-ci.org/jefferis/nat">Travis</a> continuous integration server. The master branch is therefore considered very stable and may well contain fixes or enhancements over released versions. However, you can install any <a href="https://github.com/jefferis/nat/tags">release version</a> including the <a href="https://github.com/jefferis/nat/releases/latest">latest release</a> as follows:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" data-line-number="1">devtools<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/devtools/topics/reexports">install_github</a></span>(<span class="st">"jefferis/nat@v1.8.6"</span>)</a></code></pre></div>
<p>The same syntax can be used to install any arbitrary version that you want from github. See <code><a href="https://www.rdocumentation.org/packages/devtools/topics/reexports">?install_github</a></code> for details.</p>
<p>Note: Windows users need <a href="https://cran.r-project.org/bin/windows/Rtools/">Rtools</a> to install in this way, but devtools should offer to install this for you if you do not already have it.</p>
</div>
<div id="external-dependencies" class="section level1">
<h1 class="hasAnchor">
<a href="#external-dependencies" class="anchor"></a>External Dependencies</h1>
<p><strong>nat</strong> is self sufficient for core functionality, but the transformation of 3D data using Computational Morphometry Toolkit (CMTK) registrations depends on an external installation of that toolkit. CMTK binaries can be downloaded for Windows, Linux and Mac at <a href="http://www.nitrc.org/projects/cmtk/" class="uri">http://www.nitrc.org/projects/cmtk/</a>. Source code is available from the same site or an unofficial mirror repository at <a href="https://github.com/jefferis/cmtk" class="uri">https://github.com/jefferis/cmtk</a>. We have extensive experience of using CMTK under Linux (where we compile from source) and Mac (where we compile or use the MacOSX-10.6-x86_64.dmg binary installers). We have also used <a href="http://neuro.debian.net/pkgs/cmtk.html">neurodebian</a> to install as part of the Travis continuous integration setup (see the project’s <a href="https://github.com/jefferis/nat/blob/master/.travis.yml">.travis.yml</a> file).</p>
<div id="cmtknat-on-windows" class="section level2">
<h2 class="hasAnchor">
<a href="#cmtknat-on-windows" class="anchor"></a>CMTK+nat on Windows</h2>
<p>We have much less experience using CMTK on Windows than on Mac/Linux platforms. Experiments in May 2016 suggest that the best option is to use the cygwin CMTK distribution (cygwin provides a linux like environment). Here are the steps we took:</p>
<ul>
<li>You must ensure that you have at least version <a href="https://github.com/jefferis/nat/releases/tag/v1.8.5">nat v1.8.5</a>. It is recommended that follow the steps for installing the development version of nat straight from github as described in section <strong>Development version</strong>
</li>
<li>Install <a href="https://www.cygwin.com/">Cygwin</a> accepting the default path <code>C:\cygwin64</code>
</li>
<li>When you run Cygwin’s setup.exe, you should also install all <em>fftw3</em> packages. (fftw3 is a CMTK dependency which provides fast Fourier transform functions)</li>
<li>Download <code>CMTK-3.3.1-CYGWIN-x86_64.tar.gz</code> to the cygwin folder (<code>C:\cygwin64</code>)</li>
<li>Start a Cygwin terminal and go to the root directory with the command <code>cd /</code> (this is the same place as <code>C:\cygwin64</code> in the Windows file system).</li>
<li>On the Terminal, issue the following command <code>tar -xvf CMTK-3.3.1-CYGWIN-x86_64.tar.gz</code> to extract CMTK to the cygwin folder.</li>
<li>Optionally add <code>C:\cygwin64\bin</code> to your windows path (since v1.8.10 nat should look after this - see ?cmtk.bindir).</li>
<li>The nat function <code><a href="../reference/cmtk.bindir.html">cmtk.bindir()</a></code> should now correctly identify the CMTK binary directory. You can test that the executables are working by trying the following in R <code><a href="https://www.rdocumentation.org/packages/base/topics/library">library(nat);cmtk.dof2mat(version = TRUE)</a></code> which should then respond with “3.3.1” if you have installed the CMTK version we have just mentioned.</li>
</ul>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2 class="hasAnchor">
<a href="#tocnav" class="anchor"></a>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#preface">Preface</a></li>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#basic-installation">Basic Installation</a></li>
<li><a href="#development-version">Development version</a></li>
<li>
<a href="#external-dependencies">External Dependencies</a><ul class="nav nav-pills nav-stacked">
<li><a href="#cmtknat-on-windows">CMTK+nat on Windows</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<footer><div class="copyright">
<p>Developed by Gregory Jefferis, James Manton.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
</div>
</footer>
</div>
</body>
</html>