GenomeViz Class
GenomeViz
GenomeViz(
fig_width: float = 15,
fig_track_height: float = 1.0,
align_type: LiteralTypes.ALIGN_TYPE = "left",
feature_track_ratio: float = 1.0,
link_track_ratio: float = 1.0,
tick_track_ratio: float = 1.0,
track_spines: bool = False,
tick_style: LiteralTypes.TICK_STYLE = None,
plot_size_thr: float = 0,
tick_labelsize: int = 15,
)
GenomeViz Class
PARAMETER | DESCRIPTION |
---|---|
fig_width |
Figure width
TYPE:
|
fig_track_height |
Figure track height
(Figure height =
TYPE:
|
align_type |
Track align type (
TYPE:
|
feature_track_ratio |
Feature track ratio
TYPE:
|
link_track_ratio |
Link track ratio
TYPE:
|
tick_track_ratio |
Tick track ratio
TYPE:
|
track_spines |
If True, display track spines
TYPE:
|
tick_style |
Tick style (
TYPE:
|
plot_size_thr |
Plot feature, link size threshold.
If
TYPE:
|
tick_labelsize |
Tick label size
TYPE:
|
get_track
Get track by name
PARAMETER | DESCRIPTION |
---|---|
track_name |
Target track name
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
track
|
Target track
TYPE:
|
get_tracks
Get tracks
PARAMETER | DESCRIPTION |
---|---|
subtrack |
If True, include feature subtracks
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
tracks
|
Track list
TYPE:
|
get_feature_tracks
Get feature tracks
RETURNS | DESCRIPTION |
---|---|
feature_tracks
|
Feature track list
TYPE:
|
get_link_tracks
Get link tracks
RETURNS | DESCRIPTION |
---|---|
link_tracks
|
Link track list
TYPE:
|
add_feature_track
add_feature_track(
name: str,
size: int,
start_pos: int = 0,
labelsize: int = 20,
labelcolor: str = "black",
labelmargin: float = 0.01,
linewidth: int = 1,
linecolor: str = "grey",
link_track_ratio: float | None = None,
) -> FeatureTrack
Add feature track
Add feature track, and also add link track between feature tracks if other feature tracks already exist.
PARAMETER | DESCRIPTION |
---|---|
name |
Track name
TYPE:
|
size |
Track size
TYPE:
|
start_pos |
Track start position. Track start-end range is defined as (start_pos, start_pos + size).
TYPE:
|
labelsize |
Track label size
TYPE:
|
labelcolor |
Track label color
TYPE:
|
labelmargin |
Track label margin
TYPE:
|
linewidth |
Track line width
TYPE:
|
linecolor |
Track line color
TYPE:
|
link_track_ratio |
Link track ratio. By default, the link_track_ratio value set when GenomeViz was instantiated is used.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
feature_track
|
Feature track
TYPE:
|
add_link
add_link(
track_link1: tuple[str, int, int],
track_link2: tuple[str, int, int],
normal_color: str = "grey",
inverted_color: str = "red",
alpha: float = 0.8,
v: float | None = None,
vmin: float = 0,
vmax: float = 100,
curve: bool = False,
size_ratio: float = 1.0,
patch_kws: dict[str, Any] | None = None,
) -> None
Add link data to link track between adjacent feature tracks
PARAMETER | DESCRIPTION |
---|---|
track_link1 |
Track link1 (track_name, start, end)
TYPE:
|
track_link2 |
Track link2 (track_name, start, end)
TYPE:
|
normal_color |
Normal link color
TYPE:
|
inverted_color |
Inverted link color
TYPE:
|
alpha |
Color transparency
TYPE:
|
v |
Value for color interpolation
TYPE:
|
vmin |
Min value for color interpolation
TYPE:
|
vmax |
Max value for color interpolation
TYPE:
|
curve |
If True, bezier curve link is plotted
TYPE:
|
size_ratio |
Link size ratio to track
TYPE:
|
patch_kws |
Patch properties (e.g.
TYPE:
|
set_colorbar
set_colorbar(
figure: Figure,
bar_colors: list[str] | None = None,
alpha: float = 0.8,
vmin: float = 0,
vmax: float = 100,
bar_height: float = 0.2,
bar_width: float = 0.01,
bar_left: float = 1.02,
bar_bottom: float = 0,
bar_label: str = "",
bar_labelsize: float = 15,
tick_labelsize: float = 10,
) -> None
Set colorbars to figure
Set colorbars for similarity links between genome tracks
PARAMETER | DESCRIPTION |
---|---|
figure |
Matplotlib figure
TYPE:
|
bar_colors |
Bar color list
TYPE:
|
alpha |
Color transparency
TYPE:
|
vmin |
Colorbar min value
TYPE:
|
vmax |
Colorbar max value
TYPE:
|
bar_height |
Colorbar height
TYPE:
|
bar_width |
Colorbar width
TYPE:
|
bar_left |
Colorbar left position
TYPE:
|
bar_bottom |
Colorbar bottom position
TYPE:
|
bar_label |
Colorbar label name
TYPE:
|
bar_labelsize |
Colorbar label size
TYPE:
|
tick_labelsize |
Colorbar tick label size
TYPE:
|
plotfig
Plot figure
PARAMETER | DESCRIPTION |
---|---|
dpi |
DPI
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
figure
|
Plot figure result
TYPE:
|
savefig
Save figure to file
PARAMETER | DESCRIPTION |
---|---|
savefile |
Save file
TYPE:
|
dpi |
DPI
TYPE:
|
pad_inches |
Padding inches
TYPE:
|
savefig_html
savefig_html(
html_outfile: str | Path | io.StringIO | io.BytesIO, fig: Figure | None = None
) -> None
Save figure in html format
PARAMETER | DESCRIPTION |
---|---|
html_outfile |
Output HTML file (*.html)
TYPE:
|
fig |
If Figure set, plot html viewer using user customized fig
TYPE:
|