Skip to content

Commit

Permalink
pygenomeviz version 0.4.2 (StaPH-B#744)
Browse files Browse the repository at this point in the history
* added CMD

* added pygenomeviz 0.4.2
  • Loading branch information
erinyoung authored Oct 5, 2023
1 parent fb1bb51 commit 1efaad9
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ To learn more about the docker pull rate limits and the open source software pro
| [PopPUNK](https://hub.docker.com/r/staphb/poppunk/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/poppunk)](https://hub.docker.com/r/staphb/poppunk) | <ul><li>2.4.0</li><li>2.5.0</li><li>2.6.0</li></ul> | https://github.com/bacpop/PopPUNK |
| [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 |
| [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 |
| [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></ul> | https://github.com/moshi4/pyGenomeViz |
| [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></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></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
46 changes: 46 additions & 0 deletions pygenomeviz/0.4.2/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.2"

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=13.45111
#mummer=3.23
#progressivemauve=1.2.0
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.2/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 v13.45111
- MUMmer v3.23
- progressiveMauve vsnapshot_2015_02_13

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()
```

0 comments on commit 1efaad9

Please sign in to comment.