Skip to content

Commit

Permalink
updating for pycirclize version 1.7.1 (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
erinyoung authored Oct 1, 2024
1 parent 2c5daa5 commit 296e5dd
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ 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>[1.2.105](./ppanggolin/1.2.105/)</li><li>[2.0.3](./ppanggolin/2.0.3/)</li><li>[2.0.5](./ppanggolin/2.0.5/)</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><li>[1.2.0](./pycirclize/1.2.0/)</li><li>[1.5.0](./pycirclize/1.5.0/)</li><li>[1.6.0](./pycirclize/1.6.0/)</li></ul> | https://github.com/moshi4/pyCirclize |
| [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><li>[1.5.0](./pycirclize/1.5.0/)</li><li>[1.6.0](./pycirclize/1.6.0/)</li><li>[1.71](./pycirclize/1.7.1/)</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><li>[1.1.0](pygenomeviz/1.1.0/)</li></ul> | https://github.com/moshi4/pyGenomeViz |
| [pyMLST](https://hub.docker.com/r/staphb/pymlst/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pymlst)](https://hub.docker.com/r/staphb/pymlst) | <ul><li>[2.1.5](./pymlst/2.1.5/)</li><li>[2.1.6](./pymlst/2.1.6/)</li></ul> | https://github.com/bvalot/pyMLST |
| [pypolca](https://hub.docker.com/r/staphb/pypolca/) <br/> [![docker pulls](https://badgen.net/docker/pulls/staphb/pypolca)](https://hub.docker.com/r/staphb/pypolca) | <ul><li>[0.3.1](./pypolca/0.3.1/)</li></ul> | https://github.com/gbouras13/pypolca |
Expand Down
43 changes: 43 additions & 0 deletions pycirclize/1.7.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM python:3.9.17-slim as app

ARG PYCIRCLIZE_VER="1.7.1"

# '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} -vv

ENV PATH=$PATH \
LC_ALL=C

CMD pip show pycirclize

WORKDIR /data

FROM app as test

WORKDIR /test

RUN pip show pycirclize

RUN apt-get update && apt-get install -y --no-install-recommends wget

RUN wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/pycirclize/1.5.0/tests/example1.py && \
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/pycirclize/1.5.0/tests/example2.py && \
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/pycirclize/1.5.0/tests/example3.py

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.7.1/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
```

0 comments on commit 296e5dd

Please sign in to comment.