anchor.diff:  FROM gcc:8
   
   ENV RNA /rna
  -ENV RNACENTRAL_IMPORT_PIPELINE "$RNA/rnacentral-import-pipeline"
  -RUN mkdir $RNA
  +
   WORKDIR $RNA
  -
  -# RUN apt-get install curl ca-certificates
  -# RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
  -
  -# RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgdg.list
   
   RUN apt-get update
   RUN apt-get upgrade -y
  
positive.code:     cd easel && \
      make install
  
  # Install ribotyper
  RUN git clone https://github.com/nawrockie/epn-ofile.git && cd epn-ofile && git checkout c34244b2b9e0719c45d964cc08c147aa353532e8
  RUN git clone https://github.com/nawrockie/epn-options.git && cd epn-options && git checkout 7acc13384aedbd5efee9a62fcde71d075072b6a6
  RUN git clone https://github.com/nawrockie/epn-test.git && cd epn-test && git checkout f4a8a60153906e61bc458fa734ec7070eadf76f9
  RUN git clone https://github.com/nawrockie/ribotyper-v1.git && cd ribotyper-v1 && git checkout 4cd7fe30f402edfa4669383a46d603c60ba6f608
  
  # Install jiffy infernal hmmer scripts
  RUN \
      git clone https://github.com/nawrockie/jiffy-infernal-hmmer-scripts.git && \
      cd jiffy-infernal-hmmer-scripts && \
      git checkout 45d4937385a6b694eac2d7d538e131b59527ce06
  
  RUN \
      cd jiffy-infernal-hmmer-scripts && \
      echo '#!/usr/bin/env perl' | cat - ali-pfam-sindi2dot-bracket.pl | sponge ali-pfam-sindi2dot-bracket.pl
  
  RUN chmod +x $RNA/jiffy-infernal-hmmer-scripts/ali-pfam-sindi2dot-bracket.pl
  
  # Install traveler
  RUN \
      git clone https://github.com/davidhoksza/traveler.git && \
      cd traveler && \
      git checkout 82ee9f58238f856d128d4b44d9999a509edebdfe && \
      cd $RNA/traveler/src && \
      make build
  
  # Install RNAStructure
  RUN \
      wget http://rna.urmc.rochester.edu/Releases/current/RNAstructureSource.tgz && \
      tar -xvzf RNAstructureSource.tgz && \
      rm RNAstructureSource.tgz && \
      cd RNAstructure && \
      make all
  
  # Install blat
  RUN \
      wget https://users.soe.ucsc.edu/~kent/src/blatSrc35.zip && \
  
negative.code:     tar xvf seqkit_linux_amd64.tar.gz && \
      rm seqkit_linux_amd64.tar.gz
  
  # Install useful pip version
  RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
  
  # Install python requirements
  ENV RNACENTRAL_IMPORT_PIPELINE "$RNA/rnacentral-import-pipeline"
  
  ADD requirements.txt $RNACENTRAL_IMPORT_PIPELINE/requirements.txt
  RUN /usr/local/bin/pip install --upgrade pip && \
      /usr/local/bin/pip install -r $RNACENTRAL_IMPORT_PIPELINE/requirements.txt
  
  RUN python -m textblob.download_corpora
  
  # Copy everything that auto-traveler needs into place. This mimicks the same
  # directory structure as the auto-traveler Dockerfile. 
  WORKDIR /
  ENV RIBODIR="$RNA/ribotyper-v1" 
  ENV EPNOPTDIR="$RNA/epn-options" 
  ENV EPNOFILEDIR="$RNA/epn-ofile" 
  ENV EPNTESTDIR="$RNA/epn-test"
  ENV JIFFY_SCRIPTS="$RNA/jiffy-infernal-hmmer-scripts"
  ENV TRAVELER="$RNA/traveler"
  ENV RNA_STRUCTURE="$RNA/RNAstructure"
  ENV RSCAPE="$RNA/rscape_v1.2.3"
  
  COPY --from=rnacentral/auto-traveler:rscape-templates $EPNOFILEDIR $EPNOFILEDIR
  COPY --from=rnacentral/auto-traveler:rscape-templates $EPNOPTDIR $EPNOPTDIR
  COPY --from=rnacentral/auto-traveler:rscape-templates $EPNTESTDIR $EPNTESTDIR
  COPY --from=rnacentral/auto-traveler:rscape-templates $RIBODIR $RIBODIR
  COPY --from=rnacentral/auto-traveler:rscape-templates $JIFFY_SCRIPTS $JIFFY_SCRIPTS
  COPY --from=rnacentral/auto-traveler:rscape-templates $TRAVELER $TRAVELER
  COPY --from=rnacentral/auto-traveler:rscape-templates $RNA_STRUCTURE $RNA_STRUCTURE
  COPY --from=rnacentral/auto-traveler:rscape-templates $RSCAPE $RSCAPE
  
  ENV PATH="$JIFFY_SCRIPTS:$PATH"
  ENV PATH="$AUTO_TRAVELER_PY:$PATH"
  ENV PATH="$RSCAPE/bin:$PATH"
  ENV PATH="$RIBODIR:$PATH"
  ENV PATH="$RNA_STRUCTURE/exe:$PATH"
  
  # Install auto-traveler and related data
  WORKDIR /
  ENV AUTO_TRAVELER_PY="$RNA/auto-traveler"
  RUN git clone https://github.com/RNAcentral/auto-traveler.git $AUTO_TRAVELER_PY
  
  WORKDIR $AUTO_TRAVELER_PY
  RUN \
      git checkout rscape-templates && \
      /usr/local/bin/pip install -r requirements.txt && \
      ./auto-traveler.py rrna setup && \
      python utils/generate_model_info.py --cm-library data/cms
  
  ENV PATH="$AUTO_TRAVELER_PY:$PATH"
  
  WORKDIR $RNA
  
  # Setup environmental variables
  ENV PERL5LIB="$RIBODIR:$EPNOPTDIR:$EPNOFILEDIR:$EPNTESTDIR:/usr/bin/env:$PERL5LIB"
  
  ENV RIBOINFERNALDIR="$RNA/infernal-1.1.2/bin" RIBOEASELDIR="$RNA/infernal-1.1.2/bin"
  ENV DATAPATH="$RNA_STRUCTURE/data_tables/"
  
  ENV PATH="$TRAVELER/bin:$PATH"
  ENV PATH="$RNA/infernal-1.1.2/bin:$PATH"
  ENV PATH="$RNA/blatSrc/bin:$PATH"
  ENV PATH="$RNA/seqkit:$PATH"
  ENV PATH="$RNACENTRAL_IMPORT_PIPELINE:$PATH"
  