-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity
97 lines (69 loc) · 2.74 KB
/
Singularity
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
# Copyright 2020 [LIPM]
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Bootstrap: docker
From: debian:sid-slim
%files
source/E2P2v4-20221206.tar /opt/
%runscript
exec /usr/local/bin/E2P2 "$@"
%help
Usage: singularity exec $CONTAINER run_pipeline.py
This is an E2P2 container built upon
- E2P2 20221206 master version https://github.com/carnegie/E2P2
- Priam (last java version) (included in E2P2 tarball)
- ncbi-blast-2.12.0+
- python 3
%labels
Maintainer [email protected] & [email protected]
E2P2 : https://github.com/carnegie/E2P2
%post
apt update && \
apt install -y \
procps wget \
openjdk-8-jre \
python3 \
git
mkdir -p /opt
cd /opt
# E2P2 pipeline
mkdir -p /usr/local/bin
tar xf E2P2v4-20221206.tar && rm E2P2v4-20221206.tar
echo '#!/bin/bash\n\npython3 /opt/E2P2/pipeline/run_pipeline.py -b /opt/ncbi-blast-2.12.0+/bin/blastp -bb /opt/ncbi-blast-2.12.0+/bin/ -j java -ps /opt/PRIAM/PRIAM_search.jar -r /opt/data/E2P2/blastdb/rpsd-4.2.fasta -pp /opt/data/E2P2/profiles $@' >> /usr/local/bin/E2P2 && chmod +x /usr/local/bin/E2P2
# blast+ binaries
wget -O /opt/ncbi-blast-2.12.0+-x64-linux.tar.gz ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.12.0/ncbi-blast-2.12.0+-x64-linux.tar.gz
tar xvf ncbi-blast-2.12.0+-x64-linux.tar.gz
rm -f /opt/ncbi-blast-2.12.0+-x64-linux.tar.gz
# E2P2 data
mkdir -p /opt/data/E2P2
cd /opt/data/E2P2
wget https://ftp.dpb.carnegiescience.edu/rpsd/release_2019-03-07/blastdb.tar.gz
wget https://ftp.dpb.carnegiescience.edu/rpsd/release_2019-03-07/profiles.tar.gz
wget https://ftp.dpb.carnegiescience.edu/rpsd/release_2019-03-07/maps.tar.gz
wget https://ftp.dpb.carnegiescience.edu/rpsd/release_2019-03-07/weights.tar.gz
tar zxvf blastdb.tar.gz
tar zxvf profiles.tar.gz
tar zxvf maps.tar.gz
tar zxvf weights.tar.gz
rm -f *.tar.gz
rm -rf /opt/E2P2/data/*
mv maps weights /opt/E2P2/data
# PRIAM program
mkdir -p /opt/PRIAM
cd /opt/PRIAM
mv /opt/E2P2/PRIAM_search.jar .
mkdir /opt/run
chmod -R 755 /opt/run
apt clean && apt autoremove && apt purge
%environment
export LC_ALL=C
export HOME=/opt/run
export PATH=/opt/E2P2/pipeline:$PATH
cd $HOME