1
1
BootStrap: docker
2
2
From: ubuntu:latest
3
3
4
- #BootStrap: debootstrap
5
- #OSVersion: stable
6
- #MirrorURL: http://ftp.us.debian.org/debian/
4
+ ## ===========================================================
5
+ ## Instructions:
6
+ ## On a Linux (ubuntu) system that has Singularity installed
7
+ ## perform a Singularity Build command with this Singularity
8
+ ## definition file
9
+ ##
10
+ ## Build Command Sandbox Build (interact with folders):
11
+ # sudo singularity build --sandbox Odyssey OdysseyDefF.def
12
+ ## Remove the Sandbox Container: sudo rm -rf Odyssey
13
+ ## Build Command:
14
+ # sudo singularity build Odyssey.sif OdysseyDefF.def
15
+ ## Test Installation Command:
16
+ # singularity exec ./Odyssey snptest -help
17
+ ## ===========================================================
7
18
8
19
%post
9
20
10
21
11
-
12
22
# Install Important OS Programs
13
23
apt update
14
24
apt -y upgrade
@@ -17,70 +27,115 @@ From: ubuntu:latest
17
27
apt -y install unzip
18
28
#apt -y install make
19
29
apt -y install gcc
30
+ apt -y install gnustep-base-runtime
31
+ apt -y install locales
20
32
21
33
22
- # Install R
23
- #export DEBIAN_FRONTEND=noninteractive
34
+ # Export language preferences
35
+ locale-gen en_US.UTF-8
36
+
24
37
export LANG=en_US.UTF-8
25
38
export LC_ALL=en_US.UTF-8
39
+ defaults write org.R-project.R force.LANG en_US.UTF-8
40
+
41
+ # Install R dependencies
26
42
27
43
apt -y install libcurl4-openssl-dev
28
44
apt -y install libudunits2-dev
29
45
apt -y install libssl-dev
30
46
apt -y install libxml2-dev
47
+ apt -y install xorg
48
+ apt -y install libx11-dev
49
+ apt -y install libcairo2-dev
50
+ apt -y install libmagick++-dev
51
+
52
+
53
+
54
+ # Install R itself
55
+
31
56
apt -y install r-base
32
57
apt -y install libopenblas-base
33
58
34
- #defaults write org.R-project.R force.LANG en_US.UTF-8
35
59
36
60
# Install R Packages
37
61
38
- Rscript -e "install.packages('data.table', dependencies=T, repos='https://cran.cnr.berkeley.edu/')"
39
- Rscript -e "install.packages('tidyverse', dependencies=T, repos='https://cran.cnr.berkeley.edu/')"
40
- Rscript -e "install.packages('qqman', dependencies=T, repos='https://cran.cnr.berkeley.edu/')"
41
- Rscript -e "install.packages('manhattanly', dependencies=T, repos='https://cran.cnr.berkeley.edu/')"
62
+ #Rscript -e "install.packages(c('rgl', 'gdtools'), dependencies=T, repos='https://cran.cnr.berkeley.edu/')"
63
+
64
+ Rscript -e "install.packages(c('data.table','tidyverse','qqman', 'manhattanly','scales','ggplot2','car', 'MASS','gridExtra', 'rcompanion'), dependencies=T, repos='https://cran.cnr.berkeley.edu/')"
42
65
#Rscript -e "install.packages('openssl', dependencies=T, repos='https://cran.cnr.berkeley.edu/')"
43
66
44
-
67
+
45
68
# Tidy Up Apt-get package manager
69
+
46
70
apt-get clean
47
71
48
72
49
-
50
- # Install Plink (to /usr/local/bin/)
73
+ # Install Plink2 (to /usr/local/bin/)
74
+
75
+ # Download from site
76
+ wget --output-document=/usr/local/bin/Plink2.zip http://s3.amazonaws.com/plink2-assets/plink2_linux_x86_64_20190102.zip
51
77
52
- wget --output-document=/usr/local/bin/Plink2.zip http://s3.amazonaws.com/plink2-assets/plink2_linux_x86_64_20181028.zip
78
+ # Unpack
53
79
unzip /usr/local/bin/Plink2.zip -d /usr/local/bin/
80
+
81
+ # Remove the installation Clutter
54
82
rm /usr/local/bin/Plink2.zip
55
83
56
84
85
+ # Install SNPTEST (to /usr/local/bin/)
86
+
87
+ # Download from site
88
+ wget --output-document=/usr/local/bin/SNPTEST.tgz http://www.well.ox.ac.uk/~gav/resources/snptest_v2.5.4-beta3_linux_x86_64_dynamic.tgz
89
+
90
+ # Unpack
91
+ tar -xvzf /usr/local/bin/SNPTEST.tgz -C /usr/local/bin/
92
+
93
+ # Set the stupid permission
94
+ chmod -R 775 /usr/local/bin/snptest_v2.5.4-beta3_linux_x86_64_dynamic/
95
+
96
+ # Move executable to PATH directory
97
+ mv /usr/local/bin/snptest_v2.5.4-beta3_linux_x86_64_dynamic/snptest_v2.5.4-beta3 /usr/local/bin/snptest
98
+
99
+ # Remove the installation Clutter
100
+ rm /usr/local/bin/SNPTEST.tgz
101
+
102
+
57
103
# Install Miniconda (to /usr/local/bin/)
104
+ # Download from site
58
105
wget --output-document=/usr/local/bin/MinicondaSetup.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
106
+
107
+ # Congigure
59
108
bash /usr/local/bin/MinicondaSetup.sh -b -p /usr/local/bin/miniconda
109
+
110
+ # Remove the installation Clutter
60
111
rm /usr/local/bin/MinicondaSetup.sh
61
112
62
113
# Temporary export Miniconda exec path to PATH to finish installation via miniconda
63
114
64
115
export PATH=/usr/local/bin/miniconda/bin:$PATH
65
116
117
+
66
118
# Setup Miniconda for Bioconda
67
119
68
120
conda config --add channels defaults
69
121
conda config --add channels bioconda
70
122
conda config --add channels conda-forge
71
123
#conda config --add channels r
72
124
125
+
73
126
# Install Odyssey Dependencies via Bioconda
74
127
75
128
conda update conda
76
129
conda install -y htslib
77
130
conda install -y bcftools
78
131
conda install -y plink
79
132
conda install -y shapeit
133
+ conda install -y impute2
80
134
#conda install -y R
81
135
82
136
83
137
%environment
138
+
84
139
export PATH=/usr/local/bin/miniconda/bin:$PATH
85
140
export LANG=en_US.UTF-8
86
141
export LC_ALL=en_US.UTF-8
0 commit comments