-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularity.global_fish_genetic_diversity
106 lines (81 loc) · 4.73 KB
/
Singularity.global_fish_genetic_diversity
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
BootStrap: debootstrap
OSVersion: xenial
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
IncludeCmd: yes
Include: bash vim less man-db apt-utils tzdata
%environment
R_VERSION=3.4.4
export R_VERSION
R_CONFIG_DIR=/etc/R/
export R_CONFIG_DIR
export LC_ALL=C
export PATH=/usr/local/bin/julia-1.1.0/bin/:$PATH
%labels
MAINTAINER Pierre-Edouard_GUERIN
INSTITUTE CNRS
TEAM Biogeographie_Ecologie_Vertebres
BUILD 1.1
BUILD_DATE 2019 september 18
SINGULARITY_VERSION 2.5.2
MUSCLE 3.8.31
JULIA 1.1.0
PYTHON 3.5.2
R 3.4.4
%post
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
apt-get update
yes | apt-get install software-properties-common build-essential autoconf autogen libtool wget gcc libssl-dev libblas3 git libpcre3 libpcre3-dev libbz2-dev bzip2 fort77 libreadline-dev gobjc++ gcc-multilib xorg-dev liblzma-dev libblas-dev gfortran autotools-dev automake cmake curl libcurl3 libcurl3-dev grep sed dpkg fuse git zip openjdk-8-jre pkg-config ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 mercurial subversion zlib1g-dev libncurses5-dev libncursesw5-dev texlive texlive-fonts-extra default-jdk libcurl4-openssl-dev
apt-get update
## python3
apt-get install python3
## python3 modules
yes | apt-get install python3-numpy python3-six
yes | apt-get install python3-pip
yes | apt-get update
yes | pip3 install --upgrade argparse numpy ete3
## julia
yes | apt-get install libgmp3-dev libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 g++-4.8 gfortran libgfortran3 m4 libedit-dev liblapack3
wget https://github.com/Grelot/global_fish_genetic_diversity/raw/master/99-utils/julia-1.1.0-linux-x86_64.tar.gz
tar -xvf julia-1.1.0-linux-x86_64.tar.gz
chmod +x julia-1.1.0/bin/julia
mv julia-1.1.0 /usr/local/bin
## julia modules
/usr/local/bin/julia-1.1.0/bin/julia -e 'println("JULIA IS WORKING WELL");'
/usr/local/bin/julia-1.1.0/bin/julia -e 'using Pkg; Pkg.add("DataFrames"); Pkg.add("DelimitedFiles"); Pkg.add("DataFramesMeta"); Pkg.add("StatsBase"); Pkg.add("Statistics"); Pkg.add("CSV");'
## MUSCLE
wget https://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_i86linux64.tar.gz
tar xvf muscle3.8.31_i86linux64.tar.gz
chmod +x muscle3.8.31_i86linux64
mv muscle3.8.31_i86linux64 /usr/local/bin/muscle3
yes | add-apt-repository ppa:ubuntugis/ubuntugis-unstable
apt-get update
yes | apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev libgdal-dev
## R
cd $HOME
wget https://cran.r-project.org/src/base/R-3/R-3.4.4.tar.gz
tar xvf R-3.4.4.tar.gz
cd R-3.4.4
./configure --enable-R-static-lib --with-blas --with-lapack --enable-R-shlib=yes
yes | make
yes | make install
## R CRAN Packages
cd $HOME
R --slave -e "install.packages( 'https://cran.r-project.org/src/contrib/Archive/mvtnorm/mvtnorm_1.0-8.tar.gz', type='source')"
R --slave -e "install.packages( 'https://cran.r-project.org/src/contrib/Archive/plotrix/plotrix_3.7-4.tar.gz', type='source')"
R --slave -e "install.packages( c('carData', 'abind', 'pbkrtest', 'quantreg', 'rio','car','devtools','spdep','sp','raster','rgdal','sf','emmeans','sjstats','sjPlot','gridExtra', 'parallel','maptools','png','plyr','shape','pgirmess','MASS','hier.part','countrycode','ggplot2','lme4','SpatialPack','rfishbase' ),repos='https://cloud.r-project.org' )"
R --slave -e "install.packages( 'https://cran.r-project.org/src/contrib/Archive/car/car_3.0-2.tar.gz', type='source')"
R --slave -e 'install.packages("https://cran.r-project.org/src/contrib/Archive/rgeos/rgeos_0.3-26.tar.gz", type="source")'
%apprun run
exec /bin/bash "$@"
%runscript
echo "ubuntu xenial with R 3.4.4, julia 1.1.0, python 3.5, muscle3 and all required dependencies to reproduce analysis in the paper 'Global determinants of freshwater and marine fish genetic diversity'"