-
Notifications
You must be signed in to change notification settings - Fork 6
/
Singularity.Imputation_deb913
213 lines (173 loc) · 7.25 KB
/
Singularity.Imputation_deb913
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
206
207
208
209
210
211
212
213
Bootstrap: docker
From: debian:9.13
%environment
export PATH=/opt/plink2:/opt/plink:/opt:/usr/games:/opt/conda/envs/py36/bin:/opt/conda/bin:/opt/ancestry_viz:/opt/Eagle_v2.4.1:/opt/Minimac4:/opt/GenotypeHarmonizer-1.4.23:/opt/picard/build/libs:$PATH
export PYTHONPATH=/opt/conda/envs/py36/lib/python3.6/site-packages/
export BCFTOOLS_PLUGINS=/opt/bcftools-1.10.2/plugins
export LC_ALL=C
alias python=python3
%post
#!/bin/bash
eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)"
export PATH=/opt/conda/bin/:$PATH
apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates curl git && apt-get clean && rm -rf /var/lib/apt/lists/*
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh -O /home/miniconda.sh && /bin/bash /home/miniconda.sh -b -p /opt/conda && rm /home/miniconda.sh && /opt/conda/bin/conda clean -tipsy && ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && echo ". /opt/conda/etc/profile.d/conda.sh" >> /home/.bashrc && echo "conda activate base" >> /home/.bashrc
apt update
yes | apt upgrade
yes | apt-get install build-essential
apt-get install -y --no-install-recommends apt-utils
gcc --version
apt-get install -y gcc-6 g++-6 gfortran-6 libgfortran-6-dev
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
update-alternatives --config gcc
gcc --version
yes | apt-get install wget
yes | apt-get install curl
apt install -y dirmngr --install-recommends
apt install -y software-properties-common
apt install -y apt-transport-https
add-apt-repository 'deb http://deb.debian.org/debian buster-backports main'
yes | apt-get update
yes | apt-get upgrade
apt install -y ca-certificates gnupg2
apt-key adv --keyserver keyserver.ubuntu.com --recv-key '95C0FAF38DB3CCAD0C080A7BDC78B2DDEABC47B7'
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/debian stretch-cran35/'
apt-get update
apt install -y --allow-unauthenticated r-base
apt install -y r-base-dev
apt-get update
apt-get install -y libv8-dev
apt-get update
apt-get update
mkdir -p /usr/share/man/man1
apt-get install -y openjdk-8-jdk
java -version
yes | /opt/conda/bin/conda create -n py36 python=3.6.8
cd /opt
yes | apt-get install git
/opt/conda/bin/conda init bash
eval "$(conda shell.bash hook)"
conda activate py36
yes | apt-get install libncurses5-dev
yes | apt-get install zlib1g-dev
yes | apt-get install libbz2-dev
yes | apt-get install liblzma-dev
yes | apt-get install zlib1g
yes | apt-get install zlib1g-dev
apt-get install -y pkg-config
apt-get install -y libcurl4-openssl-dev
apt-get install -y graphviz
apt-get install -y graphviz-dev
apt-get install -y libxml2
apt-get install -y libxml2-dev
apt-get install -y bzip2
apt-get install -y libssl-dev
apt-get install -y devscripts
apt-get install -y eigensoft
cd /root
wget https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2.tar.gz
tar -xzf cmake-3.21.2.tar.gz
cd cmake-3.21.2
./configure
make
make install
cmake --version
/opt/conda/envs/py36/bin/pip install setuptools==49.6.0
/opt/conda/envs/py36/bin/pip install pandas
/opt/conda/envs/py36/bin/pip install docopt
/opt/conda/envs/py36/bin/pip install pyfaidx
/opt/conda/envs/py36/bin/pip install snpflip
/opt/conda/envs/py36/bin/pip install ugtm
/opt/conda/envs/py36/bin/pip install scikit-learn
/opt/conda/envs/py36/bin/pip install altair
/opt/conda/envs/py36/bin/pip install matplotlib
/opt/conda/envs/py36/bin/pip install numpy
/opt/conda/envs/py36/bin/pip install CrossMap
/opt/conda/envs/py36/bin/pip install cget
# cp /opt/conda/lib/libstdc++.so.6.0.26 /usr/lib/x86_64-linux-gnu/
# mv /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.bkp
# ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.26 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
R --slave -e 'install.packages("tidyverse", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("ggpubr", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("RColorBrewer", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("cluster", repos = "http://cran.us.r-project.org")'
yes | conda install -c bioconda csvtk
cd /opt
wget https://www.dropbox.com/s/xso2vt3p9h2rh8m/1000G.tar.gz
tar -xzf 1000G.tar.gz
cd /opt
wget https://www.dropbox.com/s/uy9828g1r1jt5xy/ImputationTestDataset_plink.tar.gz
tar -xzf ImputationTestDataset_plink.tar.gz
cd /opt
wget https://www.dropbox.com/s/u8haw4n5t3b8b34/GRCh37_to_GRCh38.chain
cd /opt
wget https://alkesgroup.broadinstitute.org/Eagle/downloads/Eagle_v2.4.1.tar.gz
tar -xzf Eagle_v2.4.1.tar.gz
cd /opt
wget https://github.com/statgen/Minimac4/releases/download/v1.0.2/minimac4-1.0.2-Linux.sh
bash minimac4-1.0.2-Linux.sh --skip-license TRUE
cd /opt
wget https://github.com/molgenis/systemsgenetics/releases/download/1.4.0_20-8.1/GenotypeHarmonizer-1.4.23-dist.tar.gz
tar -xzf GenotypeHarmonizer-1.4.23-dist.tar.gz
cd /opt
ls
git clone https://github.com/vcftools/vcftools.git
cd vcftools
./autogen.sh
./configure
make
make install
cd /opt
wget https://github.com/samtools/htslib/releases/download/1.10.2/htslib-1.10.2.tar.bz2
tar xvfj htslib-1.10.2.tar.bz2
cd htslib-1.10.2
./configure
make
make install
cd /opt
wget https://github.com/samtools/bcftools/releases/download/1.10.2/bcftools-1.10.2.tar.bz2
tar xvfj bcftools-1.10.2.tar.bz2
rm bcftools-1.10.2.tar.bz2
cd bcftools-1.10.2
./configure
make
make install
cd /opt
mkdir plink
cd plink
wget https://s3.amazonaws.com/plink1-assets/plink_linux_x86_64_20210606.zip
unzip plink_linux_x86_64_20210606.zip
cd /opt
mkdir plink2
cd plink2
wget https://s3.amazonaws.com/plink2-assets/plink2_linux_x86_64_20211011.zip
unzip plink2_linux_x86_64_20211011.zip
cd /opt
git clone https://github.com/broadinstitute/picard.git
cd picard/
./gradlew shadowJar
cd /opt
git clone -b v0.0.2 https://github.com/sc-eQTLgen-consortium/WG1-pipeline-QC.git
cd /opt
wget https://www.dropbox.com/s/fvd4pl8no3ngg0l/hg38exonsUCSC.bed
conda clean --all
##############################
# setup scripts for users
##############################
%apphelp setup
This function copies pipeline scripts to the user systems from the Singularity image.
%appenv setup
SCRIPT_DIR=/opt/WG1-pipeline-QC/Imputation
export SCRIPT_DIR
%apprun setup
exec cp -a ${SCRIPT_DIR}/. "$PWD"
%apphelp test_dataset
This function copies pipeline scripts to the user systems from the Singularity image.
%appenv test_dataset
DATASET=/opt/ImputationTestDataset_plink.tar.gz
export DATASET
%apprun test_dataset
exec cp -a ${DATASET} "$PWD"
%labels
Author = Drew Neavin
Image_version = 0.0.2