Skip to content

Commit 7cf7b86

Browse files
authored
adding assembly_snptyper version 0.1.1 (#1016)
1 parent 3e3785a commit 7cf7b86

File tree

4 files changed

+145
-0
lines changed

4 files changed

+145
-0
lines changed

Program_Licenses.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The licenses of the open-source software that is contained in these Docker image
1313
| artic-ncov2019-epi2me | MPL 2.0 | https://github.com/epi2me-labs/wf-artic/blob/master/LICENSE |
1414
| any2fasta | GNU GPLv3 | https://github.com/tseemann/any2fasta/blob/master/LICENSE |
1515
| ARIBA | GNU GPLv3 | https://github.com/sanger-pathogens/ariba/blob/master/LICENSE |
16+
| assembly_snptyper | MIT | https://github.com/boasvdp/assembly_snptyper/blob/main/LICENSE |
1617
| Augur | GNU Affero GPLv3 | https://github.com/nextstrain/augur/blob/master/LICENSE.txt |
1718
| Auspice | GNU Affero GPLv3 | https://github.com/nextstrain/auspice/blob/master/LICENSE.txt |
1819
| Bakta | GNU GPLv3 | https://github.com/oschwengers/bakta/blob/main/LICENSE |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ To learn more about the docker pull rate limits and the open source software pro
119119
| [artic-ncov2019-epi2me](https://hub.docker.com/r/staphb/artic-ncov2019-epi2me) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/artic-ncov2019-epi2me)](https://hub.docker.com/r/staphb/artic-ncov2019-epi2me) | <ul><li>0.3.10</ul> | https://github.com/epi2me-labs/wf-artic |
120120
| [artic-ncov2019-medaka](https://hub.docker.com/r/staphb/artic-ncov2019-medaka) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/artic-ncov2019-medaka)](https://hub.docker.com/r/staphb/artic-ncov2019-medaka) | <ul><li>1.1.0</ul> | https://github.com/artic-network/artic-ncov2019 |
121121
| [artic-ncov2019-nanopolish](https://hub.docker.com/r/staphb/artic-ncov2019-nanopolish) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/artic-ncov2019-nanopolish)](https://hub.docker.com/r/staphb/artic-ncov2019-nanopolish) | <ul><li>1.1.0</ul> | https://github.com/artic-network/artic-ncov2019 |
122+
| [assembly_snptyper](https://hub.docker.com/r/staphb/assembly_snptyperh) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/assembly_snptyper)](https://hub.docker.com/r/staphb/assembly_snptyper) | <ul><li>[0.1.1](./assembly_snptyper/0.1.1/)</li></ul> | https://github.com/boasvdp/assembly_snptyper |
122123
| [Augur](https://hub.docker.com/r/staphb/augur) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/augur)](https://hub.docker.com/r/staphb/augur) | <ul><li>[6.3.0](./augur/6.3.0/)</li><li>[7.0.2](./augur/7.0.2/)</li><li>[8.0.0](./augur/8.0.0/)</li><li>[9.0.0](./augur/9.0.0/)</li><li>[16.0.3](./augur/16.0.3/)</li><li>[24.2.2](./augur/24.2.2/)</li><li>[24.2.3](./augur/24.2.3/)</li><li>[24.3.0](./augur/24.3.0/)</li><li>[24.4.0](./augur/24.4.0/)</li></ul> | https://github.com/nextstrain/augur |
123124
| [Auspice](https://hub.docker.com/r/staphb/auspice) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/auspice)](https://hub.docker.com/r/staphb/auspice) | <ul><li>2.12.0</li></ul> | https://github.com/nextstrain/auspice |
124125
| [bakta](https://hub.docker.com/r/staphb/bakta) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/bakta)](https://hub.docker.com/r/staphb/bakta) | <ul><li>[1.9.2](./bakta/1.9.2/)</li><li>[1.9.2-light](./bakta/1.9.2-5.1-light/)</li><li>[1.9.3](./bakta/1.9.3/)</li><li>[1.9.3-light](./bakta/1.9.3-5.1-light/)</li><li>[1.9.4](./bakta/1.9.4/)</li></ul> | https://github.com/oschwengers/bakta |

assembly_snptyper/0.1.1/Dockerfile

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
ARG ASSEMBLYSNPTYPER_VER="0.1.1"
2+
ARG SAMTOOLS_VER="1.19"
3+
ARG MINIMAP2_VER="2.28"
4+
5+
FROM ubuntu:jammy as builder
6+
7+
ARG SAMTOOLS_VER
8+
ARG MINIMAP2_VER
9+
10+
# install dependencies required for compiling samtools
11+
RUN apt-get update && apt-get install --no-install-recommends -y \
12+
libncurses5-dev \
13+
libbz2-dev \
14+
liblzma-dev \
15+
libcurl4-gnutls-dev \
16+
zlib1g-dev \
17+
libssl-dev \
18+
gcc \
19+
wget \
20+
make \
21+
perl \
22+
bzip2 \
23+
gnuplot \
24+
ca-certificates \
25+
curl
26+
27+
# download, compile, and install samtools
28+
RUN wget https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VER}/samtools-${SAMTOOLS_VER}.tar.bz2 && \
29+
tar -xjf samtools-${SAMTOOLS_VER}.tar.bz2 && \
30+
cd samtools-${SAMTOOLS_VER} && \
31+
./configure && \
32+
make && \
33+
make install
34+
35+
WORKDIR /usr/local/bin
36+
37+
RUN curl -L https://github.com/lh3/minimap2/releases/download/v${MINIMAP2_VER}/minimap2-${MINIMAP2_VER}_x64-linux.tar.bz2 | tar -jxvf - --no-same-owner
38+
39+
### start of app stage ###
40+
FROM ubuntu:jammy as app
41+
42+
ARG ASSEMBLYSNPTYPER_VER="0.1.1"
43+
44+
# 'LABEL' instructions tag the image with metadata that might be important to the user
45+
LABEL base.image="ubuntu:jammy"
46+
LABEL dockerfile.version="1"
47+
LABEL software="assembly_snptyper"
48+
LABEL software.version="${ASSEMBLYSNPTYPER_VER}"
49+
LABEL description="Type assembly based on a VCF using minimap2 + samtools"
50+
LABEL website="https://github.com/boasvdp/assembly_snptyper"
51+
LABEL license="https://github.com/boasvdp/assembly_snptyper/blob/main/LICENSE"
52+
LABEL maintainer="Erin Young"
53+
LABEL maintainer.email="eriny@utah.gov"
54+
55+
ARG DEBIAN_FRONTEND=noninteractive
56+
RUN apt-get update && apt-get install --no-install-recommends -y \
57+
perl \
58+
zlib1g \
59+
libncurses5 \
60+
bzip2 \
61+
liblzma-dev \
62+
libcurl4-gnutls-dev \
63+
wget \
64+
ca-certificates \
65+
procps \
66+
python3 \
67+
python3-pip \
68+
python-is-python3 \
69+
curl \
70+
unzip \
71+
&& apt-get autoclean && rm -rf /var/lib/apt/lists/*
72+
73+
# copy in samtools and minimap2 executables from builder stage
74+
COPY --from=builder /usr/local/bin/* /usr/local/bin/
75+
76+
RUN pip install pandas
77+
78+
# install assembly_snptyper; make /data dir
79+
RUN wget -q https://github.com/boasvdp/assembly_snptyper/archive/refs/tags/v${ASSEMBLYSNPTYPER_VER}.tar.gz && \
80+
pip install --no-cache-dir v${ASSEMBLYSNPTYPER_VER}.tar.gz && \
81+
tar -vxf v${ASSEMBLYSNPTYPER_VER}.tar.gz && \
82+
mv /assembly_snptyper-${ASSEMBLYSNPTYPER_VER} /assembly_snptyper && \
83+
rm v${ASSEMBLYSNPTYPER_VER}.tar.gz && \
84+
mkdir /data
85+
86+
ENV LC_ALL=C
87+
88+
CMD [ "assembly_snptyper", "--help" ]
89+
90+
# 'WORKDIR' sets working directory
91+
WORKDIR /data
92+
93+
# A second FROM insruction creates a new stage
94+
FROM app as test
95+
96+
RUN assembly_snptyper --help && \
97+
assembly_snptyper --version
98+
99+
WORKDIR /test
100+
101+
# running on S. pyogenes representative genome
102+
RUN wget -q https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/900/475/035/GCA_900475035.1_41965_F01/GCA_900475035.1_41965_F01_genomic.fna.gz && \
103+
gunzip GCA_900475035.1_41965_F01_genomic.fna.gz && \
104+
ls *genomic.fna > fastas.txt && \
105+
assembly_snptyper --list_input fastas.txt -p 4 --reference /assembly_snptyper/data/MGAS5005.fa --vcf /assembly_snptyper/data/M1UK.vcf > m1uk.txt && \
106+
head m1uk.txt
107+
108+
RUN cd /assembly_snptyper && \
109+
bash tests/test_e2e.sh

assembly_snptyper/0.1.1/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# assembly_snptyper container
2+
3+
Main tool: [assembly_snptyper](https://github.com/boasvdp/assembly_snptyper)
4+
5+
Code repository: https://github.com/boasvdp/assembly_snptyper
6+
7+
Additional tools:
8+
- samtools: 1.19
9+
- minimap2: 2.28
10+
11+
Basic information on how to use this tool:
12+
- executable: assembly_snptyper
13+
- help: -h
14+
- version: -v
15+
- description: |
16+
17+
> This software can take a bacterial genome assembly in fasta format, align it to a reference genome and search for specific SNPs based on the alignment. It uses minimap2 and samtools to do this. You would typically only run this tool instead of a read mapping tool if you don't have access to the sequence reads.
18+
19+
20+
> The tool was written with M1UK typing in mind. In this specific case, the reference genome is an M1global strain, from which M1UK can be discerned by only 27 lineage-specific SNPs. Important assumptions here are that the type of interest (here, M1UK) is closely related to the reference genome, warranting the use of the asm5 preset for minimap2.
21+
22+
Additional information:
23+
24+
M1UK reference and SNP vcf are located in /assembly_snptyper/data
25+
26+
Full documentation: https://github.com/boasvdp/assembly_snptyper
27+
28+
## Example Usage
29+
30+
```bash
31+
# with a list of fasta files listed in fastas.txt
32+
assembly_snptyper --list_input fastas.txt -p 20 --reference /assembly_snptyper/data/MGAS5005.fa --vcf /assembly_snptyper/data/M1UK.vcf > m1uk.txt
33+
```
34+

0 commit comments

Comments
 (0)