Skip to main content
Ctrl+K
None

Site Navigation

  • Install
  • Available tracks
  • Gallery
  • API
  • CLI
    • Analysis guide
    • Developer
  • GitHub
  • PyPI

Site Navigation

  • Install
  • Available tracks
  • Gallery
  • API
  • CLI
    • Analysis guide
    • Developer
  • GitHub
  • PyPI

Section Navigation

Available Track Types:

  • GridSpec
  • scale
  • mapC
  • mapc_markline
  • Virtual4C
  • gene
  • bigwig
  • bed
  • bedGraphMatrix
  • links
  • zoomin
  • highlight line
  • Available tracks
  • links

links#

Show interaction loop

Get test data#

Test loop is from ENCODE https://www.encodeproject.org/experiments/ENCSR968KAY/

  • Homo sapiens GM12878

  • GRCh38

  • Accession: ENCFF041XLP

!gunzip ENCFF041XLP.bedpe.gz

[1]:
import pandas as pd

import trackc as tc
[2]:
loops = pd.read_table(
    "../../trackc_data/tutorials/links/ENCFF041XLP.bedpe", comment="#", header=None
)
loops = loops[[0, 1, 2, 3, 4, 5]]
display(loops.head(2))
0 1 2 3 4 5
0 chr10 62550000 62575000 chr10 63075000 63100000
1 chr10 38085000 38090000 chr10 42560000 42565000
[3]:
regions = ["chr7:153000000-151000000", "chr11:118500000-116500000"]

ten = tc.tenon(figsize=(8, 0.6))
ten.add(pos="bottom", height=1)
ten.add(pos="bottom", height=1, hspace=0.1)
ten.add(pos="bottom", height=0.8, hspace=0.1)

tc.pl.links_track(
    ax=ten.axs(0),
    data=loops,
    label="GM12878",
    regions=regions,
    color=["#66AC84", "tab:purple"],
    maxrange=3000000,
    anchor="inside",
)

tc.pl.links_track(
    ax=ten.axs(1),
    data="../../trackc_data/tutorials/links/ENCFF041XLP.bedpe",
    label="loops",
    regions=regions,
    color="tab:purple",
    invert_y=True,
    anchor="outside",
    ax_on=True,
)
tc.pl.multi_scale_track(
    ten.axs(2),
    regions=regions,
    scale_adjust="Mb",
    intervals=1,
    tick_rotation=0,
    tick_fontsize=10,
    colors=["#66AC84", "tab:purple"],
)
# tc.savefig('trackc_loops.pdf')
../_images/track_types_links_4_0.png

previous

bedGraphMatrix

next

zoomin

On this page
  • Get test data

© Copyright 2026, Zan Yuan.

Built with the PyData Sphinx Theme 0.14.4.