zoomin#

[1]:
import trackc as tc
[2]:
full_regions = "chr18:45000000-78077248"
zoom_regions = ["chr18:47400000-48280000", "chr18:75280000-74030000"]
neo_domain_regions = ["chr18:47950000-48280000", "chr18:75280000-74850000"]

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

tc.pl.zoomin(
    ax=ten.axs(0),
    raw_regions=full_regions,
    zoomin_regions=zoom_regions,
    line_on=True,
    fill=False,
    alpha=0.5,
)
tc.pl.zoomin(
    ax=ten.axs(1),
    raw_regions=zoom_regions,
    zoomin_regions=neo_domain_regions,
    line_on=False,
    fill=True,
    alpha=0.5,
)
../_images/track_types_zoomin_2_0.png
[3]:
full_regions = "chr18:45000000-78077248"
zoom_regions = ["chr18:47400000-48280000", "chr18:75280000-74030000"]
neo_domain_regions = ["chr18:47950000-48280000", "chr18:75280000-74850000"]

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

tc.pl.scale_track(
    ax=ten.axs(0), region=full_regions, scale_adjust="Mb", tick_pos="top", ratio2ax=1
)
tc.pl.zoomin(
    ax=ten.axs(0),
    raw_regions=full_regions,
    zoomin_regions=zoom_regions,
    line_on=True,
    fill=False,
    alpha=0.5,
)
tc.pl.multi_scale_track(
    ten.axs(1),
    regions=zoom_regions,
    scale_adjust="Mb",
    intervals=2,
    tick_rotation=0,
    tick_fontsize=10,
)

tc.pl.zoomin(
    ax=ten.axs(2),
    raw_regions=zoom_regions,
    zoomin_regions=neo_domain_regions,
    line_on=False,
    fill=True,
    alpha=0.5,
)
tc.pl.multi_scale_track(
    ten.axs(3),
    regions=neo_domain_regions,
    scale_adjust="Mb",
    intervals=1,
    tick_rotation=0,
    tick_fontsize=10,
)
# tc.savefig('trackc_zoomin.pdf')
../_images/track_types_zoomin_3_0.png