diff --git a/Dockerfile b/Dockerfile index 924f791c..f46f7a7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,16 +14,11 @@ ENV DYLD_LIBRARY_PATH=/usr/lib/root/lib ENV HTSLIB_LIBRARY_DIR=/usr/local/lib ENV HTSLIB_INCLUDE_DIR=/usr/local/include +WORKDIR / + # System packages RUN apt-get update && apt-get install -y curl wget -# Install miniconda to /miniconda -RUN curl -LO http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -RUN bash Miniconda-latest-Linux-x86_64.sh -p /miniconda -b -RUN rm Miniconda-latest-Linux-x86_64.sh -ENV PATH=/miniconda/bin:${PATH} -RUN conda update -y conda - RUN /bin/bash -c "echo 'deb http://dnanexus-apt-prod.s3.amazonaws.com/ubuntu trusty/amd64/' > /etc/apt/sources.list.d/dnanexus.list" RUN /bin/bash -c "echo 'deb http://dnanexus-apt-prod.s3.amazonaws.com/ubuntu trusty/all/' >> /etc/apt/sources.list.d/dnanexus.list" RUN wget https://wiki.dnanexus.com/images/files/ubuntu-signing-key.gpg @@ -73,6 +68,25 @@ RUN apt-get update -y && apt-get upgrade -y && apt-get install -y --force-yes \ zlib1g-dev RUN apt-get update +# Install virtualenv +RUN pip install --upgrade pip +RUN pip install virtualenv + +# Create BreakSeq virtualenv +RUN virtualenv breakseq2 +RUN /bin/bash -c "source /breakseq2/bin/activate && apt-get install -y --force-yes python-dev && pip install https://github.com/bioinform/breakseq2/archive/2.2.tar.gz && deactivate" + +# Create svviz virtualenv +RUN virtualenv svviz +RUN /bin/bash -c "source /svviz/bin/activate && pip install svviz && deactivate" + +# Install miniconda to /miniconda +RUN curl -LO http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh +RUN bash Miniconda-latest-Linux-x86_64.sh -p /miniconda -b +RUN rm Miniconda-latest-Linux-x86_64.sh +ENV PATH=/miniconda/bin:${PATH} +RUN conda update -y conda + RUN conda config --add channels r RUN conda config --add channels conda-forge RUN conda config --add channels bioconda @@ -83,16 +97,13 @@ RUN conda install -c bioconda samblaster -y RUN conda install -y -c anaconda networkx RUN conda install gcc_linux-64 -y RUN conda install -c bioconda manta +RUN conda install -y numpy WORKDIR / ADD resources.tar.gz / RUN cp -a /resources/* / RUN rm -rf /resources/ -RUN conda install -y numpy -RUN pip install --upgrade pip -RUN pip install https://github.com/bioinform/breakseq2/archive/2.2.tar.gz - RUN pip install dxpy WORKDIR /root diff --git a/parliament2.sh b/parliament2.sh index 4c9ae144..24f477c5 100644 --- a/parliament2.sh +++ b/parliament2.sh @@ -74,6 +74,7 @@ fi # BREAKSEQ2 if [[ "$run_breakseq" == "True" ]]; then echo "BreakSeq" + source "/breakseq2/bin/activate" bplib="/breakseq2_bplib_20150129/breakseq2_bplib_20150129.gff" work="breakseq2" timeout 6h ./breakseq2-2.2/scripts/run_breakseq2.py --reference ref.fa \ @@ -285,11 +286,6 @@ wait # Run SVtyper and SVviz if [[ "$run_genotype_candidates" == "True" ]]; then echo "Running SVTyper" - # SVviz and BreakSeq have mutually exclusive versions of pysam required, so - # SVviz is only installed later and if necessary - if [[ "$run_svviz" == "True" ]]; then - pip install svviz -q & - fi mkdir -p /home/dnanexus/out/svtyped_vcfs/ set -e @@ -393,6 +389,7 @@ if [[ "$run_genotype_candidates" == "True" ]]; then # Run svviz if [[ "$run_svviz" == "True" ]]; then echo "Running svviz" + source "/svviz/bin/activate" mkdir svviz_outputs grep \# survivor_sorted.vcf > header.txt