Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ All commands are run from the root of the project, from a terminal:

| Command | Action |
| ----------------------------------------------- | --------------------------------------------- |
| `uv run jupyter lab` | Run Jupyter lab with current package state |
| `uv run ruff check --fix && uv run ruff format` | Lint and apply formatting |
| `uv run check` | Check linting rules |
| `uv run ruff format --check` | Check formatting |
Expand All @@ -112,13 +113,15 @@ Releases are managed via the GitHub UI.
[Draft a new release](https://github.com/higlass/higlass-python/releases/new):

1. **Create a tag**

- Click _"Choose a tag"_, then **type a new tag** in the format
`v[major].[minor].[patch]` to create it.
- _Note_: The UI is not obvious about this. You can create a tag here, not
just select one. Tag creation triggers a
[workflow](.github/workflows/ci.yml) to publish to PyPI.

2. **Generate release notes**

- Click _"Generate Release Notes"_ to auto-summarize changes from merged PRs.
- Edit to exclude irrelevant changes for end users (e.g., docs or CI).

Expand Down
22 changes: 22 additions & 0 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,28 @@ Tracks may be combined with the ``hg.combine()`` utility:

hg.view((combined_track, "top")).domain(x=[0, 1e9])

Chromosome grid on a heatmap
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: python

import higlass as hg

cs_ts = hg.chromsizes('chromSizes_hg19_reordered.tsv')
cool_ts = hg.cooler("Dixon2012-J1-NcoI-R1-filtered.100kb.multires.cool")

hg.view(
(hg.combine(
cool_ts.track(options={"name": "blah"}),
cs_ts.track('2d-chromosome-grid'),
position='center'), 'center'),
(cs_ts.track('horizontal-chromosome-labels'), 'top'),
(cs_ts.track('horizontal-chromosome-labels'), 'left'),
width=6)

.. image:: img/chromsizes-overlay.png
:align: center
:width: 250

Multiple Views
--------------
Expand Down
6 changes: 6 additions & 0 deletions docs/higlass_theme/static/higlass.css
Original file line number Diff line number Diff line change
Expand Up @@ -800,3 +800,9 @@ div.document {
position: static;
}
}

img.align-center {
margin-left: auto;
margin-right: auto;
display: block;
}
Binary file added docs/img/chromsizes-overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/higlass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
bed2ddb,
beddb,
bigwig,
chromsizes,
cooler,
hitile,
multivec,
Expand Down
8 changes: 8 additions & 0 deletions src/higlass/tilesets.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ def load(filepath: str | pathlib.Path) -> ClodiusTileset:
return load


def chromsizes(filepath: str) -> ClodiusTileset:
from clodius.tiles.chromsizes import tileset_info

return ClodiusTileset(
datatype="chromsizes", tiles_impl=None, info_impl=lambda: tileset_info(filepath)
)


bed2ddb = create_lazy_clodius_loader("bed2ddb", datatype="2d-rectangle-domains")
beddb = create_lazy_clodius_loader("beddb", datatype="vector")
bigwig = create_lazy_clodius_loader("bigwig", datatype="vector")
Expand Down