From c8c9a1e8c500ba7b7c52950b561c407cf272fc57 Mon Sep 17 00:00:00 2001 From: Kelly Sovacool Date: Mon, 29 Apr 2024 17:42:20 -0400 Subject: [PATCH] feat: create circRNA_finder docker --- config/config.yaml | 7 ++++-- docker/circRNA_finder/Dockerfile | 32 +++++++++++++++++++++++++++ docker/circRNA_finder/environment.txt | 2 ++ docker/circRNA_finder/meta.yml | 4 ++++ workflow/rules/findcircrna.smk | 7 ++---- 5 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 docker/circRNA_finder/Dockerfile create mode 100644 docker/circRNA_finder/environment.txt create mode 100644 docker/circRNA_finder/meta.yml diff --git a/config/config.yaml b/config/config.yaml index 8040726..d66a139 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -104,9 +104,11 @@ cutadapt_q: 20 high_confidence_core_callers: "circExplorer,circExplorer_bwa" high_confidence_core_callers_plus_n: 1 -ciri_perl_script: "/opt2/CIRI_v2.0.6/CIRI2.pl" # in docker container -circrnafinder_dir: "/data/CCBR_Pipeliner/bin/circRNA_finder-1.2" +# paths in docker containers +ciri_perl_script: "/opt2/CIRI_v2.0.6/CIRI2.pl" find_circ_dir: "/data/CCBR_Pipeliner/bin/find_circ" + +# change this path to a directory containing fasta and GTF files for all host and virus genomes fastas_gtfs_dir: "/data/CCBR_Pipeliner/db/PipeDB/charlie/fastas_gtfs" annotation_lookups: @@ -117,6 +119,7 @@ containers: base: "docker://nciccbr/ccbr_ubuntu_base_20.04:v6" bowtie1: "docker://nciccbr/charlie_bowtie1:v0.1.0" circexplorer: 'docker://nciccbr/ccbr_circexplorer:v1.0' + circRNA_finder: 'docker://nciccbr/charlie_circRNA_finder:v1' ciri: 'docker://nciccbr/charlie_ciri2:v1' clear: "docker://nciccbr/ccbr_clear:latest" cutadapt: 'docker://nciccbr/charlie_cutadapt_fqfilter:v1' diff --git a/docker/circRNA_finder/Dockerfile b/docker/circRNA_finder/Dockerfile new file mode 100644 index 0000000..f119e9a --- /dev/null +++ b/docker/circRNA_finder/Dockerfile @@ -0,0 +1,32 @@ +FROM nciccbr/ccbr_ubuntu_base_20.04:v6 + +# build time variables +ARG BUILD_DATE="000000" +ENV BUILD_DATE=${BUILD_DATE} +ARG BUILD_TAG="000000" +ENV BUILD_TAG=${BUILD_TAG} +ARG REPONAME="000000" +ENV REPONAME=${REPONAME} + +# install conda packages +COPY environment.txt /data2/ +RUN mamba install -c conda-forge -c bioconda --file /data2/environment.txt +ENV R_LIBS_USER=/opt2/conda/lib/R/library/ + +# install circRNA_finder +WORKDIR /opt2 +ENV VERSION=v1.2 +RUN wget https://github.com/orzechoj/circRNA_finder/archive/refs/tags/v${VERSION}.tar.gz -O circRNA.tar.gz && \ + tar -xzvf circRNA.tar.gz && \ + cd circRNA_finder-${VERSION} && \ + python setup.py install +ENV PATH="/opt2/circRNA_finder-${VERSION}/:$PATH" + +# Save Dockerfile in the docker +COPY Dockerfile /opt2/Dockerfile_${REPONAME}.${BUILD_TAG} +RUN chmod a+r /opt2/Dockerfile_${REPONAME}.${BUILD_TAG} + +# cleanup +WORKDIR /data2 +RUN apt-get clean && apt-get purge \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/docker/circRNA_finder/environment.txt b/docker/circRNA_finder/environment.txt new file mode 100644 index 0000000..fd233e3 --- /dev/null +++ b/docker/circRNA_finder/environment.txt @@ -0,0 +1,2 @@ +samtools +STAR \ No newline at end of file diff --git a/docker/circRNA_finder/meta.yml b/docker/circRNA_finder/meta.yml new file mode 100644 index 0000000..2f1cc4c --- /dev/null +++ b/docker/circRNA_finder/meta.yml @@ -0,0 +1,4 @@ +dockerhub_namespace: nciccbr +image_name: charlie_circRNA_finder +version: v1 +container: "$(dockerhub_namespace)/$(image_name):$(version)" diff --git a/workflow/rules/findcircrna.smk b/workflow/rules/findcircrna.smk index e08d3a6..46eaca9 100644 --- a/workflow/rules/findcircrna.smk +++ b/workflow/rules/findcircrna.smk @@ -1123,12 +1123,9 @@ rule circrnafinder: "{sample}.Chimeric.out.sorted.bam", ), params: - postProcessStarAlignment_script=join( - config["circrnafinder_dir"], "postProcessStarAlignment.pl" - ), bsj_min_nreads=config["minreadcount"], randomstr=str(uuid.uuid4()), - container: config['containers']['base'] + container: config['containers']['circRNA_finder'] shell: """ set -exo pipefail @@ -1145,7 +1142,7 @@ outDir=$(dirname {output.bed}) if [ -d $outDir ];then rm -rf $outDir;fi if [ ! -d $outDir ];then mkdir -p $outDir;fi -{params.postProcessStarAlignment_script} \\ +postProcessStarAlignment.pl \\ --starDir ${{starDir}}/ \\ --outDir ${{outDir}}/