anchor.diff:      tar xvf seqkit_linux_amd64.tar.gz && \
       rm seqkit_linux_amd64.tar.gz
   
  -# Install R-scape
  -RUN wget http://eddylab.org/software/rscape/rscape.tar.gz && \
  -    tar -xvzf rscape.tar.gz && \
  -    rm rscape.tar.gz && \
  -    cd rscape_v1.2.3 && \
  -    ./configure && make && make install
  -
  -# Install auto-traveler.py
  -RUN git clone https://github.com/RNAcentral/auto-traveler.git && cd auto-traveler && git checkout 5fbc547c06b64589109046165d5919e6e4c5d4d8
  -
   # 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
   
  -# Install auo-traveler data
  +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 \
  -    cd auto-traveler && \
  +    git checkout rscape-templates && \
       /usr/local/bin/pip install -r requirements.txt && \
  -    wget -O cms.tar.gz 'https://www.dropbox.com/s/q5l0s1nj5h4y6e4/cms.tar.gz?dl=0' && \
  -    tar xf cms.tar.gz && \
  +    ./auto-traveler.py rrna setup && \
       python utils/generate_model_info.py --cm-library data/cms
   
  -RUN python -m textblob.download_corpora
  +ENV PATH="$AUTO_TRAVELER_PY:$PATH"
  +
  +WORKDIR $RNA
   
   # Setup environmental variables
  -ENV RIBOINFERNALDIR="$RNA/infernal-1.1.2/bin" RIBOEASELDIR="$RNA/infernal-1.1.2/bin"
  -ENV RIBODIR="$RNA/ribotyper-v1" EPNOPTDIR="$RNA/epn-options" EPNOFILEDIR="$RNA/epn-ofile" EPNTESTDIR="$RNA/epn-test"
   ENV PERL5LIB="$RIBODIR:$EPNOPTDIR:$EPNOFILEDIR:$EPNTESTDIR:/usr/bin/env:$PERL5LIB"
   
  -ENV DATAPATH="$RNA/RNAstructure/data_tables/"
  +ENV RIBOINFERNALDIR="$RNA/infernal-1.1.2/bin" RIBOEASELDIR="$RNA/infernal-1.1.2/bin"
  +ENV DATAPATH="$RNA_STRUCTURE/data_tables/"
   
  -ENV PATH="$RNA/traveler/bin:$PATH"
  -ENV PATH="$RIBODIR:$PATH"
  +ENV PATH="$TRAVELER/bin:$PATH"
   ENV PATH="$RNA/infernal-1.1.2/bin:$PATH"
  -ENV PATH="$RNA/RNAstructure/exe:$PATH"
   ENV PATH="$RNA/blatSrc/bin:$PATH"
   ENV PATH="$RNA/seqkit:$PATH"
  -ENV PATH="$RNA/jiffy-infernal-hmmer-scripts:$PATH"
  -ENV PATH="$RNA/auto-traveler:$PATH"
  -ENV PATH="$RNA/rscape_v1.2.3/bin:$PATH"
   ENV PATH="$RNACENTRAL_IMPORT_PIPELINE:$PATH"
  
positive.code: 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
  
negative.code:     cd easel && \
      make install
  
  # Install blat
  RUN \
      wget https://users.soe.ucsc.edu/~kent/src/blatSrc35.zip && \
  