gravatar for MAPK

6 hours ago by

I want to create a docker image for BBmap suite which has a folder with multiple shell scripts (${SHELLTOOLS}). I have created a docker file below to create a docker image, but I also want to use helper script, entrypoint.sh. How do I make this docker file run with entrypoint.sh? Can someone please suggest me what I need to add/change to this docker file and entrypoint.sh so I can create a docker image and run it with the command below?

FROM openjdk:8-jre
RUN    apt-get update 
    && apt-get install -y 
        build-essential 
        openjdk-11-jre 
        wget 
    && rm -rf /var/lib/apt/lists/*

ENV BBMAP_VERSION 38.87
ENV BBMAP_DIR /usr/local/bbmap

WORKDIR /usr/local
RUN set -eux; 
       wget -O bbmap.tar.gz https://sourceforge.net/projects/bbmap/files/BBMap_${BBMAP_VERSION}.tar.gz/download 
    && tar -zxf bbmap.tar.gz 
    && rm bbmap.tar.gz

ENV PATH ${BBMAP_DIR}:${PATH}
COPY ./entrypoint.sh /usr/local/bin/
## Add ENV for Shell scripts from BBMAP
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

My entrypoint.sh:

#!/bin/bash
${SHELLTOOL} -Xmx${MEM}g in=${sortedFQ} delimiter=${DELIM} prefixmode=f column=${COLNUM} out=${sampleFQ}_%_#.fq

My command to run this:

export SHELLTOOL="/usr/local/bbmap/demuxbyname.sh"; 
export MEM=20; 
export sortedFQ="/${PR}/${FULLSM}/paire_test_sorted.fastq"; 
export column=2; 
export DELIM=":"; 
export COLNUM=2; 
export sampleFQ="/${PR}/${FULLSM}/SAMPLE_1380"
bsub 
    -J "${FULLSM}_bb_demulti" 
    -o "${BASE}/${FULLSM}_bb_demulti.%J" 
    -n1 -W 1440 
    -R "rusage[mem=20192]" 
    -q hpc 
    -a "docker(username/bbmap:latest)" 
entrypoint.sh

link

modified 5 hours ago

written
6 hours ago
by

MAPK1.6k



Source link