{"id":15645995,"url":"https://github.com/higlass/higlass-python","last_synced_at":"2025-04-05T06:04:51.668Z","repository":{"id":41322139,"uuid":"157736488","full_name":"higlass/higlass-python","owner":"higlass","description":"Python bindings to and Jupyter Notebook+Lab integration for the HiGlass viewer","archived":false,"fork":false,"pushed_at":"2025-03-11T03:32:55.000Z","size":3540,"stargazers_count":57,"open_issues_count":11,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T05:06:37.591Z","etag":null,"topics":["jupyter-lab-extension","jupyter-notebook-extension","python"],"latest_commit_sha":null,"homepage":"http://docs-python.higlass.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/higlass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-15T15:55:18.000Z","updated_at":"2025-03-27T23:44:47.000Z","dependencies_parsed_at":"2023-11-21T17:29:31.135Z","dependency_job_id":"bb4e0008-b41c-48d9-9aee-1abf2b730b28","html_url":"https://github.com/higlass/higlass-python","commit_stats":{"total_commits":405,"total_committers":10,"mean_commits":40.5,"dds":0.545679012345679,"last_synced_commit":"4491d737c7dcd56d40362ff356de49c4e62bd281"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/higlass%2Fhiglass-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/higlass","download_url":"https://codeload.github.com/higlass/higlass-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294538,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter-lab-extension","jupyter-notebook-extension","python"],"created_at":"2024-10-03T12:10:54.340Z","updated_at":"2025-04-05T06:04:51.632Z","avatar_url":"https://github.com/higlass.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# higlass-python 🔎\n\nA fresh Python library for [`higlass`](https://github.com/higlass/higlass) built\non top of [`higlass-schema`](https://github.com/higlass/higlass-schema) and\n[anywidget](https://github.com/manzt/anywidget).\n\n[![License](https://img.shields.io/pypi/l/higlass-python.svg?color=green)](https://github.com/higlass/higlass-python/raw/main/LICENSE)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/higlass/higlass-python/blob/main/examples/Examples.ipynb)\n\n## Installation\n\n```sh\npip install higlass-python\n```\n\n## Usage\n\n```python\nimport higlass as hg\n\n# Remote data source (tileset)\ntileset1 = hg.remote(\n    uid=\"CQMd6V_cRw6iCI_-Unl3PQ\",\n    server=\"https://higlass.io/api/v1/\",\n    name=\"Rao et al. (2014) GM12878 MboI (allreps) 1kb\",\n)\n\n# Local tileset\ntileset2 = hg.cooler(\"../data/dataset.mcool\")\n\n# Create a `hg.HeatmapTrack` for each tileset\ntrack1 = tileset1.track(\"heatmap\")\ntrack2 = tileset2.track(\"heatmap\")\n\n# Create two independent `hg.View`s, one for each heatmap\nview1 = hg.view(track1, width=6)\nview2 = hg.view(track2, width=6)\n\n# Lock zoom \u0026 location for each `View`\nview_lock = hg.lock(view1, view2)\n\n# Concatenate views horizontally and apply synchronization lock\n(view1 | view2).locks(view_lock)\n```\n\n![Side-by-side Hi-C heatmaps, linked by pan and zoom](https://user-images.githubusercontent.com/24403730/159050305-e6a48f03-fba1-4ff7-8eee-2e9c5c40ef88.gif)\n\nTo learn more about the new API, check out the\n[updated documentation](http://docs-python.higlass.io/).\n\n## Upgrade Guide\n\n**higlass-python** v1.0 is a total rewrite of our prior implementation, aimed to\noffer a more ergonomic and flexible API. While this might present challenges\nwhen upgrading existing code, we've prepared\n[documentation](http://docs-python.higlass.io/) to guide you through the new API\nusage.\n\nIf you find a missing feature, please open an issue – we're committed to\nsupporting your use cases with the new API.\n\nDespite the large changes in v1.0, we will strive to avoid breaking changes\ngoing forward. However, because of the complete rewrite, the v1.0 release\ndoesn't strictly adhere to semantic versioning. You can think of it as a pre-1.0\nrelease, with breaking changes and new features included in minor releases, and\nbug fixes in patch releases.\n\nWe will aim for strict semantic versioning with the v2.0 release. Your feedback\nand understanding are greatly appreciated.\n\n## Development\n\n**higlass-python** is primarily a Python project, but it includes JavaScript for\nthe anywidget-based front-end code (`src/higlass/widget.js`). We use\n[uv](https://github.com/astral-sh/uv) for Python development and\n[deno](https://github.com/denoland/deno) for linting and type-checking\nJavaScript.\n\nAll formatting, linting, and tests are enforced in CI.\n\n### Commands Cheatsheet\n\nAll commands are run from the root of the project, from a terminal:\n\n#### Python\n\n| Command                                         | Action                                        |\n| ----------------------------------------------- | --------------------------------------------- |\n| `uv run ruff check --fix \u0026\u0026 uv run ruff format` | Lint and apply formatting                     |\n| `uv run check`                                  | Check linting rules                           |\n| `uv run ruff format --check`                    | Check formatting                              |\n| `uv run pytest`                                 | Run unit tests                                |\n| `uv run docs/build.py`                          | Build the documentation in `docs/_build/html` |\n\n#### JavaScript\n\n| Command                            | Action                        |\n| ---------------------------------- | ----------------------------- |\n| `deno fmt`                         | Format code                   |\n| `deno lint --fix`                  | Lint and auto-fix issues      |\n| `deno check src/higlass/widget.js` | Typecheck .js with TypeScript |\n\n## Changelog\n\nCheck the [GitHub Releases](https://github.com/higlass/higlass-python/releases)\nfor a detailed changelog.\n\n## Release\n\nReleases are managed via the GitHub UI.\n\n[Draft a new release](https://github.com/higlass/higlass-python/releases/new):\n\n1. **Create a tag**\n   - Click _\"Choose a tag\"_, then **type a new tag** in the format\n     `v[major].[minor].[patch]` to create it.\n   - _Note_: The UI is not obvious about this. You can create a tag here, not\n     just select one. Tag creation triggers a\n     [workflow](.github/workflows/ci.yml) to publish to PyPI.\n\n2. **Generate release notes**\n   - Click _\"Generate Release Notes\"_ to auto-summarize changes from merged PRs.\n   - Edit to exclude irrelevant changes for end users (e.g., docs or CI).\n\n3. **Document significant changes**\n   - Add migration steps or noteworthy updates.\n   - Ensure PR titles are clear and consistent.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiglass%2Fhiglass-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiglass%2Fhiglass-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiglass%2Fhiglass-python/lists"}