-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSingularity
84 lines (59 loc) · 2.49 KB
/
Singularity
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
# The babette R package, with BEAST2 and the BEAST2 NS package installed
Bootstrap: docker
From: rocker/tidyverse
%post
# From https://github.com/brucemoran/Singularity/blob/8eb44591284ffb29056d234c47bf8b1473637805/shub/bases/recipe.CentOs7-R_3.5.2#L21
echo 'export LANG=en_US.UTF-8 LANGUAGE=C LC_ALL=C LC_CTYPE=C LC_COLLATE=C LC_TIME=C LC_MONETARY=C LC_PAPER=C LC_MEASUREMENT=C' >> $SINGULARITY_ENVIRONMENT
sudo apt-get update
sudo apt-get install -qq libcurl4-openssl-dev
apt search openjdk
apt-cache search openjdk-
sudo apt-get install -qq openjdk-21-jre-headless
# sudo apt-get install -qq openjdk-11-jre-headless/now # Does not work anymore
## sudo apt install -qq default-jre
### sudo apt-get install -qq r-cran-rjava # Unknown package
## sudo apt-get install -qq openjdk-13-*
# Fix rJava error
sudo $(which R) CMD javareconf
sudo apt install -qq libfontconfig1-dev
sudo apt install -qq libharfbuzz-dev libfribidi-dev
Rscript -e 'install.packages(c("remotes", "rcmdcheck"))'
Rscript -e 'remotes::install_cran("shiny")'
Rscript -e 'install.packages("devtools")'
Rscript -e 'remotes::install_github("ropensci/beautier", ref = "develop")'
Rscript -e 'remotes::install_github("ropensci/beastier", ref = "develop")'
Rscript -e 'remotes::install_github("richelbilderbeek/beastierinstall")'
Rscript -e 'beastierinstall::install_beast2(folder_name = "/opt/beastier")'
%runscript
echo "'beastier.sif' running with arguments '$@'"
exec "$@"
%test
Rscript -e 'beastier::beastier_report(beast2_folder = "/opt/beastier")'
%help
This container has the R package beastier and the tool BEAST2 installed.
When using this container, set `beast2_folder` to `/opt/beastier`.
To obtain the `beast2_path` use `beastier::get_default_beast2_path`.
For example:
```
library(beastier)
# Folder that contains BEAST2
beast2_folder <- "/opt/beastier"
# Path to the BEAST2 binary/jar file
beast2_path <- get_default_beast2_path(
beast2_folder = beast2_folder
)
# Setup a default BEAST2 run, using the BEAST2 XML file 2_4.xml
beast2_options <- create_beast2_options(
input_filename = get_beastier_path("2_4.xml"),
beast2_path = beast2_path
)
# Run BEAST2
run_beast2_from_options(beast2_options)
```
%labels
AUTHOR Richel J.C. Bilderbeek
NAME beastier
DESCRIPTION The beastier R package, with BEAST2 installed
USAGE send an R script as text to the container via a pipe
URL https://github.com/ropensci/beastier
VERSION 2.4.12