-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingularity.def
More file actions
97 lines (86 loc) · 3.41 KB
/
Copy pathsingularity.def
File metadata and controls
97 lines (86 loc) · 3.41 KB
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
BootStrap: docker
From: ubuntu:20.04
Stage: 0
%environment
export DEBIAN_FRONTEND=noninteractive
export SAMTOOLS_VERSION=1.19
export BCFTOOLS_VERSION=1.19
export JAVA_HOME=/usr/lib/jvm/temurin-20-jdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
export VCFANNO_VERSION=v0.3.6
%post
export DEBIAN_FRONTEND=noninteractive
export SAMTOOLS_VERSION=1.19
export BCFTOOLS_VERSION=1.19
export APT_LISTCHANGES_FRONTEND=none
export VCFANNO_VERSION=v0.3.6
# Disable privilege dropping for apt
echo 'APT::Sandbox::User "root";' > /etc/apt/apt.conf.d/90sandbox
apt-get -qqy update --fix-missing
apt-get -qqy dist-upgrade
apt-get -qqy install --no-install-recommends \
ca-certificates \
libbz2-dev \
libcurl4-openssl-dev \
liblzma-dev \
libncurses5-dev \
libssl-dev \
autoconf \
automake \
bzip2 \
gcc \
g++ \
make \
wget \
git \
zlib1g-dev \
gnupg \
software-properties-common
# Install vcfanno
wget https://github.com/brentp/vcfanno/releases/download/${VCFANNO_VERSION}/vcfanno_linux64
chmod +x ./vcfanno_linux64
cp vcfanno_linux64 /usr/local/bin/vcfanno
# Install Java 20
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | apt-key add -
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
apt-get -qqy update
apt-get -qqy install --no-install-recommends temurin-20-jdk
# Install SAMtools
wget https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2
tar xjf samtools-${SAMTOOLS_VERSION}.tar.bz2
cd samtools-${SAMTOOLS_VERSION}
./configure --without-curses
make -s all all-htslib
make install install-htslib
cd /
rm -rf samtools-${SAMTOOLS_VERSION}*
# Install BCFtools (matching SAMtools version)
wget https://github.com/samtools/bcftools/releases/download/${BCFTOOLS_VERSION}/bcftools-${BCFTOOLS_VERSION}.tar.bz2
tar xjf bcftools-${BCFTOOLS_VERSION}.tar.bz2
cd bcftools-${BCFTOOLS_VERSION}
./configure --without-curses
make -s
make install
cd /
rm -rf bcftools-${BCFTOOLS_VERSION}*
# Clone and compile vt
git clone https://github.com/atks/vt.git
cd vt
git submodule update --init --recursive
make
# Install vt binary to system path
cp vt /usr/local/bin/
cd /
rm -rf vt
# Clean up
apt-get -qqy purge autoconf automake bzip2 gcc g++ make wget git libssl-dev
apt-get -qqy clean
apt-get -qqy autoremove
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /usr/share/man/?? /usr/share/man/??_*
find /tmp -name "*.tar.*" -delete 2>/dev/null || true
find /tmp -name "*.log" -delete 2>/dev/null || true
%test
samtools --help
bcftools --help
# Can't run this because it exits with nonzero status, but it works
# vcfanno