Last active
March 8, 2018 00:06
-
-
Save indraniel/599147e16240b9ed633ac250f60ef4cd to your computer and use it in GitHub Desktop.
Dockerfile to install MEDUSA (A Genome Assembler)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !#/bin/bash | |
| #apt-get update && apt-get dist-upgrade -y && apt-get install -y --no-install-recommends libnss-sss && apt-get clean all | |
| # install python, bio-python, networkx, numpy and git (needed for Medusa) | |
| apt-get update -qq | |
| apt-get -y install git | |
| apt-get -y install python python-biopython python-networkx python-numpy | |
| # To install JAVA 8 | |
| apt-get install -y software-properties-common python-software-properties | |
| add-apt-repository -y ppa:webupd8team/java | |
| apt-get update | |
| echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
| echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | |
| apt-get install -y oracle-java8-installer | |
| # to install ant | |
| apt-get install -y ant | |
| # download, install, and compile Medusa | |
| cd /build | |
| git clone https://github.com/combogenomics/medusa.git | |
| cd medusa | |
| ant | |
| mkdir -p /usr/local/share/jars | |
| cp -v medusa.jar /usr/local/share/jars | |
| cp -v medusa_scripts/length_filterer.py /usr/local/bin | |
| cp -v medusa_scripts/mmrBatch.sh /usr/local/bin | |
| cp -v medusa_scripts/mummerRunner.sh /usr/local/bin | |
| cp -v medusa_scripts/mummer_parser.py /usr/local/bin | |
| cp -v medusa_scripts/netcon_mummer.py /usr/local/bin | |
| # needed by MUMmer | |
| apt-get -y install csh | |
| # download and install Mummer | |
| cd /build | |
| wget https://downloads.sourceforge.net/project/mummer/mummer/3.23/MUMmer3.23.tar.gz | |
| tar -xvzf MUMmer3.23.tar.gz | |
| cd MUMmer3.23 | |
| make CPPFLAGS="-O3 -DSIXTYFOURBITS" | |
| make install | |
| cp src/kurtz/libbasedir/libbase.a /usr/local/lib | |
| cp src/kurtz/streesrc/libstree.a /usr/local/lib | |
| MUMMER_PROGRAMS=( | |
| annotate | |
| combineMUMs | |
| delta-filter | |
| dnadiff | |
| extact-tandems | |
| gaps | |
| mapview | |
| mgaps | |
| mummer | |
| mummerplot | |
| nucmer | |
| nucmer2xfig | |
| promer | |
| repeat-match | |
| run-mummer1 | |
| run-mummer3 | |
| show-aligns | |
| show-coords | |
| show-diff | |
| show-snps | |
| show-tiling | |
| ) | |
| # correct library locations | |
| for f in ${MUMMER_PROGRAMS[@]}; do | |
| # "fix" the perl and csh scripts; assume C executables "work" for now | |
| if echo $(file ${f}) | grep 'C shell script'; then | |
| echo "==== Fixing: ${f} (csh) ====" | |
| perl -p -i.old -e 's{set bindir = /build/MUMmer3.23}{set bindir = /usr/local/bin}' ${f} | |
| elif echo $(file ${f}) | grep 'perl'; then | |
| echo "==== Fixing: ${f} (perl) ====" | |
| perl -p -i.old -e 's{use lib "/build/MUMmer3.23/scripts"}{use lib "/usr/local/bin/scripts"}' ${f} | |
| perl -p -i.old -e 's{BIN_DIR = "/build/MUMmer3.23"}{BIN_DIR = "/usr/local/bin"}' ${f} | |
| perl -p -i.old -e 's{AUX_BIN_DIR = "/build/MUMmer3.23/aux_bin"}{AUX_BIN_DIR = "/usr/local/bin/aux_bin"}' ${f} | |
| perl -p -i.old -e 's{SCRIPT_DIR = "/build/MUMmer3.23/scripts"}{SCRIPT_DIR = "/usr/local/bin/scripts"}' ${f} | |
| elif echo $(file ${f}) | grep ELF; then | |
| echo "==== Fixing ${f} (ELF) ====" | |
| fi | |
| done | |
| for f in ${MUMMER_PROGRAMS[@]}; do | |
| cp -v $f /usr/local/bin | |
| done | |
| cp -rv aux_bin /usr/local/bin/aux_bin | |
| cp -rv scripts /usr/local/bin/scripts | |
| # to run medusa try: | |
| # java -jar /usr/local/share/jars/medusa.jar -scriptPath /usr/local/bin -f test/reference_genomes/ -i test/Rhodobacter_target.fna -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:16.04 | |
| MAINTAINER Pat Minx <[email protected]> | |
| # Volumes | |
| VOLUME /build | |
| VOLUME /release | |
| # bootstrap build dependencies | |
| RUN apt-get update -qq && \ | |
| apt-get -y install apt-transport-https && \ | |
| apt-get update -qq && \ | |
| apt-get -y install \ | |
| build-essential \ | |
| libcurl4-openssl-dev \ | |
| ca-certificates \ | |
| libnss-sss \ | |
| rsync \ | |
| curl \ | |
| wget \ | |
| --no-install-recommends | |
| WORKDIR /build | |
| # Import resources | |
| #COPY ./L_RNA_scaffolder.tar.gz /build # custom software you may have downloaded onto your laptop | |
| COPY ./build-script.sh /build | |
| RUN ["/bin/bash", "build-script.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment