-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile.salmon
65 lines (51 loc) · 2.27 KB
/
Dockerfile.salmon
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
ARG DOCKERHUB_REPO
ARG SYSTEM_VERSION
FROM $DOCKERHUB_REPO/dr_base:$SYSTEM_VERSION
# Fail in case of an error at any stage in the pipe.
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /home/user
COPY workers/R/dependencies/salmon/renv.lock .
COPY common/R/renv_load.R renv_load_salmon.R
RUN Rscript renv_load_salmon.R
COPY workers/data_refinery_workers/processors/requirements.txt .
RUN pip3 install --ignore-installed --no-cache-dir -r requirements.txt
# Install Salmon
# Tximport requires all experiments to be processed with the same version of
# Salmon to work https://github.com/AlexsLemonade/refinebio/issues/1496.
# This is something that should be considered when updating salmon, because
# all samples from incomplete experiments must have salmon run on them again.
ENV SALMON_VERSION=0.13.1
# On version 0.13.1 salmon was being extracted to a folder with an all
# lowercase name the options `-C` and `--strip-components` allow us to specify
#the name for the resulting file.
RUN <<EOF
wget -q "https://github.com/COMBINE-lab/salmon/releases/download/v${SALMON_VERSION}/Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz"
mkdir "Salmon-${SALMON_VERSION}_linux_x86_64"
tar -xzf "Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz" -C "Salmon-${SALMON_VERSION}_linux_x86_64" --strip-components 1
ln -sf "$(pwd)/Salmon-${SALMON_VERSION}_linux_x86_64/bin/salmon" /usr/local/bin/
rm "Salmon-${SALMON_VERSION}_linux_x86_64.tar.gz"
EOF
# End Salmon installation.
ENV SRA_VERSION=2.9.1
# Install SalmonTools.
RUN <<EOF
git clone https://github.com/COMBINE-lab/SalmonTools.git
cd SalmonTools
git checkout 3e6654c2c10a5225498b623056993947fa688afc
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local
make install
rm -rf SalmonTools
wget -q "https://ftp.ncbi.nlm.nih.gov/sra/sdk/${SRA_VERSION}/sratoolkit.${SRA_VERSION}-ubuntu64.tar.gz"
tar zxfv "sratoolkit.${SRA_VERSION}-ubuntu64.tar.gz" && \
cp -r "sratoolkit.${SRA_VERSION}-ubuntu64/bin/"* /usr/bin && \
rm "sratoolkit.${SRA_VERSION}-ubuntu64.tar.gz"
EOF
# Get the latest version from the dist directory.
COPY common/dist/data-refinery-common-* common/
RUN pip3 install --ignore-installed --no-cache-dir common/$(ls common -1 | sort --version-sort | tail -1)
COPY .boto .boto
COPY workers/ .
RUN rm -rf /root/.cache/*
ENV SYSTEM_VERSION=$SYSTEM_VERSION
USER user
ENTRYPOINT []