-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsingularity.def
87 lines (72 loc) · 2.81 KB
/
singularity.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
bootstrap: docker
From: predector/predector-base:1.2.7
%labels
Author "[email protected]"
Version "1.2.7"
%help
A containter will all dependencies for the predector pipeline.
%setup
set +x
ANY_WAS_UNSET=false
[ -z "${SIGNALP3:-}" ] && ANY_WAS_UNSET=true
[ -z "${SIGNALP4:-}" ] && ANY_WAS_UNSET=true
[ -z "${SIGNALP5:-}" ] && ANY_WAS_UNSET=true
#[ -z "${SIGNALP6:-}" ] && ANY_WAS_UNSET=true
[ -z "${TARGETP2:-}" ] && ANY_WAS_UNSET=true
[ -z "${DEEPLOC:-}" ] && ANY_WAS_UNSET=true
[ -z "${PHOBIUS:-}" ] && ANY_WAS_UNSET=true
[ -z "${TMHMM:-}" ] && ANY_WAS_UNSET=true
if [ "${ANY_WAS_UNSET}" = "true" ]
then
echo "One or more of the required variables was not set." 1>&2
echo "Please provide the variables:" 1>&2
echo -e "- SIGNALP3\n- SIGNALP4\n- SIGNALP5\n- SIGNALP6\n- TARGETP2\n- DEEPLOC\n- PHOBIUS\n- TMHMM" 1>&2
exit 1
fi
mkdir -p "${SINGULARITY_ROOTFS}/onbuild"
cp "${SIGNALP3}" "${SINGULARITY_ROOTFS}/onbuild/"
cp "${SIGNALP4}" "${SINGULARITY_ROOTFS}/onbuild/"
cp "${SIGNALP5}" "${SINGULARITY_ROOTFS}/onbuild/"
cp "${TARGETP2}" "${SINGULARITY_ROOTFS}/onbuild/"
cp "${DEEPLOC}" "${SINGULARITY_ROOTFS}/onbuild/"
cp "${PHOBIUS}" "${SINGULARITY_ROOTFS}/onbuild/"
cp "${TMHMM}" "${SINGULARITY_ROOTFS}/onbuild/"
if [ ! -z "${SIGNALP6:-}" ]
then
cp "${SIGNALP6}" "${SINGULARITY_ROOTFS}/onbuild/"
fi
echo export SIGNALP3="${SIGNALP3:-}" > "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
echo export SIGNALP4="${SIGNALP4:-}" >> "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
echo export SIGNALP5="${SIGNALP5:-}" >> "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
echo export SIGNALP6="${SIGNALP6:-}" >> "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
echo export TARGETP2="${TARGETP2:-}" >> "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
echo export DEEPLOC="${DEEPLOC:-}" >> "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
echo export PHOBIUS="${PHOBIUS:-}" >> "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
echo export TMHMM="${TMHMM:-}" >> "${SINGULARITY_ROOTFS}/onbuild/prenv.sh"
%post
set +x
ls /
ls /onbuild
. /onbuild/prenv.sh
. /.singularity.d/env/10-docker2singularity.sh
echo
signalp3-register "/onbuild/$(basename "${SIGNALP3}")"
echo
signalp4-register "/onbuild/$(basename "${SIGNALP4}")"
echo
signalp5-register "/onbuild/$(basename "${SIGNALP5}")"
echo
if [ ! -z ${SIGNALP6:-} ]
then
signalp6-register "/onbuild/$(basename "${SIGNALP6}")"
echo
fi
targetp2-register "/onbuild/$(basename "${TARGETP2}")"
echo
deeploc-register "/onbuild/$(basename "${DEEPLOC}")"
echo
phobius-register "/onbuild/$(basename "${PHOBIUS}")"
echo
tmhmm2-register "/onbuild/$(basename "${TMHMM}")"
echo
rm -rf -- /onbuild