bolierplate-codes
Higlass Vscode

i was facing errors with higlass-python specifically in vscode this makes it work specific version of pyndatic and higlass

conda create -n higlass-env python=3.10 -y
conda activate higlass-env
pip install "pydantic<2" higlass-python jupyterlab ipykernel
python -m ipykernel install --user --name higlass-env --display-name "HiGlass (pydantic1)"

Then, in a Jupyter notebook with the HiGlass (pydantic1) kernel:

import higlass as hg
 
tileset1 = hg.remote(
    uid="CQMd6V_cRw6iCI_-Unl3PQ",
    server="https://higlass.io/api/v1/",
    name="Rao et al. (2014) GM12878 MboI (allreps) 1kb",
)
 
tileset2 = hg.remote(
    uid="QvdMEvccQuOxKTEjrVL3wA",
    server="https://higlass.io/api/v1/",
    name="Rao et al. (2014) K562 MboI (allreps) 1kb",
)
 
track1 = tileset1.track("heatmap")
track2 = tileset2.track("heatmap")
 
view1 = hg.view(track1, width=6)
view2 = hg.view(track2, width=6)
 
view_lock = hg.lock(view1, view2)
 
(view1 | view2).locks(view_lock)