Skip to content

Commit

Permalink
Adds DIAMOND Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
hlfernandez committed Oct 24, 2023
1 parent c8b4e2e commit 2facdce
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
11 changes: 11 additions & 0 deletions diamond/2.x/BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Building instructions

Specify the diamond version in `diamond_version` and run:

```bash
diamond_version=2.1.8 && docker build ./ -t pegi3s/diamond:${diamond_version} --build-arg VERSION=${diamond_version} && docker tag pegi3s/diamond:${diamond_version} pegi3s/diamond:latest
```

# Build log

- 2.1.8 - 24/10/2023 - Hugo López Fernández
30 changes: 30 additions & 0 deletions diamond/2.x/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright 2018-2023 Hugo López-Fernández, Pedro M. Ferreira, Miguel
# Reboiro-Jato, Cristina P. Vieira, and Jorge Vieira
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM debian:12.2-slim

ARG VERSION

RUN apt-get update && apt-get install -y wget

RUN wget "https://github.com/bbuchfink/diamond/releases/download/v${VERSION}/diamond-linux64.tar.gz" -O /tmp/diamond.tar.gz && \
tar zxvf /tmp/diamond.tar.gz -C /usr/bin/ && rm /tmp/diamond.tar.gz

RUN apt-get remove -y wget

ENTRYPOINT ["diamond"]
CMD ["help"]
23 changes: 23 additions & 0 deletions diamond/2.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This image belongs to a larger project called Bioinformatics Docker Images Project (http://pegi3s.github.io/dockerfiles)
## (Please note that the original software licenses still apply)

This image allows the usage of the [DIAMOND](https://github.com/bbuchfink/diamond) a sequence aligner for protein and translated DNA searches, designed for high performance analysis of big sequence data.

To list the main commands, simply run: `docker run --rm -it pegi3s/diamond`.

To obtain the help of a specific command, you just need to run: `docker run --rm -it pegi3s/diamond <command>` (e.g. `docker run --rm -it pegi3s/diamond makedb`)

# Using the DIAMOND image in Linux

To run an application, you should adapt and run the following command: `docker run --rm -v /your/data/dir:/data pegi3s/diamond <command> <options>`

In this command, you should replace:
- `/your/data/dir` to point to the directory that contains the input files you want to analyze.
- `<diamond>` to the name of the `DIAMOND` command you want to use.
- `<options>` with the specific options of the `DIAMOND` application. These options will include the input/output files, which should be referenced under `/data/`.

# Using the DIAMOND image in Windows

Please note that data must be under the same drive than the Docker Toolbox installation (usually `C:`) and in a folder with write permissions (e.g. `C:/Users/User_name/`).

As in the Linux case, to run an application, you should adapt and run the following command: `docker run --rm -v "/c/Users/User_name/dir/":/data pegi3s/diamond <command> <options>`
9 changes: 9 additions & 0 deletions diamond/2.x/hooks/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [ -z ${VERSION} ]; then
echo "VERSION environment variable not set."
exit 1
else
echo "Building ${VERSION}"
docker build -f ${DOCKERFILE_PATH} --build-arg VERSION=${VERSION} -t ${IMAGE_NAME} .
fi
3 changes: 3 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ <h5>Programs:</h5>
<li><a href="https://hub.docker.com/r/pegi3s/cutadapt/" target="_blank"><b>cutadapt</b></a>
<a href="http://cutadapt.readthedocs.io/en/stable/guide.html" target="_blank">[doc]</a> - Sequence read trimming
</li>
<li><a href="https://hub.docker.com/r/pegi3s/diamond/" target="_blank"><b>diamond</b></a>
<a href="https://github.com/bbuchfink/diamond" target="_blank">[doc]</a> - Sequence alignment
</li>
<li><a href="https://hub.docker.com/r/pegi3s/dnasp-v6" target="_blank"><b>dnasp-v6</b></a>
<a href="http://www.ub.edu/dnasp/" target="_blank">[doc]</a> - DNA sequence polymorphism
</li>
Expand Down

0 comments on commit 2facdce

Please sign in to comment.