trackc.pl.vhighlight#
- trackc.pl.vhighlight(axs: Sequence[Axes] | Axes | None = None, regions: Sequence[str] | str | None = None, light_regions: Sequence[str] | str | None = None, colors: Sequence[str] | None = 'yellow', alpha: float = 0.3)[source]#
Plot vhighlight track, support for multiple or reverse genome regions.
- Parameters:
axs (
matplotlib.axes.Axesobject) –regions (str | str list) – The raw genome regions, some of these regions will be selected to zoom in. e.g.
"chr6:1000000-2000000"or["chr6:1000000-2000000", "chr3:5000000-4000000", "chr5"]The start can be larger than the end (eg."chr6:2000000-1000000"), which means the reverse regionlight_regions (str | str list) – regions to be zoomin, The format is the same as regions. the regions of light_regions should be located in the regions
colors (str list) – the colors of the light_regions
alpha (float) – alpha of plot color
Example
>>> regions = ['18:47400000-48280000', '18:75280000-74030000'] >>> light_regions = ['18:47950000-48280000', '18:75280000-74850000']
>>> ten = tc.tenon(figsize=(6,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)
>>> tc.pl.vhighlight(axs=[ten.axs(0), ten.axs(1)], colors=['y', 'b'], regions=regions, light_regions=light_regions) >>> tc.pl.multi_scale_track(ten.axs(2), regions=regions, scale_adjust='Mb', intervals=2)