Skip to content

Commit

Permalink
Merge pull request #16 from moshi4/develop
Browse files Browse the repository at this point in the history
Bump to v0.4.1
  • Loading branch information
moshi4 authored Aug 9, 2023
2 parents 082edde + 4f9e72d commit 72596b8
Show file tree
Hide file tree
Showing 23 changed files with 2,601 additions and 2,018 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ RUN apt-get update && \
RUN pip install -U pip && \
pip install pygenomeviz[gui] --no-cache-dir

# Download example dataset in advance
RUN pgv-download-dataset -n enterobacteria_phage

CMD ["/bin/bash"]
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [Installation](#installation)
- [API Examples](#api-examples)
- [CLI Examples](#cli-examples)
- [GUI (Web browser)](#gui-web-browser)
- [GUI (Web Application)](#gui-web-application)
- [Interactive HTML Viewer](#interactive-html-viewer)
- [Inspiration](#inspiration)
- [Circular Genome Visualization](#circular-genome-visualization)
Expand All @@ -32,7 +32,7 @@ For more information, please see full documentation [here](https://moshi4.github
![pygenomeviz_gallery.png](https://raw.githubusercontent.com/moshi4/pyGenomeViz/main/docs/images/pygenomeviz_gallery.png)
**Fig.1 pyGenomeViz example plot gallery**

:sparkles: GUI (Web browser) functionality is newly added from v0.4.0
:sparkles: GUI (Web Application) functionality is newly added from v0.4.0

![pygenomeviz_gui.gif](https://raw.githubusercontent.com/moshi4/pyGenomeViz/main/src/pygenomeviz/gui/assets/pgv_demo.gif)
**Fig.2 pyGenomeViz GUI (Web browser) version example ([Demo Page](https://pygenomeviz.streamlit.app))**
Expand All @@ -51,6 +51,12 @@ For more information, please see full documentation [here](https://moshi4.github

**Use Docker ([Image Registry](https://github.com/moshi4/pyGenomeViz/pkgs/container/pygenomeviz)):**

Case1. Run CLI Workflow:

docker run -it --rm ghcr.io/moshi4/pygenomeviz:latest pgv-mummer -h

Case2. Launch GUI (Web Application):

docker run --rm -p 8501:8501 ghcr.io/moshi4/pygenomeviz:latest pgv-gui

## API Examples
Expand Down Expand Up @@ -139,9 +145,9 @@ gv.savefig("example03.png")
#### Add Features from Genbank file

```python
from pygenomeviz import Genbank, GenomeViz, load_dataset
from pygenomeviz import Genbank, GenomeViz, load_example_dataset

gbk_files, _ = load_dataset("enterobacteria_phage")
gbk_files, _ = load_example_dataset("enterobacteria_phage")
gbk = Genbank(gbk_files[0])

gv = GenomeViz()
Expand Down Expand Up @@ -174,7 +180,7 @@ gv.savefig("example05.png")
#### Multiple Tracks & Links from Genbank files

```python
from pygenomeviz import Genbank, GenomeViz, load_dataset
from pygenomeviz import Genbank, GenomeViz, load_example_dataset

gv = GenomeViz(
fig_track_height=0.7,
Expand All @@ -184,7 +190,7 @@ gv = GenomeViz(
align_type="center",
)

gbk_files, links = load_dataset("escherichia_phage")
gbk_files, links = load_example_dataset("escherichia_phage")
for gbk_file in gbk_files:
gbk = Genbank(gbk_file)
track = gv.add_feature_track(gbk.name, gbk.range_size)
Expand Down Expand Up @@ -215,7 +221,7 @@ the figure in the manner of matplotlib. Here are some tips for figure customizat
<summary>Code</summary>

```python
from pygenomeviz import Genbank, GenomeViz, load_dataset
from pygenomeviz import Genbank, GenomeViz, load_example_dataset

gv = GenomeViz(
fig_width=12,
Expand All @@ -226,7 +232,7 @@ gv = GenomeViz(
tick_labelsize=10,
)

gbk_files, links = load_dataset("erwinia_phage")
gbk_files, links = load_example_dataset("erwinia_phage")
gbk_list = [Genbank(gbk_file) for gbk_file in gbk_files]
for gbk in gbk_list:
track = gv.add_feature_track(gbk.name, gbk.range_size, labelsize=15)
Expand Down Expand Up @@ -294,7 +300,7 @@ fig.savefig("example07.png")
from matplotlib.lines import Line2D
from matplotlib.patches import Patch

from pygenomeviz import Genbank, GenomeViz, load_dataset
from pygenomeviz import Genbank, GenomeViz, load_example_dataset

gv = GenomeViz(
fig_width=10,
Expand All @@ -306,7 +312,7 @@ gv = GenomeViz(
tick_labelsize=10,
)

gbk_files, links = load_dataset("enterobacteria_phage")
gbk_files, links = load_example_dataset("enterobacteria_phage")
for idx, gbk_file in enumerate(gbk_files):
gbk = Genbank(gbk_file)
track = gv.add_feature_track(gbk.name, gbk.range_size, labelsize=10)
Expand Down Expand Up @@ -393,10 +399,10 @@ Download example dataset: `pgv-download-dataset -n escherichia_coli`

![pmauve_example.png](https://raw.githubusercontent.com/moshi4/pyGenomeViz/main/docs/images/pmauve_example1.png)

## GUI (Web browser)
## GUI (Web Application)

pyGenomeViz implements GUI (Web browser) functionality using [streamlit](https://github.com/streamlit/streamlit) as an option ([Demo Page](https://pygenomeviz.streamlit.app)).
Users can easily perform data visualization of Genbank files and genome comparison results using MUMmer or MMseqs.
pyGenomeViz implements GUI (Web Application) functionality using [streamlit](https://github.com/streamlit/streamlit) as an option ([Demo Page](https://pygenomeviz.streamlit.app)).
Users can easily visualize the genome data of Genbank files and their comparison results with GUI.
See [pgv-gui document](https://moshi4.github.io/pyGenomeViz/gui-docs/pgv-gui/) for details.

![pygenomeviz_gui.gif](https://raw.githubusercontent.com/moshi4/pyGenomeViz/main/src/pygenomeviz/gui/assets/pgv_demo.gif)
Expand Down
22 changes: 5 additions & 17 deletions docs/api-examples/basic_example.ipynb

Large diffs are not rendered by default.

32 changes: 10 additions & 22 deletions docs/api-examples/customization_tips.ipynb

Large diffs are not rendered by default.

44 changes: 16 additions & 28 deletions docs/api-examples/gallery_example.ipynb

Large diffs are not rendered by default.

50 changes: 19 additions & 31 deletions docs/api-examples/practical_example.ipynb

Large diffs are not rendered by default.

48 changes: 18 additions & 30 deletions docs/getting_started.ipynb

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions docs/gui-docs/pgv-gui.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# pgv-gui GUI Document
# pgv-gui Web Application Document

`pgv-gui` is a command to launch the GUI (Web browser) version of pyGenomeViz.
Users can easily perform data visualization of Genbank files and genome comparison
results using MUMmer or MMseqs.
`pgv-gui` command is used to launch the pyGenomeViz web application.
It is developed with the streamlit web application framework,
and users can easily visualize the genome data of Genbank files and their comparison results with GUI.

![pygenomeviz_gui.gif](https://raw.githubusercontent.com/moshi4/pyGenomeViz/main/src/pygenomeviz/gui/assets/pgv_demo.gif)
**Fig.pyGenomeViz GUI (Web browser) version example ([Demo Page](https://pygenomeviz.streamlit.app))**
**Fig.pyGenomeViz web application example ([Demo Page](https://pygenomeviz.streamlit.app))**

## Installation

Expand All @@ -30,6 +30,10 @@ In Ubuntu22.04, MUMmer and MMseqs can be installed with apt command below.

## Usage

The following command launches a GUI browser, which can be accessed at <https://localhost:8501>.
The following command launches web application, which can be accessed at <https://localhost:8501>.

pgv-gui

By uploading the user's Genbank files in the browser, a visualization figure of the genome data is automatically displayed.
By changing the value of each widget on the browser, user can adjust the appearance of the figure,
change the genome comparison method, etc. interactively.
Loading

0 comments on commit 72596b8

Please sign in to comment.