Skip to content

Commit

Permalink
Merge branch 'StaPH-B:master' into busco-slim
Browse files Browse the repository at this point in the history
  • Loading branch information
Kincekara authored Jan 25, 2024
2 parents 904e60d + 9e58529 commit ff0ac73
Show file tree
Hide file tree
Showing 10 changed files with 392 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ To learn more about the docker pull rate limits and the open source software pro
| [Porechop](https://hub.docker.com/r/staphb/porechop/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/porechop)](https://hub.docker.com/r/staphb/porechop) | <ul><li>0.2.4</li></ul> | https://github.com/rrwick/Porechop |
| [PPanGGOLiN](https://hub.docker.com/r/staphb/ppanggolin/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/ppanggolin)](https://hub.docker.com/r/staphb/ppanggolin) | <ul><li>0.2.4</li></ul> | https://github.com/labgem/PPanGGOLiN |
| [Prokka](https://hub.docker.com/r/staphb/prokka/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/prokka)](https://hub.docker.com/r/staphb/prokka) | <ul><li>1.13.4</li><li>1.14.0</li><li>1.14.5</li><li>1.14.6</li></ul> | https://github.com/tseemann/prokka |
| [pyCirclize](https://hub.docker.com/r/staphb/pycirclize/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pycirclize)](https://hub.docker.com/r/staphb/pycirclize) | <ul><li>[1.0.0](pycirclize/1.0.0/)</li></ul> | https://github.com/moshi4/pyCirclize |
| [pyGenomeViz](https://hub.docker.com/r/staphb/pygenomeviz/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pygenomeviz)](https://hub.docker.com/r/staphb/pygenomeviz) | <ul><li>0.2.2</li><li>0.3.2</li><li>[0.4.2](pygenomeviz/0.4.2/)</li><li>[0.4.3](pygenomeviz/0.4.3/)</li></ul> | https://github.com/moshi4/pyGenomeViz |
| [pyCirclize](https://hub.docker.com/r/staphb/pycirclize/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pycirclize)](https://hub.docker.com/r/staphb/pycirclize) | <ul><li>[1.0.0](pycirclize/1.0.0/)</li><li>[1.2.0](./pycirclize/1.2.0/)</li></ul> | https://github.com/moshi4/pyCirclize |
| [pyGenomeViz](https://hub.docker.com/r/staphb/pygenomeviz/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pygenomeviz)](https://hub.docker.com/r/staphb/pygenomeviz) | <ul><li>0.2.2</li><li>0.3.2</li><li>[0.4.2](pygenomeviz/0.4.2/)</li><li>[0.4.3](pygenomeviz/0.4.3/)</li><li>[0.4.4](pygenomeviz/0.4.4/)</li></ul> | https://github.com/moshi4/pyGenomeViz |
| [QUAST](https://hub.docker.com/r/staphb/quast/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/quast)](https://hub.docker.com/r/staphb/quast) | <ul><li>5.0.0</li><li>5.0.2</li><li>[5.2.0](./quast/5.2.0)</li></ul> | https://github.com/ablab/quast |
| [QuickSNP](https://hub.docker.com/r/staphb/quicksnp/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/quicksnp)](https://hub.docker.com/r/staphb/quicksnp) | <ul><li>1.0.1</li></ul> | https://github.com/k-florek/QuickSNP |
| [racon](https://hub.docker.com/r/staphb/racon) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/racon)](https://hub.docker.com/r/staphb/racon)| <ul><li>1.4.3</li><li>1.4.20</li></ul> | https://github.com/lbcb-sci/racon <br/> https://github.com/isovic/racon (ARCHIVED) |
Expand Down Expand Up @@ -256,7 +256,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</li><li>0.7.1</li><li>0.8.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></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></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</li></ul> | https://github.com/CDCgov/tostadas |
Expand Down
39 changes: 39 additions & 0 deletions pycirclize/1.2.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM python:3.9.17-slim as app

ARG PYCIRCLIZE_VER="1.2.0"

# 'LABEL' instructions tag the image with metadata that might be important to the user
LABEL base.image="python:3.9.17-slim"
LABEL dockerfile.version="1"
LABEL software="pyCirclize"
LABEL software.version="${PYCIRCLIZE_VER}"
LABEL description="Circular visualization in Python"
LABEL website="https://github.com/moshi4/pyCirclize"
LABEL license="https://github.com/moshi4/pyCirclize/blob/main/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"

RUN apt-get update && apt-get install -y --no-install-recommends \
procps && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache pycirclize==${PYCIRCLIZE_VER}

ENV PATH=$PATH \
LC_ALL=C

CMD pip show pycirclize

WORKDIR /data

FROM app as test

WORKDIR /test

RUN pip show pycirclize

COPY /tests/* /test/

RUN python example1.py && ls example01.png && \
python example2.py && ls example02.png && \
python example3.py && ls example03.png
61 changes: 61 additions & 0 deletions pycirclize/1.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# pyCirclize container

Main tool: [pyCirclize](https://pypi.org/project/pyCirclize/)

Code repository: https://github.com/moshi4/pyCirclize

Basic information on how to use this tool:
- executable: NA
- help: NA
- version: NA
- description: pyCirclize is a python package for creating visual images of circular genomes (like those of bacteria)

Full documentation: https://pypi.org/project/pyCirclize/

## Example Usage

This is for running containers with a specific python package, and is not really meant to be run from the command line. Instead, a bioinformatician could create a python script that uses pycirclize.

example1.py:
```python
from pycirclize import Circos
import numpy as np
np.random.seed(0)

# Initialize Circos sectors
sectors = {"A": 10, "B": 15, "C": 12, "D": 20, "E": 15}
circos = Circos(sectors, space=5)

for sector in circos.sectors:
# Plot sector name
sector.text(f"Sector: {sector.name}", r=110, size=15)
# Create x positions & random y values
x = np.arange(sector.start, sector.end) + 0.5
y = np.random.randint(0, 100, len(x))
# Plot lines
track1 = sector.add_track((80, 100), r_pad_ratio=0.1)
track1.xticks_by_interval(interval=1)
track1.axis()
track1.line(x, y)
# Plot points
track2 = sector.add_track((55, 75), r_pad_ratio=0.1)
track2.axis()
track2.scatter(x, y)
# Plot bars
track3 = sector.add_track((30, 50), r_pad_ratio=0.1)
track3.axis()
track3.bar(x, y)

# Plot links
circos.link(("A", 0, 3), ("B", 15, 12))
circos.link(("B", 0, 3), ("C", 7, 11), color="skyblue")
circos.link(("C", 2, 5), ("E", 15, 12), color="chocolate", direction=1)
circos.link(("D", 3, 5), ("D", 18, 15), color="lime", ec="black", lw=0.5, hatch="//", direction=2)
circos.link(("D", 8, 10), ("E", 2, 8), color="violet", ec="red", lw=1.0, ls="dashed")

circos.savefig("example01.png")
```

```bash
python example1.py
```
36 changes: 36 additions & 0 deletions pycirclize/1.2.0/tests/example1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from pycirclize import Circos
import numpy as np
np.random.seed(0)

# Initialize Circos sectors
sectors = {"A": 10, "B": 15, "C": 12, "D": 20, "E": 15}
circos = Circos(sectors, space=5)

for sector in circos.sectors:
# Plot sector name
sector.text(f"Sector: {sector.name}", r=110, size=15)
# Create x positions & random y values
x = np.arange(sector.start, sector.end) + 0.5
y = np.random.randint(0, 100, len(x))
# Plot lines
track1 = sector.add_track((80, 100), r_pad_ratio=0.1)
track1.xticks_by_interval(interval=1)
track1.axis()
track1.line(x, y)
# Plot points
track2 = sector.add_track((55, 75), r_pad_ratio=0.1)
track2.axis()
track2.scatter(x, y)
# Plot bars
track3 = sector.add_track((30, 50), r_pad_ratio=0.1)
track3.axis()
track3.bar(x, y)

# Plot links
circos.link(("A", 0, 3), ("B", 15, 12))
circos.link(("B", 0, 3), ("C", 7, 11), color="skyblue")
circos.link(("C", 2, 5), ("E", 15, 12), color="chocolate", direction=1)
circos.link(("D", 3, 5), ("D", 18, 15), color="lime", ec="black", lw=0.5, hatch="//", direction=2)
circos.link(("D", 8, 10), ("E", 2, 8), color="violet", ec="red", lw=1.0, ls="dashed")

circos.savefig("example01.png")
42 changes: 42 additions & 0 deletions pycirclize/1.2.0/tests/example2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from pycirclize import Circos
from pycirclize.utils import fetch_genbank_by_accid
from pycirclize.parser import Genbank

# Download `NC_002483` E.coli plasmid genbank
gbk_fetch_data = fetch_genbank_by_accid("NC_002483")
gbk = Genbank(gbk_fetch_data)

# Initialize Circos instance with genome size
circos = Circos(sectors={gbk.name: gbk.range_size})
circos.text(f"Escherichia coli K-12 plasmid F\n\n{gbk.name}", size=14)
circos.rect(r_lim=(90, 100), fc="lightgrey", ec="none", alpha=0.5)
sector = circos.sectors[0]

# Plot forward strand CDS
f_cds_track = sector.add_track((95, 100))
f_cds_feats = gbk.extract_features("CDS", target_strand=1)
f_cds_track.genomic_features(f_cds_feats, plotstyle="arrow", fc="salmon", lw=0.5)

# Plot reverse strand CDS
r_cds_track = sector.add_track((90, 95))
r_cds_feats = gbk.extract_features("CDS", target_strand=-1)
r_cds_track.genomic_features(r_cds_feats, plotstyle="arrow", fc="skyblue", lw=0.5)

# Plot 'gene' qualifier label if exists
labels, label_pos_list = [], []
for feat in gbk.extract_features("CDS"):
start = int(str(feat.location.start))
end = int(str(feat.location.end))
label_pos = (start + end) / 2
gene_name = feat.qualifiers.get("gene", [None])[0]
if gene_name is not None:
labels.append(gene_name)
label_pos_list.append(label_pos)
f_cds_track.xticks(label_pos_list, labels, label_size=6, label_orientation="vertical")

# Plot xticks (interval = 10 Kb)
r_cds_track.xticks_by_interval(
10000, outer=False, label_formatter=lambda v: f"{v/1000:.1f} Kb"
)

circos.savefig("example02.png")
23 changes: 23 additions & 0 deletions pycirclize/1.2.0/tests/example3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from pycirclize import Circos
import pandas as pd

# Create matrix dataframe (3 x 6)
row_names = ["F1", "F2", "F3"]
col_names = ["T1", "T2", "T3", "T4", "T5", "T6"]
matrix_data = [
[10, 16, 7, 7, 10, 8],
[4, 9, 10, 12, 12, 7],
[17, 13, 7, 4, 20, 4],
]
matrix_df = pd.DataFrame(matrix_data, index=row_names, columns=col_names)

# Initialize Circos from matrix for plotting Chord Diagram
circos = Circos.initialize_from_matrix(
matrix_df,
space=5,
cmap="tab10",
label_kws=dict(size=12),
link_kws=dict(ec="black", lw=0.5, direction=1),
)

circos.savefig("example03.png")
46 changes: 46 additions & 0 deletions pygenomeviz/0.4.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM python:3.9.17-slim as app

ARG PYGENOMEVIZ_VER="0.4.4"

LABEL base.image="python:3.9.17-slim"
LABEL dockerfile.version="1"
LABEL software="pyGenomeViz"
LABEL software.version=$PYGENOMEVIZ_VER
LABEL description="genome visualization python package for comparative genomics"
LABEL website="https://moshi4.github.io/pyGenomeViz/"
LABEL license="MIT License"
LABEL license.url="https://github.com/moshi4/pyGenomeViz/blob/main/LICENSE"
LABEL maintainer="Erin Young"
LABEL maintainer.email="[email protected]"

#mmseqs2=14-7e284+ds-1+b2
#mummer=3.23+dfsg-8
#progressivemauve=1.2.0+4713+dfsg-5+b1
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
procps \
mmseqs2 \
mummer \
progressivemauve && \
apt-get autoclean && rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir pygenomeviz==$PYGENOMEVIZ_VER

ENV LC_ALL=C.UTF-8

CMD pgv-simpleplot --help && pgv-mmseqs --help && pgv-mummer --help && pgv-pmauve --help

WORKDIR /data

FROM app as test

WORKDIR /test

RUN pgv-simpleplot --help && pgv-mmseqs --help && pgv-mummer --help && pgv-pmauve --help

RUN pgv-download-dataset -n erwinia_phage && \
pgv-mummer --gbk_resources MT939486.gbk MT939487.gbk MT939488.gbk LT960552.gbk -o mummer_test --tick_style axis --align_type left --feature_plotstyle arrow && \
pgv-mmseqs --gbk_resources MT939486.gbk MT939487.gbk MT939488.gbk LT960552.gbk -o mmseqs_test --tick_style axis --align_type left --feature_plotstyle arrow && \
pgv-download-dataset -n escherichia_coli && \
pgv-pmauve --seq_files NC_000913.gbk NC_002695.gbk NC_011751.gbk NC_011750.gbk -o pmauve_test --tick_style bar && \
ls mummer_test/result.png mmseqs_test/result.png pmauve_test/result.png
50 changes: 50 additions & 0 deletions pygenomeviz/0.4.4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# pyGenomeViz container

Main tool : [pyGenomeViz](https://moshi4.github.io/pyGenomeViz/)

Additional tools:
- MMseqs2 v14-7e284+ds-1+b2
- MUMmer v3.23+dfsg-8
- progressiveMauve v1.2.0+4713+dfsg-5+b1

Full documentation: https://moshi4.github.io/pyGenomeViz/

> pyGenomeViz is a genome visualization python package for comparative genomics implemented based on matplotlib. This package is developed for the purpose of easily and beautifully plotting genomic features and sequence similarity comparison links between multiple genomes.
## Example Usage

Using the CLI

```bash
# Download four Erwinia phage genbank files
pgv-download-dataset -n erwinia_phage

# run pyGenomeViz to visualize MUMmer alignment
pgv-mummer --gbk_resources MT939486.gbk MT939487.gbk MT939488.gbk LT960552.gbk -o mummer_example1 --tick_style axis --align_type left --feature_plotstyle arrow

# run pyGenomeViz to visualize MMseqs2 alignment
pgv-mmseqs --gbk_resources MT939486.gbk:250000-358115 MT939487.gbk:250000-355376 MT939488.gbk:250000-356948 LT960552.gbk:270000-340000 -o mmseqs_example2 --tick_style bar --feature_plotstyle arrow

# Download four E.coli genbank files
pgv-download-dataset -n escherichia_coli

# run pyGenomeViz to visualize progressiveMauve alignment
pgv-pmauve --seq_files NC_000913.gbk NC_002695.gbk NC_011751.gbk NC_011750.gbk -o pmauve_example1 --tick_style bar
```

This container contains the pygenomeviz python package, so custom scripts can import pygenomeviz

```python
from pygenomeviz import GenomeViz

name, genome_size = "Tutorial 01", 5000
cds_list = ((100, 900, -1), (1100, 1300, 1), (1350, 1500, 1), (1520, 1700, 1), (1900, 2200, -1), (2500, 2700, 1), (2700, 2800, -1), (2850, 3000, -1), (3100, 3500, 1), (3600, 3800, -1), (3900, 4200, -1), (4300, 4700, -1), (4800, 4850, 1))

gv = GenomeViz()
track = gv.add_feature_track(name, genome_size)
for idx, cds in enumerate(cds_list, 1):
start, end, strand = cds
track.add_feature(start, end, strand, label=f"CDS{idx:02d}")

fig = gv.plotfig()
```
64 changes: 64 additions & 0 deletions sylph/0.5.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
ARG SYLPH_VER="0.5.1"

## 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

RUN wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/e.coli-EC590.fasta && \
wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/e.coli-K12.fasta && \
wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/e.coli-o157.fasta && \
wget -q https://github.com/bluenote-1577/sylph/raw/v${SYLPH_VER}/test_files/o157_reads.fastq

RUN date && \
sylph sketch -i e.coli-*.fasta -o database && \
sylph sketch o157_reads.fastq && \
sylph query database.syldb *.sylsp > ani_queries.tsv && \
sylph profile database.syldb *.sylsp > profiling.tsv && \
cat *.tsv && \
date
Loading

0 comments on commit ff0ac73

Please sign in to comment.