Skip to content

Commit

Permalink
Adding sylph version 0.6.0 (#961)
Browse files Browse the repository at this point in the history
* adding sylph version 0.6.0

* adjusted tests
  • Loading branch information
erinyoung authored Apr 10, 2024
1 parent 6fce6ae commit 8551554
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [SRA-toolkit](https://hub.docker.com/r/staphb/sratoolkit/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/sratoolkit)](https://hub.docker.com/r/staphb/sratoolkit) | <ul><li>2.9.2</li><li>[3.0.7](./sratoolkit/3.0.7/)</li></ul> | https://github.com/ncbi/sra-tools |
| [SRST2](https://hub.docker.com/r/staphb/srst2/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/srst2)](https://hub.docker.com/r/staphb/srst2) | <ul><li>0.2.0</li><li>[0.2.0 + custom Vibrio cholerae database](srst2/0.2.0-vibrio-230224/README.md)</li></ul> | https://github.com/katholt/srst2 |
| [Staramr](https://hub.docker.com/r/staphb/staramr/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/staramr)](https://hub.docker.com/r/staphb/staramr) | <ul><li>[0.5.1](./staramr/0.5.1/)</li><li>[0.7.1](./staramr/0.7.1/)</li><li>[0.8.0](./staramr/0.8.0/)</li><li>[0.10.0](./staramr/0.10.0/)</li></ul> | https://github.com/phac-nml/staramr |
| [sylph](https://hub.docker.com/r/staphb/sylph) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/sylph)](https://hub.docker.com/r/staphb/sylph) | <ul><li>[0.4.1](./sylph/0.4.1)</li><li>[0.5.1](./sylph/0.5.1)</li></ul> | https://github.com/bluenote-1577/sylph |
| [sylph](https://hub.docker.com/r/staphb/sylph) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/sylph)](https://hub.docker.com/r/staphb/sylph) | <ul><li>[0.4.1](./sylph/0.4.1)</li><li>[0.5.1](./sylph/0.5.1)</li><li>[0.6.0](./sylph/0.6.0)</li></ul> | https://github.com/bluenote-1577/sylph |
| [TBProfiler](https://hub.docker.com/r/staphb/tbprofiler/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/tbprofiler)](https://hub.docker.com/r/staphb/tbprofiler) | <ul><li>[4.3.0](./tbprofiler/4.3.0/)</li><li>[4.4.0](./tbprofiler/4.4.0/)</li><li>[4.4.2](./tbprofiler/4.4.2/)</li><li>[5.0.1](tbprofiler/5.0.1/)</li></ul> | https://github.com/jodyphelan/TBProfiler |
| [TipToft](https://hub.docker.com/r/staphb/tiptoft/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/tiptoft)](https://hub.docker.com/r/staphb/tiptoft) | <ul><li>1.0.0</li><li>1.0.2</li></ul> | https://github.com/andrewjpage/tiptoft |
| [Tostadas](https://hub.docker.com/r/staphb/tostadas/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/tostadas)](https://hub.docker.com/r/staphb/tostadas) | <ul><li>[0.2.0-beta](./tostadas/0.2.0-beta/)</li><li>[3.1.0](./tostadas/3.1.0/)</li></ul> | https://github.com/CDCgov/tostadas |
Expand Down
63 changes: 63 additions & 0 deletions sylph/0.6.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
ARG SYLPH_VER="0.6.0"

## Builder ##
FROM rust:1.74 as builder

ARG SYLPH_VER

RUN apt update && \
apt install -y cmake && \
wget -q https://github.com/bluenote-1577/sylph/archive/refs/tags/v${SYLPH_VER}.tar.gz && \
tar -xvf v${SYLPH_VER}.tar.gz && \
cd sylph-${SYLPH_VER} && \
cargo install --path . --root ~/.cargo && \
chmod +x /root/.cargo/bin/sylph

## App ##
FROM ubuntu:jammy as app

ARG SYLPH_VER

LABEL base.image="ubuntu:jammy"
LABEL dockerfile.version="1"
LABEL software="sylph"
LABEL software.version=${SYLPH_VER}
LABEL description="sylph is a program that can perform ultrafast (1) ANI querying or (2) metagenomic profiling for metagenomic shotgun samples."
LABEL website="https://github.com/bluenote-1577/sylph"
LABEL license="https://github.com/bluenote-1577/sylph/blob/main/LICENSE"
LABEL maintainer="Stephen Turner"
LABEL maintainer.email="[email protected]"

# copy app from builder stage
COPY --from=builder /root/.cargo/bin/sylph /usr/local/bin/sylph

# default run command
CMD sylph -h

# singularity compatibility
ENV LC_ALL=C

# final working directory in app layer is /data
WORKDIR /data

## Test ##
FROM app as test

# making sure sylph is in PATH
RUN sylph -h

ARG SYLPH_VER

RUN apt update && apt install -y wget

WORKDIR /test

COPY --from=builder /sylph-${SYLPH_VER}/test_files/* /test

RUN date && \
sylph sketch -i e.coli-*.fasta.gz -o database && \
sylph sketch o157_reads.fastq.gz && \
sylph query database.syldb *.sylsp > ani_queries.tsv && \
sylph profile database.syldb *.sylsp > profiling.tsv && \
cat *.tsv && \
date
28 changes: 28 additions & 0 deletions sylph/0.6.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# sylph container

Main tool : [sylph](https://github.com/bluenote-1577/sylph)

Full documentation: https://github.com/bluenote-1577/sylph/wiki

sylph is a program that can perform ultrafast (1) ANI querying or (2) metagenomic profiling for metagenomic shotgun samples.

## Example Usage

```bash
# all fasta -> one *.syldb; fasta are assumed to be genomes
sylph sketch genome1.fa genome2.fa -o database
#EQUIVALENT: sylph sketch -g genome1.fa genome2.fa -o database

# multi-sample sketching of paired reads
sylph sketch -1 A_1.fq B_1.fq -2 A_2.fq B_2.fq -d output_read_sketch_folder

# multi-sample sketching for single end reads, fastq are assumed to be reads
sylph sketch reads.fq
#EQUIVALENT: sylph sketch -r reads.fq

# ANI querying
sylph query database.syldb *.sylsp -t (threads) > ani_queries.tsv

# taxonomic profiling
sylph profile database.syldb *.sylsp -t (threads) > profiling.tsv
```

0 comments on commit 8551554

Please sign in to comment.