Lakeview
Lakeview is a Python 3 library for creating publication-quality IGV-style genomic visualizations. Lakeview is based on Matplotlib.
A quick example:
# Import Lakeview
import lakeview as lv
# Load aligned segments in a selected region from a BAM file
painter = lv.SequenceAlignment.from_file(
"PacBio_HiFi.bam", region="chr14:105,660,000-105,780,000"
)
# Create an empty GenomeViewer with two tracks
gv = lv.GenomeViewer(tracks=2, figsize=(8, 5), height_ratios=(1, 4))
# Plot alignment pileup
painter.draw_pileup(
gv.axes[0], # Plot on the first track of the GenomeViewer
show_mismatches=False, # Do not highlight mismatched bases
)
# Plot aligned segments
painter.draw_alignment(
gv.axes[1], # Plot on the second track of the GenomeViewer
show_mismatches=False, # Do not highlight mismatched bases
sort_by="length", # Plot longer reads first
link_by="name", # Link primary and supplementary alignments of the same read
max_rows=30, # Only show the first 30 alignment rows
)
# Adjust x axis limits
gv.set_xlim(105_670_000, 105_777_000)
# Save the plot
gv.savefig("example.png")
Lakeview currently supports visualzing sequence alignment, pileup, and gene annotation tracks. Additional functionality will be added in the future.
Try Lakeview interactively with Binder:
Features
- Improved clarity. Lakeview inherits the familiar and intuitive visual style of IGV, with a clear layout designed for publication and presentation.
- Programmable plotting. Multiple files and genomic regions can be visualized automatically through a Pythonic interface inspired by Seaborn and Pandas.
- Support for remote data. Genomic data are often stored in remote servers without display devices. With Lakeview, you can plot remotely and view the output figures locally. Lakeview works well with JupyterLab to streamline this workflow.
- Transparency and reproducibility. Figures are plotted transparently and annotated explicitly. The input data and the plotting code contain all the information needed to reproduce the figure.
- Customizable layouts. Lakeview supports many layouts implemented in IGV, while allowing the user to define custom rules for ordering, grouping, and coloring each segment. Advanced customization is possible via the Matplotlib API.
- Interactive plotting. Lakeview ships with an interactive Jupyter Widget to help users locate their regions of interest.
Installation
pip install lakeview
Documentation
Lakeview documentation is available at https://jzhang-dev.github.io/lakeview/.
Contribute
Issues and pull requests are welcome via GitHub.
A ready-to-use development environment is available via Gitpod:
License
Lakeview is licensed under the GPL-3.0 license.
Metadata
Release files for lakeview 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lakeview-0.2.0.tar.gz | 52.2 kB | Without provenance | Details for lakeview-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lakeview-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for lakeview-0.2.0-py3-none-any.whl |
Total release size: 101.5 kB
Release files / lakeview-0.2.0.tar.gz
| Download URL | lakeview-0.2.0.tar.gz |
|---|---|
| Size | 52.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e201adee252ea3c859f1c9f4efa71ba557fe5c0f8d789ecda7cef8aaa99c60cd
|
|
BLAKE2b-256 checksum How to use checksums |
12fb8e6097ac1633e996782dd6069661d6f0ad3c3e66fc63689701be06f23d91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / lakeview-0.2.0-py3-none-any.whl
| Download URL | lakeview-0.2.0-py3-none-any.whl |
|---|---|
| Size | 49.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5137f68fdebf5fec8add5ddb54c7e1cfa7e9ca26e4857aeee0cbdc77145abb5e
|
|
BLAKE2b-256 checksum How to use checksums |
3e56e79dee560f6fdd7cf53db2bc7bb45bb047847330d947daa6737cfd8e289a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Security for lakeview 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.