From be4b1ab142f491c91e5de01aae10e96b9078193c Mon Sep 17 00:00:00 2001 From: Alexander Solovyov Date: Thu, 22 Sep 2022 07:31:23 -0400 Subject: [PATCH 1/3] update Dockerfile to build from debian:bullseye --- Dockerfile | 71 ++++++++++++++++-------------------------------------- 1 file changed, 21 insertions(+), 50 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d3538f..e480b5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,61 +1,32 @@ -FROM ubuntu:16.04 -MAINTAINER Chong Simon Chu (chong.simon.chu@gmail.com) (Initially by Soo Lee (duplexa@gmail.com)) +FROM debian:bullseye -# 1. general updates & installing necessary Linux components -RUN apt-get update -y && apt-get install -y \ - bzip2 \ - gcc \ - git \ - less \ - libncurses-dev \ - make \ - time \ - unzip \ - vim \ - wget \ - zlib1g-dev \ - liblz4-tool \ - python3-pip +LABEL org.opencontainers.image.authors="Chong Simon Chu chong.simon.chu@gmail.com" +LABEL org.opencontainers.image.contributors="Soo Lee duplexa@gmail.com\ + Alexander Solovyov alexander.solovyov@gmail.com" -# conda and pysam -RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh && bash Miniconda3-py38_4.10.3-Linux-x86_64.sh -p /miniconda -b -ENV PATH=/miniconda/bin:$PATH -RUN conda update -y conda \ - && rm Miniconda3-py38_4.10.3-Linux-x86_64.sh -RUN conda config --add channels r \ - && conda config --add channels bioconda \ - && conda install -c conda-forge libgcc-ng \ - && conda install -c bioconda samtools \ - && conda install -c bioconda bwa \ - && conda install pysam sortedcontainers numpy pandas scikit-learn -y +RUN apt-get update -y && apt-get install -y --no-install-recommends \ + bzip2 gcc git less libncurses-dev make time unzip vim wget zlib1g-dev \ + liblz4-tool python3 python3-numpy python3-pysam samtools bwa python3-pip \ + python3-sortedcontainers python3-pandas python3-dev python3-setuptools \ + python-is-python3 python3-scipy python3-sklearn -#install bamsnap -RUN pip install --no-cache-dir bamsnap +RUN pip install --no-cache-dir bamsnap deep-forest -#install deep-forest -RUN pip install deep-forest - -# download tools -WORKDIR /usr/local/bin -#COPY downloads.sh . -#RUN . downloads.sh - -# set path -#ENV PATH=/usr/local/bin/bwa/:$PATH -#ENV PATH=/usr/local/bin/samtools/:$PATH +# clone the code +RUN mkdir -p /opt/xtea/annotation +WORKDIR /opt/xtea +ADD . /opt/xtea +RUN rm rep_lib_annotation.tar.gz && \ + wget https://github.com/parklab/xTea/raw/master/rep_lib_annotation.tar.gz && \ + tar -C /opt/xtea/annotation -xf rep_lib_annotation.tar.gz && \ + rm rep_lib_annotation.tar.gz # supporting UTF-8 ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 - -# wrapper -COPY *.py *.sh ./ -RUN chmod +x *.py - -# copy the trained model for genotyping -COPY genotyping ./genotyping +ENV TERM=xterm +ENV PATH="/opt/xtea/bin:${PATH}" # default command -CMD ["ls /usr/local/bin"] +CMD ["/bin/bash"] -# From 32686ebee123a82092adbc3580babd7ab6b2736b Mon Sep 17 00:00:00 2001 From: Alexander Solovyov Date: Thu, 22 Sep 2022 08:32:48 -0400 Subject: [PATCH 2/3] make --xtea option in xtea and xtea_hg19 optional --- bin/xtea | 11 ++++++++--- bin/xtea_hg19 | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/bin/xtea b/bin/xtea index ec1103b..ee0b0a1 100755 --- a/bin/xtea +++ b/bin/xtea @@ -1286,8 +1286,13 @@ if __name__ == '__main__': ncores = options.cores sf_folder_rep1 = options.lib ##this is the lib folder path sf_ref1=options.ref ####reference genome - sf_folder_xtea=options.xtea# - + sf_folder_xtea=options.xtea + if not sf_folder_xtea: + # default to directory_of_this_script/../xtea + this_dirname = os.path.dirname(os.path.abspath(__file__)) + parent_dirname = os.path.join(this_dirname, os.pardir) + sf_folder_xtea = os.path.abspath(os.path.join(parent_dirname, + "xtea")) sf_folder_rep=sf_folder_rep1 sf_ref=sf_ref1 if options.decompress==True: @@ -1344,4 +1349,4 @@ if __name__ == '__main__': #### #### -#### \ No newline at end of file +#### diff --git a/bin/xtea_hg19 b/bin/xtea_hg19 index a87b5f5..7def72d 100755 --- a/bin/xtea_hg19 +++ b/bin/xtea_hg19 @@ -1192,7 +1192,12 @@ if __name__ == '__main__': sf_folder_rep1 = options.lib ##this is the lib folder path sf_ref1=options.ref ####reference genome sf_folder_xtea=options.xtea - + if not sf_folder_xtea: + # default to directory_of_this_script/../xtea + this_dirname = os.path.dirname(os.path.abspath(__file__)) + parent_dirname = os.path.join(this_dirname, os.pardir) + sf_folder_xtea = os.path.abspath(os.path.join(parent_dirname, + "xtea")) sf_folder_rep=sf_folder_rep1 sf_ref=sf_ref1 if options.decompress==True: @@ -1248,4 +1253,4 @@ if __name__ == '__main__': #cp_compress_results(s_wfolder, l_rep_type, sample_id) #### -#### \ No newline at end of file +#### From 79dbef7766eb7894620ecb3fdbe96da241624fe7 Mon Sep 17 00:00:00 2001 From: Alexander Solovyov Date: Thu, 22 Sep 2022 09:21:28 -0400 Subject: [PATCH 3/3] install newer versions of python packages --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e480b5a..5e4683f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,11 @@ LABEL org.opencontainers.image.contributors="Soo Lee duplexa@gmail.com\ RUN apt-get update -y && apt-get install -y --no-install-recommends \ bzip2 gcc git less libncurses-dev make time unzip vim wget zlib1g-dev \ - liblz4-tool python3 python3-numpy python3-pysam samtools bwa python3-pip \ - python3-sortedcontainers python3-pandas python3-dev python3-setuptools \ - python-is-python3 python3-scipy python3-sklearn + liblz4-tool python3 python3-pysam samtools bwa python3-pip \ + python3-sortedcontainers python3-dev python3-setuptools \ + python-is-python3 -RUN pip install --no-cache-dir bamsnap deep-forest +RUN pip install --no-cache-dir bamsnap numpy scipy pandas scikit-learn deep-forest # clone the code RUN mkdir -p /opt/xtea/annotation @@ -29,4 +29,3 @@ ENV PATH="/opt/xtea/bin:${PATH}" # default command CMD ["/bin/bash"] -