anchor.diff: -#FROM r-base
   FROM ubuntu:16.04
  +
  +USER root
   
   # Add dependencies
   RUN apt-get update && apt-get install -y libxml2 libxml2-dev libcurl4-gnutls-dev r-cran-rgl git libssl-dev curl
   
   RUN mkdir /tmp/downloads
   
  -RUN curl -sSL -o tmp.tar.gz --retry 10 https://github.com/samtools/htslib/archive/1.2.1.tar.gz && \
  +RUN curl -sSL -o tmp.tar.gz --retry 10 https://github.com/samtools/htslib/archive/1.7.tar.gz && \
       mkdir /tmp/downloads/htslib && \
       tar -C /tmp/downloads/htslib --strip-components 1 -zxf tmp.tar.gz && \
       make -C /tmp/downloads/htslib && \
  
positive.code: 
  ENV HTSLIB /tmp/downloads/htslib
  
  RUN curl -sSL -o tmp.tar.gz --retry 10 https://github.com/cancerit/alleleCount/archive/v2.1.2.tar.gz && \
      mkdir /tmp/downloads/alleleCount && \
      tar -C /tmp/downloads/alleleCount --strip-components 1 -zxf tmp.tar.gz && \
      cd /tmp/downloads/alleleCount/c && \
  
negative.code: 
  RUN R -q -e 'source("http://bioconductor.org/biocLite.R"); biocLite(c("devtools","RColorBrewer","ggplot2","gridExtra","readr","doParallel","foreach"))'
  RUN R -q -e 'devtools::install_github("Crick-CancerGenomics/ascat/ASCAT")'
  
  RUN mkdir -p /opt/battenberg
  COPY . /opt/battenberg/
  RUN R -q -e 'install.packages("/opt/battenberg", repos=NULL, type="source")'
  
  # modify paths to reference files
  RUN cat /opt/battenberg/inst/example/battenberg_wgs.R | \
      sed 's|IMPUTEINFOFILE = \".*|IMPUTEINFOFILE = \"/opt/battenberg_reference/1000genomes_2012_v3_impute/impute_info.txt\"|' | \
      sed 's|G1000PREFIX = \".*|G1000PREFIX = \"/opt/battenberg_reference/1000genomes_2012_v3_loci/1000genomesAlleles2012_chr\"|' | \
      sed 's|G1000PREFIX_AC = \".*|G1000PREFIX_AC = \"/opt/battenberg_reference/1000genomes_2012_v3_loci/1000genomesloci2012_chr\"|' | \
      sed 's|GCCORRECTPREFIX = \".*|GCCORRECTPREFIX = \"/opt/battenberg_reference/1000genomes_2012_v3_gcContent/1000_genomes_GC_corr_chr_\"|' | \
      sed 's|PROBLEMLOCI = \".*|PROBLEMLOCI = \"/opt/battenberg_reference/battenberg_problem_loci/probloci_270415.txt.gz\"|' > /usr/local/bin/battenberg_wgs.R
  
  #RUN cat /opt/battenberg/inst/example/battenberg_snp6.R | \
  #    sed 's|IMPUTEINFOFILE = \".*|IMPUTEINFOFILE = \"/opt/battenberg_reference/1000genomes_2012_v3_impute/impute_info.txt\"|' | \
  #    sed 's|G1000PREFIX = \".*|G1000PREFIX = \"/opt/battenberg_reference/1000genomes_2012_v3_loci/1000genomesAlleles2012_chr\"|' | \
  #    sed 's|SNP6_REF_INFO_FILE = \".*|SNP6_REF_INFO_FILE = \"/opt/battenberg_reference/battenberg_snp6/snp6_ref_info_file.txt\"|' > /usr/local/bin/battenberg_snp6.R
  
  ## USER CONFIGURATION
  RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu
  
  USER    ubuntu
  WORKDIR /home/ubuntu
  
  CMD ["/bin/bash"]
  