Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions bin/download_m5nr_blast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# set a default values
# m5nr blast files - 2.6 GB & 11.7 GB
M5NR_VERSIONS="20100309 20131215"
TARGET="/m5nr"

for i in $M5NR_VERSIONS; do
M5NR_VERSION=$i
VERSION_DIR=$TARGET/$M5NR_VERSION
URL=ftp://ftp.metagenomics.anl.gov/data/MD5nr/${M5NR_VERSION}/md5nr.blast.tgz

echo ""
echo "TARGET = $TARGET"
echo "M5NR_VERSION = $M5NR_VERSION"
echo "URL = $URL"
echo ""

if [ -d ${VERSION_DIR} ]; then
echo "Files already exist, not downloading"
else
echo "Downloading files"
mkdir -p ${VERSION_DIR}
curl -s "${URL}" | tar -zxvf - -C ${VERSION_DIR}
fi
done
exit 0
22 changes: 7 additions & 15 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && apt-get install -y \
git-core \
libpq-dev \
make \
wget \
curl \
perl-modules \
liburi-perl \
libwww-perl \
Expand Down Expand Up @@ -48,21 +48,13 @@ RUN mkdir -p /sites/1/ && \
ln -s /MG-RAST/

# Configuration in mounted directory
RUN cd /MG-RAST/conf && ln -s /api-server/Conf.pm && \
cd /pipeline/conf && ln -s /api-server/PipelineAWE_Conf.pm
RUN cd /MG-RAST/conf && ln -s /api-server/conf/Conf.pm && \
cd /pipeline/conf && ln -s /api-server/conf/PipelineAWE_Conf.pm

# m5nr blast files - 2.6 GB & 11.7 GB
RUN mkdir -p /m5nr/20100309 && \
cd /m5nr/20100309 && \
wget ftp://ftp.metagenomics.anl.gov/data/MD5nr/20100309/md5nr.blast.tgz && \
tar zxvf md5nr.blast.tgz && \
rm md5nr.blast.tgz

RUN mkdir -p /m5nr/20131215 && \
cd /m5nr/20131215 && \
wget ftp://ftp.metagenomics.anl.gov/data/MD5nr/20131215/md5nr.blast.tgz && \
tar zxvf md5nr.blast.tgz && \
rm md5nr.blast.tgz
# m5nr blast files in mounted dir
RUN mkdir -p /m5nr && \
ln -s /api-server/data/20100309 /m5nr/20100309 && \
ln -s /api-server/data/20131215 /m5nr/20131215

# Execute:
# /usr/local/apache2/bin/httpd -DFOREGROUND -f /MG-RAST/conf/httpd.conf