FROM annot-base

ARG USER_ID
ARG GROUP_ID

# install braker
RUN wget https://github.com/Gaius-Augustus/BRAKER/archive/v2.1.6.tar.gz && tar zxvf v2.1.6.tar.gz -C /opt && cpan File::Spec::Functions \
	List::Util \
	Module::Load::Conditional \
	POSIX \
	Scalar::Util::Numeric
ENV PATH="/opt/BRAKER-2.1.6/scripts:${PATH}"

# install prothint
RUN wget https://github.com/gatech-genemark/ProtHint/releases/download/v2.6.0/ProtHint-2.6.0.tar.gz && tar zxvf ProtHint-2.6.0.tar.gz -C /opt/ && cpan MCE::Mutex threads YAML Thread::Queue Math::Utils
ENV PATH="/opt/ProtHint-2.6.0/bin:${PATH}"

RUN ln -s /opt/ProtHint-2.6.0/bin/* /opt/spaln-Ver.2.4.2/bin/
RUN sed -i 's/evidence_augustus/prothint_augustus/g' /opt/BRAKER-2.1.6/scripts/braker.pl

RUN chown -R $USER_ID:$GROUP_ID /opt/BRAKER-2.1.6 /opt/ProtHint-2.6.0

SHELL ["/bin/bash", "-c"]
