-
Notifications
You must be signed in to change notification settings - Fork 1
/
singu_def.def
167 lines (130 loc) · 5.43 KB
/
singu_def.def
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
BootStrap: docker
From: ubuntu:focal
%setup
mkdir ${SINGULARITY_ROOTFS}/setup_files
rsync -a analysis/scripts/ ${SINGULARITY_ROOTFS}/nesting_paper_scripts
%files
container/pyrequirements.txt /setup_files
container/Rpacks.R /setup_files
%post
export DEBIAN_FRONTEND=noninteractive
# essentials
apt-get update
apt-get install -y \
build-essential \
automake \
cmake \
git \
pkg-config \
python3.8 \
python3-pip \
r-base \
qt5-default \
wget \
zlib1g-dev
# python requirements of repo
pip3 install pip==20.0.2
pip3 install -r /setup_files/pyrequirements.txt
pip3 install -e /nesting_paper_scripts
# R requirements of repo
Rscript /setup_files/Rpacks.R
## For downloading data from ENA
git clone https://github.com/enasequence/enaBrowserTools
cp -r enaBrowserTools/python3/* /usr/bin
rm -r enaBrowserTools
## seqtk (fasta/q manipulation)
cd ${HOME}
git clone https://github.com/lh3/seqtk
cd seqtk && make
cp seqtk /usr/bin && cd .. && rm -r seqtk
## art_ilmn (read simulation)
cd ${HOME}
apt-get install -y libgsl-dev
ln -sf /usr/lib/x86_64-linux-gnu/libgsl.so /usr/lib/x86_64-linux-gnu/libgsl.so.0
wget -qO - https://www.niehs.nih.gov/research/resources/assets/docs/artsrcmountrainier2016.06.05linux.tgz | tar xz
cp art_src_MountRainier_Linux/art_illumina /usr/bin/ && rm -r art_src_MountRainier_Linux
## samtools & bcftools
cd ${HOME}
apt-get install -y libncurses5-dev libbz2-dev liblzma-dev tabix
wget -qO - https://github.com/samtools/samtools/releases/download/1.10/samtools-1.10.tar.bz2 | tar -xj
cd samtools-1.10 && ./configure && make && make install && cd .. && rm -r samtools-1.10
cd ${HOME}
wget -qO - https://github.com/samtools/bcftools/releases/download/1.10.2/bcftools-1.10.2.tar.bz2 | tar -xj
cd bcftools-1.10.2 && ./configure && make && make install && cd .. && rm -r bcftools-1.10.2
## bedtools
cd ${HOME}
wget -O /usr/bin/bedtools https://github.com/arq5x/bedtools2/releases/download/v2.29.2/bedtools.static.binary && chmod a+x /usr/bin/bedtools
## mafft (multiple seq alignments)
cd ${HOME}
wget https://mafft.cbrc.jp/alignment/software/mafft_7.471-1_amd64.deb -O mafft && dpkg -i mafft && rm mafft
## RAxML (phylo trees)
cd ${HOME}
git clone https://github.com/stamatak/standard-RAxML && cd standard-RAxML && make -j 2 -f Makefile.PTHREADS.gcc
cp raxmlHPC-PTHREADS /usr/bin/
## bowtie2 (read to genome alignment)
cd ${HOME}
wget https://github.com/BenLangmead/bowtie2/releases/download/v2.4.1/bowtie2-2.4.1-linux-x86_64.zip
unzip bowtie2-2.4.1-linux-x86_64.zip
cp bowtie2-2.4.1-linux-x86_64/bowtie* /usr/bin/ && rm -r bowtie2-2.4.1-linux-x86_64*
## bwa (read to genome alignment)
cd ${HOME}
wget -qO- https://github.com/lh3/bwa/releases/download/v0.7.17/bwa-0.7.17.tar.bz2 | tar -xj && cd bwa-0.7.17 && make && cp bwa /usr/bin
cd .. && rm -r bwa-0.7.17
## minimap2/paftools (assembly to ref alignment)
cd ${HOME}
wget -qO - https://github.com/lh3/minimap2/releases/download/v2.17/minimap2-2.17_x64-linux.tar.bz2 | tar -xj --no-same-owner
cd minimap2-2.17_x64-linux && cp minimap2 paftools.js k8 /usr/bin && cd .. && rm -r minimap2-2.17_x64-linux
## vg (genome graph toolkit)
wget -O /usr/bin/vg https://github.com/vgteam/vg/releases/download/v1.26.0/vg && chmod a+x /usr/bin/vg
## graphtyper2 (genome graph toolkit)
wget -O /usr/bin/graphtyper https://github.com/DecodeGenetics/graphtyper/releases/download/v2.5.1/graphtyper && chmod a+x /usr/bin/graphtyper
## make_prg (genome graph construction)
cd ${HOME}
git clone https://github.com/rmcolq/make_prg.git
cd make_prg && git checkout 2d7557a0724b4e6e9c3328ac3381318a5b994144
pip3 install . && cd .. && rm -r make_prg
## varifier
# varifier dependencies
cd ${HOME}
wget https://github.com/mummer4/mummer/releases/download/v4.0.0rc1/mummer-4.0.0rc1.tar.gz
tar xf mummer-4.0.0rc1.tar.gz
rm mummer-4.0.0rc1.tar.gz && cd mummer-4.0.0rc1 && ./configure
make && make install
# enable linking to mummer shared lib
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
cd .. && rm -r mummer-4.0.0rc1
apt-get install -y libvcflib-tools libcurl4-gnutls-dev libssl-dev
git clone https://github.com/atks/vt.git vt-git
cd vt-git
git checkout 2187ff6347086e38f71bd9f8ca622cd7dcfbb40c
make
cd .. && cp vt-git/vt /usr/local/bin/ && rm -r vt-git
cd ${HOME}
git clone https://github.com/iqbal-lab-org/varifier
cd varifier && git checkout 4deeb41cf9c192bdb02ef77a89841f41ea42ed37
pip3 install .
cd .. && rm -r varifier
#/*************/
#/* gramtools */
#/*************/
# cortex install. requires py2.7 and python API from source
apt-get install -y python python-dev
git clone https://github.com/iqbal-lab-org/py-cortex-api
cd py-cortex-api && git checkout c94adc29ebd4f5e82640f9e8ff008349eec2d8cb && python3 setup.py install && cd .. && rm -r py-cortex-api
cd ${HOME}
git clone https://github.com/iqbal-lab-org/gramtools
cd gramtools
git checkout 124321a0bba95116589b3697dcd86f6601c3af42
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=REL_WITH_ASSERTS
make -j 4 gram encode_prg combine_jvcfs
cp ../libgramtools/submods/encode_prg.bin /usr/bin/encode_prg
cp ../libgramtools/submods/combine_jvcfs.bin /usr/bin/combine_jvcfs
pip3 install -e ..
cd .. && rm -r build # Do not delete the gramtools directory itself
%environment
export LC_ALL=C
%labels
Author Brice Letcher