-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #794 from StaPH-B/cjk-pasty-1.0.3
add pasty 1.0.3
- Loading branch information
Showing
3 changed files
with
188 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,125 @@ | ||
ARG PASTY_VERSION="1.0.3" | ||
# formatted for apt version syntax | ||
ARG BLAST_VERSION="2.12.0+ds-3build1" | ||
|
||
FROM ubuntu:jammy as app | ||
|
||
# have to re-instatiate these variables | ||
ARG PASTY_VERSION | ||
ARG BLAST_VERSION | ||
|
||
LABEL base.image="ubuntu:jammy" | ||
LABEL dockerfile.version="1" | ||
LABEL software="pasty" | ||
LABEL software.version="${PASTY_VERSION}" | ||
LABEL description="In silico serogrouping of Pseudomonas aeruginosa isolates from genome assemblies" | ||
LABEL website="https://github.com/rpetit3/pasty" | ||
LABEL license="https://github.com/rpetit3/pasty/blob/main/LICENSE" | ||
LABEL maintainer="Curtis Kapsak" | ||
LABEL maintainer.email="[email protected]" | ||
|
||
# install dependencies | ||
# ncbi-blast+ version in apt for ubuntu:jammy = v2.12.0 | ||
# python v3.10.6 | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
python3 \ | ||
python3-pip \ | ||
ncbi-blast+=${BLAST_VERSION} \ | ||
wget \ | ||
ca-certificates \ | ||
procps && \ | ||
apt-get autoclean && rm -rf /var/lib/apt/lists/* | ||
|
||
# install python deps | ||
RUN pip3 install executor rich-click | ||
|
||
# download pasty; make /data | ||
RUN echo "downloading pasty source code..." && \ | ||
wget -q https://github.com/rpetit3/pasty/archive/refs/tags/v${PASTY_VERSION}.tar.gz && \ | ||
tar -zxf v${PASTY_VERSION}.tar.gz && \ | ||
rm -rf v${PASTY_VERSION}.tar.gz && \ | ||
mkdir /data | ||
|
||
# set $PATH | ||
# set perl locale settings for singularity compatibility | ||
ENV PATH="${PATH}:/pasty-${PASTY_VERSION}/bin"\ | ||
LC_ALL=C.UTF-8 | ||
|
||
# final working directory is /data | ||
WORKDIR /data | ||
|
||
# testing layer starts here | ||
FROM app as test | ||
|
||
# re-instatiate for use below in test layer | ||
ARG PASTY_VERSION | ||
|
||
# running the below test commands from the root pasty directory | ||
WORKDIR /pasty-${PASTY_VERSION} | ||
|
||
# shamelessly stolen and modified from https://github.com/rpetit3/pasty/blob/main/.github/workflows/test-pasty.yml | ||
RUN echo "O1-GCF_000504045" && \ | ||
pasty --assembly test/O1-GCF_000504045.fna.gz --prefix O1-GCF_000504045 && \ | ||
cat O1-GCF_000504045.tsv && \ | ||
cat O1-GCF_000504045.details.tsv && \ | ||
echo "O2-GCF_000006765" && \ | ||
pasty --assembly test/O2-GCF_000006765.fna.gz --prefix O2-GCF_000006765 --outdir O2 && \ | ||
cat O2/O2-GCF_000006765.tsv && \ | ||
cat O2/O2-GCF_000006765.details.tsv && \ | ||
echo "O3-GCF_000271365" && \ | ||
pasty --assembly test/O3-GCF_000271365.fna.gz --prefix O3-GCF_000271365 --outdir O3 && \ | ||
cat O3/O3-GCF_000271365.tsv && \ | ||
cat O3/O3-GCF_000271365.details.tsv && \ | ||
echo "O4-GCF_024652945" && \ | ||
pasty --assembly test/O4-GCF_024652945.fna.gz --prefix O4-GCF_024652945 --outdir O4 && \ | ||
cat O4/O4-GCF_024652945.tsv && \ | ||
cat O4/O4-GCF_024652945.details.tsv && \ | ||
echo "O6-GCF_001457615" && \ | ||
pasty --assembly test/O6-GCF_001457615.fna.gz --prefix O6-GCF_001457615 && \ | ||
cat O6-GCF_001457615.tsv && \ | ||
cat O6-GCF_001457615.details.tsv && \ | ||
echo "O7-GCF_001482325" && \ | ||
pasty --assembly test/O7-GCF_001482325.fna.gz --prefix O7-GCF_001482325 && \ | ||
cat O7-GCF_001482325.tsv && \ | ||
cat O7-GCF_001482325.details.tsv && \ | ||
echo "O9-GCF_002075065" && \ | ||
pasty --assembly test/O9-GCF_002075065.fna.gz --prefix O9-GCF_002075065 && \ | ||
cat O9-GCF_002075065.tsv && \ | ||
cat O9-GCF_002075065.details.tsv && \ | ||
echo "O10-GCF_009676765" && \ | ||
pasty --assembly test/O10-GCF_009676765.fna.gz --prefix O10-GCF_009676765 && \ | ||
cat O10-GCF_009676765.tsv && \ | ||
cat O10-GCF_009676765.details.tsv && \ | ||
echo "O11-GCF_002192495" && \ | ||
pasty --assembly test/O11-GCF_002192495.fna.gz --prefix O11-GCF_002192495 && \ | ||
cat O11-GCF_002192495.tsv && \ | ||
cat O11-GCF_002192495.details.tsv && \ | ||
echo "O12-GCF_000981825" && \ | ||
pasty --assembly test/O12-GCF_000981825.fna.gz --prefix O12-GCF_000981825 && \ | ||
cat O12-GCF_000981825.tsv && \ | ||
cat O12-GCF_000981825.details.tsv && \ | ||
echo "NT-GCF_000292685" && \ | ||
pasty --assembly test/NT-GCF_000292685.fna.gz --prefix NT-GCF_000292685 && \ | ||
cat NT-GCF_000292685.tsv && \ | ||
cat NT-GCF_000292685.details.tsv && \ | ||
echo "empty" && \ | ||
pasty --assembly test/empty.fasta --prefix empty && \ | ||
cat empty.tsv && \ | ||
cat empty.details.tsv && \ | ||
echo "not-a-fasta" && \ | ||
pasty --assembly test/not-a-fasta.fasta --prefix not-a-fasta && \ | ||
cat not-a-fasta.tsv && \ | ||
cat not-a-fasta.details.tsv && \ | ||
echo "poor" && \ | ||
pasty --assembly test/poor.fasta --prefix poor --outdir poor && \ | ||
cat poor/poor.tsv && \ | ||
cat poor/poor.details.tsv && \ | ||
echo "O2-GCF_001444895-int-bug" && \ | ||
pasty --assembly test/O2-GCF_001444895-int-bug.fna.gz --prefix O2-GCF_001444895-int-bug --outdir O2 && \ | ||
cat O2/O2-GCF_001444895-int-bug.tsv && \ | ||
cat O2/O2-GCF_001444895-int-bug.details.tsv | ||
|
||
# print help and version info | ||
RUN pasty --help && \ | ||
pasty --version && \ | ||
pasty --check |
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,62 @@ | ||
# pasty container | ||
|
||
Main tool : [pasty](https://github.com/rpetit3/pasty) | ||
|
||
Additional tools: | ||
|
||
- ncbi-blast+ 2.12.0 | ||
- python 3.10.12 | ||
|
||
Full documentation: [https://github.com/rpetit3/pasty](https://github.com/rpetit3/pasty) | ||
|
||
A tool easily taken advantage of for in silico serogrouping of Pseudomonas aeruginosa isolates from genome assemblies | ||
|
||
## Example Usage | ||
|
||
```bash | ||
# test genome assemblies are included in the docker image at /pasty-1.0.2/test/ | ||
# visit here to see more information: https://github.com/rpetit3/pasty/tree/main/test | ||
|
||
# run pasty via docker container (command broken into 2 lines for readability) | ||
$ docker run --rm -v $PWD:/data -u $(id -u):$(id -g) staphb/pasty:1.0.2 \ | ||
pasty --assembly /pasty-1.0.2/test/O1-GCF_000504045.fna.gz --prefix O1-GCF_000504045 | ||
Running pasty with following parameters: | ||
--assembly /pasty-1.0.2/test/O1-GCF_000504045.fna.gz | ||
--db /pasty-1.0.2/db/OSAdb.fasta | ||
--prefix O1-GCF_000504045 | ||
--outdir ./ | ||
--min_pident 95 | ||
--min_coverage 95 | ||
|
||
Running BLASTN... | ||
Writing outputs... | ||
BLASTN results written to ./O1-GCF_000504045.blastn.tsv | ||
|
||
Serogroup Results | ||
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓ | ||
┃ sample ┃ serogroup ┃ coverage ┃ fragments ┃ | ||
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩ | ||
│ O1-GCF_000504045 │ O1 │ 99.97 │ 1 │ | ||
│ O1-GCF_000504045 │ O2 │ 9.83 │ 2 │ | ||
│ O1-GCF_000504045 │ O3 │ 11.18 │ 2 │ | ||
│ O1-GCF_000504045 │ O4 │ 14.36 │ 2 │ | ||
│ O1-GCF_000504045 │ O5 │ 0 │ 0 │ | ||
│ O1-GCF_000504045 │ O6 │ 14.07 │ 2 │ | ||
│ O1-GCF_000504045 │ O7 │ 11.54 │ 2 │ | ||
│ O1-GCF_000504045 │ O9 │ 36.62 │ 1 │ | ||
│ O1-GCF_000504045 │ O10 │ 12.52 │ 2 │ | ||
│ O1-GCF_000504045 │ O11 │ 15.85 │ 2 │ | ||
│ O1-GCF_000504045 │ O12 │ 1.24 │ 1 │ | ||
│ O1-GCF_000504045 │ O13 │ 15.39 │ 2 │ | ||
│ O1-GCF_000504045 │ WyzB │ 0 │ 0 │ | ||
└──────────────────┴───────────┴──────────┴───────────┘ | ||
Serogroup Results written to ./O1-GCF_000504045.details.tsv | ||
|
||
Predicted Serogroup | ||
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┓ | ||
┃ sample ┃ serogroup ┃ coverage ┃ fragments ┃ comment ┃ | ||
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━┩ | ||
│ O1-GCF_000504045 │ O1 │ 99.97 │ 1 │ │ | ||
└──────────────────┴───────────┴──────────┴───────────┴─────────┘ | ||
Predicted serogroup result written to ./O1-GCF_000504045.tsv | ||
``` |