-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApptainer_Qiime2_NRCan.recipe
executable file
·101 lines (89 loc) · 3.28 KB
/
Apptainer_Qiime2_NRCan.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
Bootstrap: docker
From: quay.io/qiime2/core:2023.9
%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
%environment
# DO NOT OVERRIDE THIS, USE BINDING IN APPTAINER COMMAND INSTEAD ( -B /path/to/temp:/tmp )
export TMPDIR=/tmp
%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 \
build-essential \
zlib1g \
zlib1g-dev \
less
# 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
#cd Q2Pipe_Deps
git clone https://github.com/NRCan/Q2Pipe.git
cd Q2Pipe/Dependencies
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 MTT (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"
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
# Adjust the default limits file to make it more appropriate for metabarcoding analysis
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
# NRCan Certificate Cleanup
rm /usr/local/share/ca-certificates/NRCAN-Root-2019-B64.crt
update-ca-certificates
%runscript
qiime --info