Genomic plotting toolkit (Manhattan, Miami, locus-view and tracks)
Project description
Getting Started with skyline
version: 0.4.2a0
The skyline package is a genomic plotting toolkit. It was initially put together to plot Manhattan plots but can be generalised to plot general genomic "track" based data. Currently you can:
- Plot Manhattan style plots
- Plot Miami style plots
- Plot skyview plots (multiple Manhattans stacked and viewed from the top)
- Locus view type plots
- Link tracks together with different sorts of linkers
- Add label tracks
Architecture
Tracks are first-class objects that draw into Matplotlib Axes (they are
not Axes subclasses), with hierarchical Theme styles and full access to
Figure / Axes / Artists. Prefer imports from the package root
(from skyline import manhattan, Theme, …).
High-level vs low-level API
Skyline offers two complementary surfaces:
| Layer | What it is | When to use it |
|---|---|---|
| High-level | Recipe functions (manhattan, miami, locus_scatter, …) that return a PlotResult |
Common figures, pipelines, and automation — few lines to a finished plot |
| Low-level | Track / building-block classes (GenomicScatter, GeneTrack, linkers, rulers, grids, …) with draw(ax) |
Custom multi-track figures and layouts recipes do not cover |
| Shared | Hierarchical Theme / role-leaf styles |
Styling both recipes and hand-built tracks |
Recipes are the stable façade for everyday use; the low-level API is for
composition and control. Matplotlib remains available underneath both
(e.g. result.scatter.ax).
from skyline import HumanGRCh38, manhattan
res = manhattan(gwas_df, HumanGRCh38())
res.savefig("manhattan.png")
res.scatter.ax.axhline(y=7.3, ls="--") # Matplotlib escape hatch
Installation
Conda
conda install -c cfin -c bioconda -c conda-forge skyline-plots
Optional Ensembl REST helpers:
pip install "skyline-plots[ensembl]"
# or install ensembl-rest-client into the same environment
Pip (from PyPI)
pip install skyline-plots
pip install "skyline-plots[ensembl]" # optional REST features
The import package is still skyline (from skyline import …).
From a clone (development)
git clone git@gitlab.com:cfinan/skyline.git
cd skyline
python -m pip install -e ".[dev]"
For Ensembl-backed locus features during development:
python -m pip install -e ".[dev,ensembl]"
Example / demo data
Large example GWAS tables are not shipped in the installed package (they
remain in the git tree under skyline/example_data/ for local notebooks and
scripts). A small assembly coordinate file required by
HumanGRCh37 / HumanGRCh38 / HumanNCBI36 is installed.
A download helper or documented data archive for demos is planned; until then use a git checkout for full examples.
Documentation
Online: https://cfinan.gitlab.io/skyline/
The docs home page mirrors this README. A progressive tutorial lives
under resources/examples/ and the Sphinx “Tutorial” section. Notebook
titles are tagged [high-level], [low-level], or [shared] so the
layer is obvious in the sidebar:
- High-level recipes (Manhattan, Miami, locus view)
- Shared styles (
Theme) - Low-level tracks (scatter, genes, skyview / linkers / grids)
- Composition (recipe grids, hand-built multi-track figures, dual-locus capstone)
Local docs / CI dry-run (docker + pytest + Sphinx, HTML rsynced to pCloud):
cd resources/ci_cd
./build.sh
Tests
pytest tests/
Licence
GPLv3+ — see LICENCE.txt.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skyline_plots-0.4.2a0.tar.gz.
File metadata
- Download URL: skyline_plots-0.4.2a0.tar.gz
- Upload date:
- Size: 155.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f463d5743b9dae5e119804db1d25d547de6f775bccaa79f7f79fe8a37bb9ccfb
|
|
| MD5 |
539889c04e6f65c5115d2a3b73fadf54
|
|
| BLAKE2b-256 |
89246bc0d8fe12db134796ffed68820f8c94aab654e25280332d12b5ef0fd7b4
|
File details
Details for the file skyline_plots-0.4.2a0-py3-none-any.whl.
File metadata
- Download URL: skyline_plots-0.4.2a0-py3-none-any.whl
- Upload date:
- Size: 172.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bb45a9c1bed03fb2e3e30e0c31acf106091807481937f7069fccc135592829c
|
|
| MD5 |
e484248a6723665979c532b531935664
|
|
| BLAKE2b-256 |
842ef5e8d8b24d38ef9fd0f96fd43b50f4d78817771b6cae123bac06b4562db7
|