-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApptainer_Qiime2_NRCan_DEV.recipe
executable file
·113 lines (100 loc) · 3.63 KB
/
Apptainer_Qiime2_NRCan_DEV.recipe
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
Bootstrap: docker
From: quay.io/qiime2/core:2023.5
%files
/usr/local/share/ca-certificates/NRCAN-Root-2019-B64.crt /usr/local/share/ca-certificates/NRCAN-Root-2019-B64.crt
%labels
Qiime2_Author Bolyen,Evan et al
NRCan_Image_Maintainer Patrick Gagne
Maintainer_Email [email protected]
%help
This container is a standardised setup for Qiime2
It includes various programs needed at NRCan
%post
apt update --allow-releaseinfo-change
apt install -y --no-install-recommends software-properties-common apt-utils
apt update
apt install -y --no-install-recommends \
ca-certificates \
nano \
git \
gnupg \
build-essential \
zlib1g \
zlib1g-dev \
less
# Uncomment to install Firefox on container
#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6DCF7707EBC211F
#apt-add-repository "deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu focal main"
#apt update
#apt install -y --no-install-recommends firefox
update-ca-certificates
# Install FUNGuild (Patrick Gagne's version for Q2Pipe)
mkdir /download
cd /download
git clone https://github.com/Patg13/FUNGuild.git
cd FUNGuild
cp Guilds_v1.1.py /usr/bin
chmod 755 /usr/bin/Guilds_v1.1.py
cd /
rm -rf /download
# Install Q2Pipe Dependencies (from NRCan/Q2pipe public repo)
mkdir /download
cd /download
git clone https://github.com/Patg13/Q2Pipe_Deps.git
#git clone https://github.com/NRCan/Q2Pipe.git
cd Q2Pipe_Deps
cp ASV_Table_DNA_Merger.py /usr/bin
chmod 755 /usr/bin/ASV_Table_DNA_Merger.py
cd /
rm -rf /download
#Install Figaro (Trimming value assessment software)
cd /opt
#git clone https://github.com/Zymo-Research/figaro.git
git clone https://github.com/Patg13/figaro.git
chmod 755 figaro -R
cd /opt/figaro
# Figaro requirements already met by Qiime setup
pip3 install -r requirements.txt
sed -i '1i #!/usr/bin/env python3' /opt/figaro/figaro/figaro.py
ln -s /opt/figaro/figaro/figaro.py /usr/bin/figaro
#Install Falco (quality assessment tool) stable release (forked from smithlabcode/falco)
cd /opt
#git clone https://github.com/Patg13/falco.git
falco_version=1.2.2_MTT
#wget --no-check-certificate https://github.com/smithlabcode/falco/releases/download/v1.2.1/falco-"$falco_version".tar.gz
wget --no-check-certificate https://github.com/Patg13/falco/releases/download/"$falco_version"/falco-"$falco_version".tar.gz
tar -zxvf falco-"$falco_version".tar.gz
cd falco
./configure CXXFLAGS="-O3 -Wall"
make all
make install
#Install Falco (quality assessment tool) from source (forked from smithlabcode/falco)
#cd /opt
#git clone https://github.com/Patg13/falco.git
#cd falco
#make all
#make install
cd Configuration
analysis="duplication:1 kmer:1 n_content:0 overrepresented:1 quality_base:0 sequence:1 gc_sequence:1 quality_sequence:0 tile:0 sequence_length:0 adapter:0"
for i in $analysis
do
var=$( echo $i | awk -F':' '{ print $1 }' )
choice=$( echo $i | awk -F':' '{ print $2 }' )
line=$( grep -wn "^$var" limits.txt | grep "ignore" | awk -F':' '{ print $1 }' )
if [ $choice -eq 0 ]
then
sed -i ""$line"s/1/0/" limits.txt
fi
if [ $choice -eq 1 ]
then
sed -i ""$line"s/0/1/" limits.txt
fi
done
# ITSxpress plugin setup
pip install q2-itsxpress
qiime dev refresh-cache
# NRCan Certificate Cleanup
rm /usr/local/share/ca-certificates/NRCAN-Root-2019-B64.crt
update-ca-certificates
%runscript
qiime