/
a1_install_binary_files.Rmd
108 lines (81 loc) · 3.66 KB
/
a1_install_binary_files.Rmd
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
---
title: "1. Installation of the binary files"
author: "Maxime Lenormand, Boris Leroy and Pierre Denelle"
date: "`r Sys.Date()`"
output:
html_vignette:
number_sections: false
html_document:
toc: true
toc_float:
collapsed: false
smooth_scroll: false
toc_depth: 2
vignette: >
%\VignetteIndexEntry{1. Installation of the binary files}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
bibliography: '`r system.file("REFERENCES.bib", package="bioregion")`'
---
Some functions (listed below) or at least part of them require binary
files to run.
* [netclu_infomap](https://bioRgeo.github.io/bioregion/reference/netclu_infomap.html)
* [netclu_louvain](https://bioRgeo.github.io/bioregion/reference/netclu_louvain.html) (Cpp version)
* [netclu_oslom](https://bioRgeo.github.io/bioregion/reference/netclu_oslom.html)
The function [install_binaries](https://bioRgeo.github.io/bioregion/reference/install_binaries.html)
downloads and unzips the `bin` folder needed to run these functions. It also
checks if the files have the permissions to be executed as programs. It finally
tests if the binary files are running properly.
### Run install_binaries()
The function [install_binaries](https://bioRgeo.github.io/bioregion/reference/install_binaries.html)
should be run prior to using
[netclu_infomap](https://bioRgeo.github.io/bioregion/reference/netclu_infomap.html),
the Cpp version of [netclu_louvain](https://bioRgeo.github.io/bioregion/reference/netclu_louvain.html)
and [netclu_oslom](https://bioRgeo.github.io/bioregion/reference/netclu_oslom.html)
as follows.
```{r install_binaries, eval=FALSE}
install_binaries(binpath = "tempdir" , infomap_version = c("2.1.0", "2.6.0"))
```
The function has two parameters. `binpath` indicating the path to the folder
that will host the `bin` folder containing the binary files. By default, the
binary files are installed in R's temporary directory (`binpath = "tempdir"`).
In this case the `bin` folder will be automatically removed at the end of the R
session. Alternatively, the binary files can be installed in the bioregion's
package folder (`binpath = "pkgfolder"`). **Any other folder can be chosen but
in any case PLEASE MAKE SURE to update the binpath argument in
[netclu_infomap](https://bioRgeo.github.io/bioregion/reference/netclu_infomap.html),
[netclu_louvain](https://bioRgeo.github.io/bioregion/reference/netclu_louvain.html)
and [netclu_oslom](https://bioRgeo.github.io/bioregion/reference/netclu_oslom.html)
accordingly.**
The second parameter `infomap_version` indicating the Infomap
version(s) to install. Only the Infomap version 2.1.0 and 2.6.0 are available
for now.
The installation of the binary files is divided into six steps:
#### 1. Download bin.zip
<br>
<center>
<img align="bottom" width="100%" height="100%" src="../man/figures/install_binaries_1.png">
</center>
<br>
#### 2. Unzip bin.zip in the binpath
<br>
<center>
<img align="bottom" width="100%" height="100%" src="../man/figures/install_binaries_2.png">
</center>
<br>
#### 3. Check the permissions, try to change them automatically or propose an iterative process to change them manually
<br>
<center>
<img align="bottom" width="100%" height="100%" src="../man/figures/install_binaries_3.png">
</center>
<br>
#### 4->6. Test that Infomap, Louvain and OSLOM are running properly
<br>
<center>
<img align="bottom" width="100%" height="100%" src="../man/figures/install_binaries_4.png">
</center>
<br>
### Known issues
* The OpenMP versions of Infomap require `libomp-dev` on Ubuntu
(`sudo apt-get install libomp-dev`) and `libomp` on macOS (install [Homebrew](https://brew.sh)
and run `brew install libomp`).