Skip to content

Commit

Permalink
Updating adding bwa-mem2 wrapper and increasing patch version
Browse files Browse the repository at this point in the history
  • Loading branch information
skchronicles committed Oct 21, 2024
1 parent ee21c9a commit e4aadb3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 31 deletions.
43 changes: 18 additions & 25 deletions docker/genome-seek/trim_map/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
############# OVERVIEW #############
# genome-seek trim_map docker image,
# uses genome-seek as a base image:
FROM skchronicles/genome-seek:v0.1.0
# uses previous version of genome-seek
# trim_map (v0.1.0) as a base image:
FROM skchronicles/genome-seek_trim_map:v0.1.0

# Base image already contains:
# samblaster and samtools
# @INSTALLS:
# • fastp, bwa_mem2
# samblaster, samtools, fastp, bwa_mem2
WORKDIR /opt2

############## INSTALL #############
# Install fastp, for more info see:
# https://github.com/OpenGene/fastp/
RUN mkdir -p /opt2/fastp/0.23.2/ \
&& wget http://opengene.org/fastp/fastp.0.23.2 -P /opt2/fastp/0.23.2/ \
&& mv /opt2/fastp/0.23.2/fastp.0.23.2 /opt2/fastp/0.23.2/fastp \
&& chmod -R a+rx /opt2/fastp/0.23.2/fastp
ENV PATH="${PATH}:/opt2/fastp/0.23.2"

# Install bwa_mem2, for more info see:
# https://github.com/bwa-mem2/bwa-mem2
RUN mkdir -p /opt2/bwa_mem2/2.2.1/ \
&& wget https://github.com/bwa-mem2/bwa-mem2/releases/download/v2.2.1/bwa-mem2-2.2.1_x64-linux.tar.bz2 -P /opt2/bwa_mem2/2.2.1/ \
&& tar -xjvf /opt2/bwa_mem2/2.2.1/bwa-mem2-2.2.1_x64-linux.tar.bz2 -C /opt2/bwa_mem2/2.2.1/ \
&& rm /opt2/bwa_mem2/2.2.1/bwa-mem2-2.2.1_x64-linux.tar.bz2
ENV PATH="${PATH}:/opt2/bwa_mem2/2.2.1/bwa-mem2-2.2.1_x64-linux"

############## INSTALL ##############
# Add bwa-mem2-wrapper to select the
# correct bwa-mem2 pre-compiled binary
# for Intel and AMD (Zen4) processors.
# AMD (Zen4) processors require are not
# compatible with the AVX-512bw Intel
# pre-compiled binary. This wrapper will
# select the AVX2 binary if run on an
# AMD processor; otherwise, it will
# let bwa-mem2 select the best binary.
ADD bin/bwa-mem2-wrapper /opt2/bwa_mem2/2.2.1/bwa-mem2-2.2.1_x64-linux/bwa-mem2-wrapper
RUN chmod a+rx /opt2/bwa_mem2/2.2.1/bwa-mem2-2.2.1_x64-linux/bwa-mem2-wrapper

################ POST #################
# Add Dockerfile and export env variables
ADD Dockerfile /opt2/genome-seek_trim_map.dockerfile
RUN chmod -R a+rX /opt2
WORKDIR /data2
ADD Dockerfile /opt2/genome-seek_trim_map_v0.1.1.dockerfile
WORKDIR /data2
12 changes: 6 additions & 6 deletions docker/genome-seek/trim_map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ Directly below are instructions for building an image using the provided Dockerf
docker image ls

# Build from Dockerfile
docker build --no-cache -f Dockerfile --tag=genome-seek_trim_map:v0.1.0 .
docker build --no-cache -f Dockerfile --tag=genome-seek_trim_map:v0.1.1 .

# Testing, take a peek inside
docker run -ti genome-seek_trim_map:v0.1.0 /bin/bash
docker run -ti genome-seek_trim_map:v0.1.1 /bin/bash

# Updating Tag before pushing to DockerHub
docker tag genome-seek_trim_map:v0.1.0 skchronicles/genome-seek_trim_map:v0.1.0
docker tag genome-seek_trim_map:v0.1.0 skchronicles/genome-seek_trim_map # latest
docker tag genome-seek_trim_map:v0.1.1 skchronicles/genome-seek_trim_map:v0.1.1
docker tag genome-seek_trim_map:v0.1.1 skchronicles/genome-seek_trim_map # latest

# Check out new tag(s)
docker image ls

# Push new tagged image to DockerHub
docker push skchronicles/genome-seek_trim_map:v0.1.0
docker push skchronicles/genome-seek_trim_map:v0.1.1
docker push skchronicles/genome-seek_trim_map:latest
```

Expand All @@ -31,7 +31,7 @@ docker push skchronicles/genome-seek_trim_map:latest
Scan your image for known vulnerabilities:

```bash
docker scan genome-seek_trim_map:v0.1.0
docker scan genome-seek_trim_map:v0.1.1
```

> **Please Note**: Any references to `skchronicles` should be replaced your username if you would also like to push the image to a non-org account.

0 comments on commit e4aadb3

Please sign in to comment.