FROM ubuntu:20.04

LABEL maintainer="Mustafa Tekpinar <tekpinar@buffalo.edu>"
LABEL description="ESGEMME: Evolutionary and Structural Global Epistatic Model for Predicting Mutational Effects."

WORKDIR /home/tekpinar/research/lcqb
ENV JET2_PATH=/home/tekpinar/research/lcqb/JET2
ENV ESGEMME_PATH=/home/tekpinar/research/lcqb/ESGEMME
COPY ./JET2/ ./JET2/
COPY ./naccess2.1.1 ./naccess2.1.1
COPY ./ESGEMME/esgemme.py ./ESGEMME/esgemme.py
COPY ./ESGEMME/pred.R ./ESGEMME/pred.R
COPY ./ESGEMME/computePred.R ./ESGEMME/computePred.R
COPY ./ESGEMME/default.conf ./ESGEMME/default.conf
COPY ./ESGEMME/data/ ./ESGEMME/data/

###################################################################
RUN apt-get update --fix-missing && \
apt-get install -y --no-install-recommends apt-utils &&\
apt-get install -y software-properties-common && \
apt-get install -y build-essential && \
apt-get install -y python3-dev && \
apt-get install -y python3-pip && \
apt-get install -y r-base r-base-core && \
apt-get install -y muscle && \
apt-get install -y dssp && \
apt-get install -y default-jre && \
apt-get install csh && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
###################################################################
RUN ln -s /usr/bin/python3 /usr/bin/python

RUN pip3 install --no-cache-dir prody matplotlib scipy pandas biotite
RUN Rscript -e 'install.packages("seqinr", repos="http://cran.us.r-project.org", dependencies=TRUE)'



