Skip to content

Commit

Permalink
feat: create circRNA_finder docker
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Apr 29, 2024
1 parent 9890132 commit c8c9a1e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 7 deletions.
7 changes: 5 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'
Expand Down
32 changes: 32 additions & 0 deletions docker/circRNA_finder/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/*
2 changes: 2 additions & 0 deletions docker/circRNA_finder/environment.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
samtools
STAR
4 changes: 4 additions & 0 deletions docker/circRNA_finder/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dockerhub_namespace: nciccbr
image_name: charlie_circRNA_finder
version: v1
container: "$(dockerhub_namespace)/$(image_name):$(version)"
7 changes: 2 additions & 5 deletions workflow/rules/findcircrna.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}}/
Expand Down

0 comments on commit c8c9a1e

Please sign in to comment.