From a788def9bf165d0470f99a7945ed676347cfded5 Mon Sep 17 00:00:00 2001 From: Kincekara Date: Tue, 6 Feb 2024 15:35:28 +0000 Subject: [PATCH] update phytreeviz --- README.md | 2 +- phytreeviz/0.2.0/Dockerfile | 65 +++++++++++++++++++++++++++++++++++++ phytreeviz/0.2.0/README.md | 42 ++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 phytreeviz/0.2.0/Dockerfile create mode 100644 phytreeviz/0.2.0/README.md diff --git a/README.md b/README.md index 16dbf5873..833577f03 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,7 @@ To learn more about the docker pull rate limits and the open source software pro | [Pavian](https://hub.docker.com/r/staphb/pavian)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pavian)](https://hub.docker.com/r/staphb/pavian) | | https://github.com/fbreitwieser/pavian | | [pbptyper](https://hub.docker.com/r/staphb/pbptyper)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pbptyper)](https://hub.docker.com/r/staphb/pbptyper) | | https://github.com/rpetit3/pbptyper | | [Phyml](https://hub.docker.com/r/staphb/phyml)
[![docker pulls](https://badgen.net/docker/pulls/staphb/phyml)](https://hub.docker.com/r/staphb/phyml) | | https://github.com/stephaneguindon/phyml | -| [phyTreeViz](https://hub.docker.com/r/staphb/phytreeviz)
[![docker pulls](https://badgen.net/docker/pulls/staphb/phytreeviz)](https://hub.docker.com/r/staphb/phytreeviz) | | https://github.com/moshi4/phyTreeViz/ | +| [phyTreeViz](https://hub.docker.com/r/staphb/phytreeviz)
[![docker pulls](https://badgen.net/docker/pulls/staphb/phytreeviz)](https://hub.docker.com/r/staphb/phytreeviz) | | https://github.com/moshi4/phyTreeViz/ | | [Piggy](https://hub.docker.com/r/staphb/piggy)
[![docker pulls](https://badgen.net/docker/pulls/staphb/piggy)](https://hub.docker.com/r/staphb/piggy) | | https://github.com/harry-thorpe/piggy | | [Pilon](https://hub.docker.com/r/staphb/pilon)
[![docker pulls](https://badgen.net/docker/pulls/staphb/pilon)](https://hub.docker.com/r/staphb/pilon) | | https://github.com/broadinstitute/pilon | | [Piranha](https://hub.docker.com/r/staphb/piranha)
[![docker pulls](https://badgen.net/docker/pulls/staphb/piranha)](https://hub.docker.com/r/staphb/piranha) | | https://github.com/polio-nanopore/piranha | diff --git a/phytreeviz/0.2.0/Dockerfile b/phytreeviz/0.2.0/Dockerfile new file mode 100644 index 000000000..2831f99a1 --- /dev/null +++ b/phytreeviz/0.2.0/Dockerfile @@ -0,0 +1,65 @@ +FROM python:3.9.17-slim as app + +# List all software versions are ARGs near the top of the dockerfile +# 'ARG' sets environment variables during the build stage +# ARG variables are ONLY available during image build, they do not persist in the final image +ARG PHYTREEVIZ_VER="0.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="phyTreeViz" +LABEL software.version="${PHYTREEVIZ_VER}" +LABEL description="Visualizing phylogenetic trees" +LABEL website="https://github.com/moshi4/phyTreeViz/" +LABEL license="https://github.com/moshi4/phyTreeViz/blob/main/LICENSE" +LABEL maintainer="Erin Young" +LABEL maintainer.email="eriny@utah.gov" + +# 'RUN' executes code during the build +# Install dependencies via apt-get or yum if using a centos or fedora base +RUN apt-get update && apt-get install -y --no-install-recommends \ + procps \ + ca-certificates && \ + apt-get autoclean && rm -rf /var/lib/apt/lists/* + +# Install and/or setup more things. Make /data for use as a working dir +# For readability, limit one install per 'RUN' statement. +RUN pip install --no-cache phytreeviz==${PHYTREEVIZ_VER} + +ENV PATH="$PATH" \ + LC_ALL=C + +# 'CMD' instructions set a default command when the container is run. This is typically 'tool --help.' +CMD phytreeviz --help + +# 'WORKDIR' sets working directory +WORKDIR /data + +##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ##### +##### Step 2. Set up the testing stage. ##### +##### The docker image is built to the 'test' stage before merging, but ##### +##### the test stage (or any stage after 'app') will be lost. ##### +##### ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ##### + +# A second FROM insruction creates a new stage +FROM app as test + +RUN apt-get update && apt-get install -y --no-install-recommends wget unzip + +# set working directory so that all test inputs & outputs are kept in /test +WORKDIR /test + +# print help and version info; check dependencies (not all software has these options available) +# Mostly this ensures the tool of choice is in path and is executable +RUN phytreeviz --help && \ + phytreeviz --version + +# Demonstrate that the program is successfully installed - which is highly dependant on what the tool is. + +# Run the program's internal tests if available, for example with SPAdes: +RUN wget -q https://github.com/moshi4/phyTreeViz/raw/main/example/example.zip && \ + unzip example.zip && \ + phytreeviz -i ./example/small_example.nwk -o cli_example_small.png --show_branch_length --show_confidence && \ + phytreeviz -i ./example/medium_example.nwk -o cli_example_med.png --fig_height 0.3 --align_leaf_label && \ + ls cli_example_med.png cli_example_small.png diff --git a/phytreeviz/0.2.0/README.md b/phytreeviz/0.2.0/README.md new file mode 100644 index 000000000..2c352ec82 --- /dev/null +++ b/phytreeviz/0.2.0/README.md @@ -0,0 +1,42 @@ +# phyTreeViz container + +Main tool: [phyTreeViz](https://github.com/moshi4/phyTreeViz) + +Code repository: https://github.com/moshi4/phyTreeViz + +Basic information on how to use this tool: +- executable: phytreeviz +- help: --help +- version: --version +- description: Visualizing phylogenetic trees + +Additional information: + +> phyTreeViz is a simple and minimal phylogenetic tree visualization python package implemented based on matplotlib. This package was developed to enhance phylogenetic tree visualization functionality of BioPython. + +This is contains a python library as well as a command line executable. + +Full documentation: +- CLI Docs : https://moshi4.github.io/phyTreeViz/cli-docs/phytreeviz/ +- API Docs : https://moshi4.github.io/phyTreeViz/api-docs/treeviz/ + +## Example Usage + +CLI example +```bash +phytreeviz -i input.nwk -o output.png +``` + +API example +```python +from phytreeviz import TreeViz, load_example_tree_file + +tree_file = load_example_tree_file("small_example.nwk") + +tv = TreeViz(tree_file) +tv.show_branch_length(color="red") +tv.show_confidence(color="blue") +tv.show_scale_bar() + +tv.savefig("api_example01.png", dpi=300) +```