Skip to content

Commit

Permalink
Merge pull request #1123 from erinyoung/erin-meningotype
Browse files Browse the repository at this point in the history
adding meningotype version 0.8.5
  • Loading branch information
jessicarowell authored Dec 13, 2024
2 parents d0e569e + 15d7b21 commit d072e3d
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 0 deletions.
1 change: 1 addition & 0 deletions Program_Licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ The licenses of the open-source software that is contained in these Docker image
| mashtree | GNU GPLv3 | https://github.com/lskatz/mashtree/blob/master/LICENSE |
| MaSuRCA | GNU GPLv3 | https://github.com/alekseyzimin/masurca/blob/master/LICENSE.txt
| Medaka | Mozilla Public License 2.0 | https://github.com/nanoporetech/medaka/blob/master/LICENSE.md |
| meningotype | GNU General Public License v3.0 | https://github.com/MDU-PHL/meningotype/blob/master/LICENSE |
| Metaphlan | MIT | https://github.com/biobakery/MetaPhlAn/blob/master/license.txt |
| MIDAS | GNU GPLv3 |https://github.com/snayfach/MIDAS/blob/master/LICENSE |
| minimap2 | MIT | https://github.com/lh3/minimap2/blob/master/LICENSE.txt |
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [mashtree](https://hub.docker.com/r/staphb/mashtree) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/mashtree)](https://hub.docker.com/r/staphb/mashtree) | <ul><li>[0.52.0](./mashtree/0.52.0/)</li><li>[0.57.0](./mashtree/0.57.0/)</li><li>[1.0.4](./mashtree/1.0.4/)</li><li>[1.2.0](./mashtree/1.2.0/)</li><li>[1.4.6](./mashtree/1.4.6/)</li></ul> | https://github.com/lskatz/mashtree |
| [MaSuRCA](https://hub.docker.com/r/staphb/masurca) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/masurca)](https://hub.docker.com/r/staphb/masurca) | <ul><li>4.0.8</li><li>4.0.9</li><li>4.1.0</li></ul> | https://github.com/alekseyzimin/masurca |
| [medaka](https://hub.docker.com/r/staphb/medaka) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/medaka)](https://hub.docker.com/r/staphb/medaka) | <ul><li>[0.8.1](./medaka/0.8.1/)</li><li>[1.0.1](./medaka/1.0.1/)</li><li>[1.2.0](./medaka/1.2.0/)</li><li>[2.0.0](./medaka/2.0.0/)</li><li>[2.0.1](./medaka/2.0.1/)</li></ul> | https://github.com/nanoporetech/medaka |
| [meningotype](https://hub.docker.com/r/staphb/meningotype) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/meningotype)](https://hub.docker.com/r/staphb/meningotype) | <ul><li>[0.8.5](./meningotype/0.8.5/)</li></ul> | https://github.com/MDU-PHL/meningotype |
| [metaphlan](https://hub.docker.com/r/staphb/metaphlan) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/metaphlan)](https://hub.docker.com/r/staphb/metaphlan) | <ul><li>[3.0.3-no-db (no database)](./metaphlan/3.0.3-no-db/)</li><li> [3.0.3 (~3GB db)](./metaphlan/3.0.3/)</li><li>[4.1.0](./metaphlan/4.1.0/) (no database)</li><li>[4.1.1](./metaphlan/4.1.1/) (no database)</li></ul> | https://github.com/biobakery/MetaPhlAn |
| [MIDAS](https://hub.docker.com/r/staphb/midas) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/midas)](https://hub.docker.com/r/staphb/midas) | <ul><li>1.3.2 (no database)</li> | https://github.com/snayfach/MIDAS |
| [minimap2](https://hub.docker.com/r/staphb/minimap2) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/minimap2)](https://hub.docker.com/r/staphb/minimap2) | <ul><li>2.17</li><li>2.18</li><li>2.21</li><li>2.22</li><li>2.23</li><li>2.24</li><li>2.25</li><li>[2.26](./minimap2/2.26)</li><li>[2.27](./minimap2/2.27/)</li><li>[2.28](./minimap2/2.28/)</li></ul> | https://github.com/lh3/minimap2 |
Expand Down
116 changes: 116 additions & 0 deletions meningotype/0.8.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
ARG MENINGOTYPE_VER="0.8.5"
ARG ISPCR_VER="33"
ARG MLST_VER="2.23.0"
ARG ANY2FASTA_VER="0.4.2"

## Builder ##
FROM ubuntu:jammy AS builder

ARG ISPCR_VER
ARG MACHTYPE="x86_64-pc-linux-gnu"

RUN apt-get update && apt-get install -y \
build-essential \
wget \
unzip

RUN wget https://hgwdev.gi.ucsc.edu/~kent/src/isPcr${ISPCR_VER}.zip &&\
unzip isPcr${ISPCR_VER}.zip &&\
cd isPcrSrc &&\
sed -i 's/-Werror//g' inc/common.mk &&\
mkdir -p bin/$MACHTYPE &&\
mkdir -p lib/$MACHTYPE &&\
make HOME=$PWD MACHTYPE=${MACHTYPE} C_INCLUDE_PATH=/usr/include LIBRARY_PATH=/usr/lib CFLAGS="-fcommon" &&\
mv bin/$MACHTYPE/* /usr/local/bin/

## App ##
FROM ubuntu:jammy AS app

ARG MENINGOTYPE_VER
ARG MLST_VER
ARG ANY2FASTA_VER

# 'LABEL' instructions tag the image with metadata that might be important to the user
LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="meningotype"
LABEL software.version="${MENINGOTYPE_VER}"
LABEL description="In silico typing of Neisseria meningitidis"
LABEL website="https://github.com/MDU-PHL/meningotype"
LABEL license="https://github.com/MDU-PHL/meningotype?tab=GPL-3.0-1-ov-file#readme"
LABEL maintainer="Erin Young"
LABEL maintainer.email="eriny@utah.gov"

# most of these dependencies are for mlst
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
libmoo-perl \
liblist-moreutils-perl \
libjson-perl \
gzip \
file \
ncbi-blast+ \
libfile-which-perl \
curl \
parallel \
procps \
python3 \
python3-pip && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/local/bin/* /usr/local/bin/

# get any2fasta; move binary to /usr/local/bin which is already in $PATH
RUN wget -q https://github.com/tseemann/any2fasta/archive/refs/tags/v${ANY2FASTA_VER}.tar.gz && \
tar xzf v${ANY2FASTA_VER}.tar.gz && \
rm v${ANY2FASTA_VER}.tar.gz && \
chmod +x any2fasta-${ANY2FASTA_VER}/any2fasta && \
mv -v any2fasta-${ANY2FASTA_VER}/any2fasta /usr/local/bin && \
rm -rf any2fasta-${ANY2FASTA_VER}

# get mlst
RUN wget -q https://github.com/tseemann/mlst/archive/v${MLST_VER}.tar.gz && \
tar -xzf v${MLST_VER}.tar.gz && \
rm -v v${MLST_VER}.tar.gz

# get meningotype
RUN wget -q https://github.com/MDU-PHL/meningotype/archive/refs/tags/v${MENINGOTYPE_VER}.tar.gz && \
pip install --no-cache-dir v${MENINGOTYPE_VER}.tar.gz && \
rm -rf v${MENINGOTYPE_VER}.tar.gz && \
meningotype -h

# set PATH and perl local settings
ENV PATH="${PATH}:/mlst-${MLST_VER}/bin:" \
LC_ALL=C.UTF-8

# update the database
RUN meningotype --updatedb

# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.'
CMD [ "meningotype", "--help" ]

# 'WORKDIR' sets working directory
WORKDIR /data

## Test ##
FROM app AS test

# set working directory so that all test inputs & outputs are kept in /test
WORKDIR /test

# print help and version info; check dependencies (not all software has these options available)
# Mostly this ensures the tool of choice is in path and is executable
RUN meningotype --help && \
meningotype --version

# Run the program's internal tests if available
RUN meningotype --test && \
meningotype --test --finetype && \
meningotype --test --all

# Option 2: write below common usage cases
RUN wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/022/869/645/GCA_022869645.1_ASM2286964v1/GCA_022869645.1_ASM2286964v1_genomic.fna.gz && \
gzip -d GCA_022869645.1_ASM2286964v1_genomic.fna.gz && \
meningotype GCA_022869645.1_ASM2286964v1_genomic.fna > results.txt && \
head results.txt
27 changes: 27 additions & 0 deletions meningotype/0.8.5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# meningotype container

Main tool: [meningotype](https://github.com/MDU-PHL/meningotype)

Code repository: https://github.com/MDU-PHL/meningotype

Additional tools:
- blast: 2.12.0+
- isPCR: 33
- mlst: 2.23.0
- any2fasta: 0.4.2

Basic information on how to use this tool:
- executable: meningotype
- help: --help
- version: --version
- description: In silico typing for Neisseria meningitidis

Additional information: Documentation sometimes shows `meningotype.py` usage, but this is not in PATH. Please use `meningotype`.

Full documentation: https://github.com/MDU-PHL/meningotype

## Example Usage

```bash
meningotype --finetype *fasta > results.txt
```

0 comments on commit d072e3d

Please sign in to comment.