FeatureSegment Class
FeatureSegment
Feature Segment Class
PARAMETER | DESCRIPTION |
---|---|
name
|
Segment name
TYPE:
|
start
|
Segment start position
TYPE:
|
end
|
Segment end position
TYPE:
|
feature_track
|
Parent feature track
TYPE:
|
gid2feature_dict
property
gid & feature dict (Sort by start coordinate)
transform_features
property
Coordinate transformed features
Segment-level coordinate is transformed to track-level coordinate.
transform_exon_features
property
Coordinate transformed exon features
Segment-level coordinate is transformed to track-level coordinate.
transform_text_kws_list
property
Coordinate transformed text keywords list
is_within_range
Check target pos is within segment range
transform_coord
Transform segment-level coordinate to track-level coordinate
PARAMETER | DESCRIPTION |
---|---|
x
|
Segment level coordinate(s)
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
track_coord
|
Track level coordinate(s)
TYPE:
|
add_text
add_text(
x: float,
text: str,
*,
size: float = 12,
vpos: VPos = "top",
hpos: HPos = "left",
ymargin: float = 0.2,
rotation: float = 45,
**kwargs
) -> None
Add text
PARAMETER | DESCRIPTION |
---|---|
x
|
Text x coordinate
TYPE:
|
text
|
Text content
TYPE:
|
size
|
Text size
TYPE:
|
vpos
|
Vertical position (
TYPE:
|
hpos
|
Horizontal position (
TYPE:
|
ymargin
|
Y margin
TYPE:
|
rotation
|
Text rotation
TYPE:
|
**kwargs
|
Text properties (e.g.
TYPE:
|
add_sublabel
add_sublabel(
text: str | None = None,
*,
size: float = 12,
pos: str = "bottom-left",
ymargin: float = 0.2,
rotation: float = 0,
**kwargs
) -> None
Add sublabel
PARAMETER | DESCRIPTION |
---|---|
text
|
Text content. If None,
TYPE:
|
size
|
Text size
TYPE:
|
pos
|
Label position ([
TYPE:
|
ymargin
|
Y margin
TYPE:
|
rotation
|
Text rotation
TYPE:
|
**kwargs
|
TYPE:
|
add_feature
add_feature(
start: int,
end: int,
strand: int = 1,
*,
plotstyle: PlotStyle = "arrow",
arrow_shaft_ratio: float = 0.5,
extra_tooltip: dict[str, str] | None = None,
label: str = "",
text_kws: dict[str, Any] | None = None,
**kwargs
) -> None
Add feature
PARAMETER | DESCRIPTION |
---|---|
start
|
Start position
TYPE:
|
end
|
End position
TYPE:
|
strand
|
Feature strand
TYPE:
|
plotstyle
|
Feature plot style (
TYPE:
|
arrow_shaft_ratio
|
Arrow shaft size ratio
TYPE:
|
extra_tooltip
|
Extra tooltip dict for html figure
TYPE:
|
label
|
Feature label text
TYPE:
|
text_kws
|
TYPE:
|
**kwargs
|
Patch properties (e.g.
TYPE:
|
add_features
add_features(
features: SeqFeature | list[SeqFeature],
*,
plotstyle: PlotStyle = "arrow",
arrow_shaft_ratio: float = 0.5,
label_type: str | None = None,
label_handler: Callable[[str], str] | None = None,
extra_tooltip: dict[str, str] | None = None,
ignore_outside_range: bool = False,
text_kws: dict[str, Any] | None = None,
**kwargs
) -> None
Add features (BioPython SeqFeature)
PARAMETER | DESCRIPTION |
---|---|
features
|
BioPython SeqFeature or SeqFeature list
TYPE:
|
plotstyle
|
Feature plot style (
TYPE:
|
arrow_shaft_ratio
|
Arrow shaft size ratio
TYPE:
|
label_type
|
Label type (e.g.
TYPE:
|
label_handler
|
Label handler function to customize label display.
If None, set label handler to exclude labels containing
TYPE:
|
extra_tooltip
|
Extra tooltip dict for html figure
TYPE:
|
ignore_outside_range
|
If True and the feature position is outside the range of the track segment, ignore it without raising an error.
TYPE:
|
text_kws
|
TYPE:
|
**kwargs
|
Patch properties (e.g.
TYPE:
|
add_exon_feature
add_exon_feature(
locs: list[tuple[int, int]],
strand: int = 1,
*,
plotstyle: PlotStyle = "arrow",
arrow_shaft_ratio: float = 0.5,
label: str = "",
patch_kws: dict[str, Any] | None = None,
intron_patch_kws: dict[str, Any] | None = None,
text_kws: dict[str, Any] | None = None
) -> None
Add exon feature
PARAMETER | DESCRIPTION |
---|---|
locs
|
Exon locations (e.g.
TYPE:
|
strand
|
Feature strand
TYPE:
|
plotstyle
|
Feature plot style (
TYPE:
|
arrow_shaft_ratio
|
Arrow shaft size ratio
TYPE:
|
label
|
Feature label
TYPE:
|
patch_kws
|
Exon patch properties (e.g.
TYPE:
|
intron_patch_kws
|
Intron patch properties (e.g.
TYPE:
|
text_kws
|
TYPE:
|
add_exon_features
add_exon_features(
features: SeqFeature | list[SeqFeature],
*,
plotstyle: PlotStyle = "arrow",
arrow_shaft_ratio: float = 0.5,
label_type: str | None = None,
label_handler: Callable[[str], str] | None = None,
extra_tooltip: dict[str, str] | None = None,
ignore_outside_range: bool = False,
patch_kws: dict[str, Any] | None = None,
intron_patch_kws: dict[str, Any] | None = None,
text_kws: dict[str, Any] | None = None
) -> None
Add exon features (BioPython SeqFeature)
PARAMETER | DESCRIPTION |
---|---|
features
|
BioPython SeqFeature or SeqFeature list
TYPE:
|
plotstyle
|
Feature plot style (
TYPE:
|
arrow_shaft_ratio
|
Arrow shaft size ratio
TYPE:
|
label_type
|
Label type (e.g.
TYPE:
|
label_handler
|
Label handler function to customize label display.
If None, set label handler to exclude labels containing
TYPE:
|
extra_tooltip
|
Extra tooltip dict for html figure
TYPE:
|
ignore_outside_range
|
If True and the feature position is outside the range of the track segment, ignore it without raising an error.
TYPE:
|
patch_kws
|
Exon patch properties (e.g.
TYPE:
|
intron_patch_kws
|
Intron patch properties (e.g.
TYPE:
|
text_kws
|
TYPE:
|