forked from StaPH-B/docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pygenomeviz version 0.4.2 (StaPH-B#744)
* added CMD * added pygenomeviz 0.4.2
- Loading branch information
Showing
3 changed files
with
97 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,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 |
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,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() | ||
``` |