Skip to content

Commit

Permalink
update dockerfile to download HiTE from zenodo
Browse files Browse the repository at this point in the history
  • Loading branch information
CSU-KangHu committed Nov 3, 2023
1 parent 9a459d7 commit 29ee6bf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
42 changes: 28 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,36 @@ FROM continuumio/miniconda3

# Author and maintainer
MAINTAINER Kang Hu <[email protected]>
LABEL description="HiTE: An accurate dynamic boundary adjustment approach for full-length Transposable Elements detection and annotation in Genome Assemblies" \
LABEL description="HiTE: A fast and accurate dynamic boundary adjustment approach for full-length Transposable Elements detection and annotation in Genome Assemblies" \
author="[email protected]"

ARG DNAME="HiTE"

RUN apt-get update && apt-get install unzip --yes && apt-get install less --yes
RUN apt-get update && apt-get install unzip --yes && apt-get install less --yes && apt-get install curl --yes

# Command 'RUN' during docker build
#download RepeatMasker libraries
RUN git clone https://github.com/CSU-KangHu/TE_annotation.git && \
cd TE_annotation && unzip RepeatMasker_Lib.zip
#download RepeatMasker libraries from Github
#RUN git clone https://github.com/CSU-KangHu/TE_annotation.git && \
# cd TE_annotation && unzip RepeatMasker_Lib.zip \

# Download HiTE and create the environment
#COPY environment.yml /
RUN git clone https://github.com/CSU-KangHu/HiTE.git
RUN cd /HiTE && conda env create --name ${DNAME} --file=environment.yml && conda clean -a

#update RepeatMasker libraries
RUN mv /TE_annotation/RepeatMasker_Lib/* /opt/conda/envs/HiTE/share/RepeatMasker/Libraries/
#download RepeatMasker libraries from Zenodo
RUN curl -LJO https://zenodo.org/records/10068148/files/CSU-KangHu/TE_annotation-v3.0.zip?download=1 && \
unzip TE_annotation-v3.0.zip && cd CSU-KangHu-TE_annotation-* && unzip RepeatMasker_Lib.zip

# Download HiTE and create the environment
# COPY environment.yml /
# Download HiTE from Github
# RUN git clone https://github.com/CSU-KangHu/HiTE.git
# RUN cd /HiTE && conda env create --name ${DNAME} --file=environment.yml && conda clean -a
# Download HiTE from Zenodo
RUN curl -LJO https://zenodo.org/records/10065666/files/CSU-KangHu/HiTE-v.3.0.0.zip?download=1 && \
unzip HiTE-v.3.0.0.zip && cd CSU-KangHu-HiTE-* && chmod +x tools/* \
&& conda env create --name ${DNAME} --file=environment.yml && conda clean -a

# update RepeatMasker libraries from Github
# RUN mv /TE_annotation/RepeatMasker_Lib/* /opt/conda/envs/HiTE/share/RepeatMasker/Libraries/
# update RepeatMasker libraries from Zenodo
RUN mv /CSU-KangHu-TE_annotation-*/RepeatMasker_Lib/* /opt/conda/envs/HiTE/share/RepeatMasker/Libraries/

# Make RUN commands use the new environment
# name need to be the same with the above ${DNAME}
Expand All @@ -32,8 +42,12 @@ ENV PERL5LIB /
ENV PATH /opt/conda/envs/${DNAME}/bin:$PATH
USER root

WORKDIR /HiTE
# HiTE download from Github
# WORKDIR /HiTE
# RUN cd /HiTE

RUN cd /HiTE
# HiTE download from Zenodo
WORKDIR /CSU-KangHu-HiTE-*
RUN cd /CSU-KangHu-HiTE-*

CMD ["bash"]
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ Recommended OS: (Ubuntu 16.04, CentOS 7, etc.)
### Dowload project
```sh
git clone https://github.com/CSU-KangHu/HiTE.git

# Alternatively, you can download the zip file directly from the repository.
```

### <a name="install_singularity"></a>Option 1. Run with Singularity (recommended)
```sh
# pull singularity image (once for all). There will be a HiTE.sif file.
singularity pull HiTE.sif docker://kanghu/hite:2.0.4
singularity pull HiTE.sif docker://kanghu/hite:3.0.0

# run HiTE
singularity run -B ${host_path}:${container_path} --pwd /HiTE ${pathTo/HiTE.sif} python main.py \
Expand All @@ -73,10 +75,10 @@ singularity run -B ${host_path}:${container_path} --pwd /HiTE ${pathTo/HiTE.sif}
### <a name="install_docker"></a>Option 2. Run with Docker
```sh
# pull docker image (once for all).
docker pull kanghu/hite:2.0.4
docker pull kanghu/hite:3.0.0

# run HiTE
docker run -v ${host_path}:${container_path} kanghu/hite:2.0.4 python main.py \
docker run -v ${host_path}:${container_path} kanghu/hite:3.0.0 python main.py \
--genome ${genome} \
--thread ${thread} \
--outdir ${output_dir} \
Expand All @@ -87,7 +89,7 @@ docker run -v ${host_path}:${container_path} kanghu/hite:2.0.4 python main.py \
# It is recommended to set ${host_path} and ${container_path} to your user directory, and ensure
# that all input and output files are located within the user directory.

# e.g., my command: docker run -v /home/hukang:/home/hukang kanghu/hite:2.0.4 python main.py
# e.g., my command: docker run -v /home/hukang:/home/hukang kanghu/hite:3.0.0 python main.py
# --genome /home/hukang/HiTE/demo/genome.fa
# --thread 40
# --outdir /home/hukang/HiTE/demo/test/
Expand Down

0 comments on commit 29ee6bf

Please sign in to comment.