anchor.diff:  RUN apt-get update && apt-get install -qqy \
       wget \
       hmmer \
  -	build-essential
  -
  +    build-essential
   
   # Install TRF (for RepeatScout)
   WORKDIR /usr/local/bin
  
positive.code: 
  # Install nseg (for RepeatScout)
  RUN mkdir nseg && \
  	cd nseg && \
  	wget ftp://ftp.ncbi.nih.gov/pub/seg/nseg/* && \
  	make && \
  	mv nseg ../bin && \
  	mv nmerge ../bin
  
  # Install RepeatScout
  RUN wget http://bix.ucsd.edu/repeatscout/RepeatScout-1.0.5.tar.gz && \
  	tar -xvf RepeatScout* && \
  	rm RepeatScout*.tar.gz && \
  	mv RepeatScout* RepeatScout && \
  	cd RepeatScout && \
  	make	
  
  # Install RMBlast
  RUN wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/rmblast/2.2.28/ncbi-rmblastn-2.2.28-x64-linux.tar.gz && \
  
negative.code: ONBUILD ADD repeatmaskerlibraries.tar.gz /usr/local/RepeatMasker
  ONBUILD WORKDIR /usr/local/RepeatMasker
  ONBUILD RUN util/buildRMLibFromEMBL.pl Libraries/RepeatMaskerLib.embl > Libraries/RepeatMasker.lib && \
          makeblastdb -dbtype nucl -in Libraries/RepeatMasker.lib > /dev/null 2>&1 && \
          makeblastdb -dbtype nucl -in Libraries/RepeatPeps.lib > /dev/null 2>&1
  ONBUILD RUN perl -i -0pe 's/^#\!.*perl.*/#\!\/usr\/bin\/perl/g' \
          RepeatMasker \
          DateRepeats \
          ProcessRepeats \
          RepeatProteinMask \
          DupMasker \
          util/queryRepeatDatabase.pl \
          util/queryTaxonomyDatabase.pl \
          util/rmOutToGFF3.pl \
          util/rmToUCSCTables.pl
  ONBUILD RUN perl -0p -e 's/\/usr\/local\/hmmer/\/usr\/bin/g;' \
          -e 's/\/usr\/local\/rmblast/\/usr\/local\/bin/g;' \
          -e 's/DEFAULT_SEARCH_ENGINE = "crossmatch"/DEFAULT_SEARCH_ENGINE = "ncbi"/g;' \ 
          -e 's/TRF_PRGM = ""/TRF_PRGM = "\/usr\/local\/bin\/trf"/g;' RepeatMaskerConfig.tmpl > RepeatMaskerConfig.pm
  
  ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/RepeatMasker:/usr/local/RepeatScout
  #ENTRYPOINT ["/usr/local/RepeatMasker/RepeatMasker"]
  