-
Notifications
You must be signed in to change notification settings - Fork 1
/
miracum_pipe.def
90 lines (71 loc) · 2.62 KB
/
miracum_pipe.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
Bootstrap: library
From: debian:10
%files
./MutAna_tools.R
%post
# MIRACUM-Pipe Version
export VERSION=71939bcb80141f9f6a1d85f9d5b4df0c43840caf
# apply updates to baseimage
apt-get update
apt-get install --only-upgrade -y apt base-files debian-archive-keyring libapt-pkg5.0 libgcrypt20 libgnutls30 liblz4-1 libp11-kit0 libsystemd0 libudev1 libzstd1 perl-base
# install git
apt-get install -y --no-install-recommends git ca-certificates wget libcairo2-dev libxt-dev locales-all
# git MIRACUM-Pipe with submodules from GitHub
git clone --recurse-submodules https://github.com/AG-Boerries/MIRACUM-Pipe.git /opt/MIRACUM-Pipe
cd /opt/MIRACUM-Pipe
git checkout $VERSION
# Delete databases, they will be imported using overlay
rm -rf /opt/MIRACUM-Pipe/databases/*
# Call install routines
bash /opt/MIRACUM-Pipe/debian/setup.sh
Rscript /opt/MIRACUM-Pipe/RScripts/install_packages.R
bash /opt/MIRACUM-Pipe/tools/install.sh
# CA Certificates for RCurl
wget https://curl.haxx.se/ca/cacert.pem -O "/usr/local/lib/R/site-library/RCurl/CurlSSL/ca-bundle.crt"
# remove directories that will be replaced by symbolic link
rm /opt/MIRACUM-Pipe/conf/custom.yaml
chmod 777 /opt/MIRACUM-Pipe/conf
rm -rf /opt/MIRACUM-Pipe/assets/*
chmod 777 /opt/MIRACUM-Pipe/assets
rm -rf /opt/MIRACUM-Pipe/databases
chmod 777 /opt/MIRACUM-Pipe
rm -rf /opt/MIRACUM-Pipe/tools/annovar
rm -rf /opt/MIRACUM-Pipe/tools/gatk
chmod 777 /opt/MIRACUM-Pipe/tools
rm /opt/MIRACUM-Pipe/RScripts/MutAna_tools.R
cp /MutAna_tools.R /opt/MIRACUM-Pipe/RScripts/MutAna_tools.R
rm /MutAna_tools.R
rm -rf /opt/MIRACUM-Pipe/tools/fusioncatcher/data
chmod 777 /opt/MIRACUM-Pipe/tools/fusioncatcher
# make sure all scripts are executable
chmod +x /opt/MIRACUM-Pipe/*.sh
# Final cleanup
apt-get remove wget git -y
apt-get clean autoclean
apt-get autoremove --yes
rm -rf /var/lib/{apt,dpkg,cache,log}/
%runscript
echo "preparing container by setting symbolic links:"
echo $INPUTPATH
echo $OUTPUTPATH
echo $REFERENCESPATH
echo $DATABASEPATH
echo $ANNOVARPATH
echo $GATKPATH
echo $FUSIONCATCHERPATH
echo $SCRATCH
# set symbolic links
ln -s $CUSTOMCONFIGFILE /opt/MIRACUM-Pipe/conf/custom.yaml
ln -s $INPUTPATH /opt/MIRACUM-Pipe/assets/input
ln -s $OUTPUTPATH /opt/MIRACUM-Pipe/assets/output
ln -s $REFERENCESPATH /opt/MIRACUM-Pipe/assets/references
ln -s $DATABASEPATH /opt/MIRACUM-Pipe/databases
ln -s $ANNOVARPATH /opt/MIRACUM-Pipe/tools/annovar
ln -s $GATKPATH /opt/MIRACUM-Pipe/tools/gatk
ln -s $FUSIONCATCHERPATH /opt/MIRACUM-Pipe/tools/fusioncatcher/data
ln -s $SCRATCH /myscratch
# start MIRACUM-Pipe with passed arguments
/opt/MIRACUM-Pipe/miracum_pipe.sh $OPTARGS
%labels
Author n.reimer@uni-luebeck.de
Version 1.1