cytoscape¶
Module for visualization in Cytoscape.
Supports loading of networks, annotations and storing of images.
The visualization talks to a running Cytoscape through
py4cytoscape, which is the optional
cytoscape extra (pip install sbmlutils[cytoscape]). Without it, and without
a running Cytoscape, the functions log a warning and do nothing instead of
raising, so a model creation script which visualizes at the end still finishes.
AnnotationShapeType
¶
Bases: StrEnum
Shape of an annotation on the cytoscape canvas.
AnnotationShape
dataclass
¶
AnnotationShape(
type,
x_pos,
y_pos,
height,
width,
fill_color="#000000",
opacity=100,
border_thickness=1,
border_color="#FFFFFF",
border_opacity=100,
canvas="background",
z_order=0,
)
Shape annotation on the cytoscape canvas.
AnnotationText
dataclass
¶
AnnotationText(
text,
x_pos,
y_pos,
font_size=12,
font_family="Arial",
font_style="bold",
color="#000000",
angle=0,
canvas="background",
)
Text annotation on the cytoscape canvas.
AnnotationBoundedText
dataclass
¶
AnnotationBoundedText(
type,
text,
x_pos,
y_pos,
height,
width,
fill_color="#000000",
opacity=100,
border_thickness=1,
border_color="#FFFFFF",
border_opacity=100,
font_size=12,
font_family="Arial",
font_style="bold",
color="#000000",
angle=0,
canvas="background",
)
Text annotation inside a shape on the cytoscape canvas.
visualize_antimony
¶
Visualize antimony in cytoscape.
visualize_sbml
¶
Visualize SBML networks in cytoscape.
Returns dictionary with "networks" and "views".
read_layout_xml
¶
Read own xml layout information form cytoscape.
apply_layout
¶
Apply layout information from Cytoscape to SBML networks.
export_image
¶
Helper for exporting cytoscape images.
format (str): Type of image to export, e.g., PNG (default), JPEG, PDF, SVG, PS (PostScript).