Skip to content

Commit

Permalink
Fixed gridss_minimal Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Cameron committed May 21, 2021
1 parent 9924823 commit 35270ee
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
25 changes: 18 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,23 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
&& rm -rf /var/lib/apt/lists/*
# Hack a fake Rscript so that insert size metrics dont break when creating the histogram
RUN echo "!/bin/sh" > /usr/local/bin/Rscript && chmod +x /usr/local/bin/Rscript
RUN mkdir /opt/gridss/
# grab the GRIDSS artefacts from the builders
COPY --from=gridss_builder_c /opt/gridss/gridsstools /opt/gridss/gridsstools
COPY --from=gridss_builder_java /opt/gridss/*.jar /opt/gridss/
# just GRIDSS itself
COPY scripts/gridss /opt/gridss/
ENV PATH="/opt/gridss/:$PATH"
# Install GRIDSS
ARG GRIDSS_VERSION
ENV GRIDSS_VERSION=${GRIDSS_VERSION}
ENV GRIDSS_JAR=/opt/gridss/gridss-${GRIDSS_VERSION}-gridss-jar-with-dependencies.jar
LABEL software="GRIDSS"
LABEL software.version="$GRIDSS_VERSION"
LABEL about.summary="Genomic Rearrangement IDentification Software Suite"
LABEL about.home="https://github.com/PapenfussLab/gridss"
LABEL about.tags="Genomics"
RUN mkdir /opt/gridss/ /data
COPY --from=gridss_builder_c /opt/gridss/gridsstools /opt/gridss/
COPY --from=gridss_builder_java /opt/gridss/gridss-${GRIDSS_VERSION}-gridss-jar-with-dependencies.jar /opt/gridss/
COPY scripts/gridss /opt/gridss/
RUN chmod +x /opt/gridss/*
WORKDIR /data/


FROM gridss_c_build_environment AS gridss
# Setup CRAN ubuntu package repository
Expand Down Expand Up @@ -144,7 +154,6 @@ RUN mkdir /opt/edirect && \
wget ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.tar.gz && \
tar zxf edirect.tar.gz && \
rm edirect.tar.gz

ENV PATH="/opt/gridss/:/opt/RepeatMasker:/opt/rmblast/:/opt/trf:/opt/kraken2:/opt/blast:/opt/edirect:$PATH"
# configure repeatmasker
RUN cd /opt/RepeatMasker && \
Expand Down Expand Up @@ -175,6 +184,8 @@ COPY scripts/gridss \
scripts/gridss.config.R \
scripts/libgridss.R \
/opt/gridss/
RUN chmod +x /opt/gridss/* && \
chmod -x /opt/gridss/*.R
WORKDIR /data/

# Copy build artifact locally
Expand Down
6 changes: 3 additions & 3 deletions scripts/dev/create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ fi
echo Building GRIDSS $version 2>&1
rm -rf release/
mkdir release
docker build --build-arg GRIDSS_VERSION=$version --target gridss_export_build_artefacts --output type=local,dest=release --progress=plain . && \
docker build --build-arg GRIDSS_VERSION=$version --target gridss -t gridss:$version -t gridss:latest . && \
docker build --build-arg GRIDSS_VERSION=$version --target gridss_export_build_artefacts --output type=local,dest=release . # --progress=plain
docker build --build-arg GRIDSS_VERSION=$version --target gridss -t gridss:$version -t gridss:latest .
docker build --build-arg GRIDSS_VERSION=$version --target gridss_minimal -t gridss_minimal:$version -t gridss_minimal:latest .
cd release
tar czvf gridss-$version.tar.gz *
tar czf gridss-$version.tar.gz *
# TODO: update conda?
echo docker push gridss/gridss:$version gridss/gridss:latest gridss/gridss_minimal:$version gridss/gridss_minimal:latest

Expand Down
6 changes: 5 additions & 1 deletion scripts/gridss
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,11 @@ if [[ $do_preprocess == true ]] ; then
fi
fi
if [[ -f $tmp_prefix.insert_size_metrics ]] ; then
$rmcmd $tmp_prefix.insert_size_metrics $tmp_prefix.idsv_metrics $tmp_prefix.insert_size_histogram.pdf
$rmcmd $tmp_prefix.insert_size_metrics $tmp_prefix.idsv_metrics
fi
if [[ -f $tmp_prefix.insert_size_histogram.pdf ]] ; then
# pdf does not exist when using gridss_minimal docker image
$rmcmd $tmp_prefix.insert_size_histogram.pdf
fi
if [[ ! -f $prefix.sv.bam ]] ; then
write_status "pre-processing failed for $f"
Expand Down

0 comments on commit 35270ee

Please sign in to comment.