-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding sylph version 0.6.0 * adjusted tests
- Loading branch information
Showing
3 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |