-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding pycirclize version 1.7.2 #1140
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8719e69
adding pycirclize version 1.7.2
erinyoung b50152a
Added build-files to hyperlink
erinyoung 93b261d
Rename pycirclize/1.7.2/Dockerfile to build-files/pycirclize/1.7.2/Do…
erinyoung 896f8d0
Rename pycirclize/1.7.2/README.md to build-files/pycirclize/1.7.2/REA…
erinyoung c265706
Merge branch 'master' into erin-pycirclize
erinyoung 19af84f
fix test paths
erinyoung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,43 @@ | ||
FROM python:3.9.17-slim AS app | ||
|
||
ARG PYCIRCLIZE_VER="1.7.2" | ||
|
||
# '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/build-files/pycirclize/1.5.0/tests/example1.py && \ | ||
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/build-files/pycirclize/1.5.0/tests/example2.py && \ | ||
wget -q https://raw.githubusercontent.com/StaPH-B/docker-builds/master/build-files/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 |
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,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 | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for updating these, I have a feeling we will need to update a lot of them, if it hasn't already been done since the
build-files/
dir reorganization happened