Skip to content
This repository was archived by the owner on May 27, 2023. It is now read-only.

manzt/hg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note [2023-03-14] hg has a new home (and an official release!) under higlass/higlass-python. This repo is now read-only πŸš€

hg πŸ”Ž

a fresh python library for higlass built on top of higlass-schema and higlass-widget.

License Open In Colab

development

pip install -e .
jupyter notebook notebooks/Examples.ipynb

usage

import hg

# Remote data source (tileset)
tileset1 = hg.remote(
    uid="CQMd6V_cRw6iCI_-Unl3PQ",
    server="https://higlass.io/api/v1/",
    name="Rao et al. (2014) GM12878 MboI (allreps) 1kb",
)

# Local tileset
tileset2 = hg.cooler("../data/dataset.mcool")

# Create a `hg.HeatmapTrack` for each tileset
track1 = tileset1.track("heatmap")
track2 = tileset2.track("heatmap")

# Create two independent `hg.View`s, one for each heatmap
view1 = hg.view(track1, width=6)
view2 = hg.view(track2, width=6)

# Lock zoom & location for each `View`
view_lock = hg.lock(view1, view2)

# Concatenate views horizontally and apply synchronization lock
(view1 | view2).locks(view_lock)

Side-by-side Hi-C heatmaps, linked by pan and zoom

About

a python api for higlass

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published