Supported Output Widget Types
Below is a comprehensive list of supported output widget types.Plot Output
Plot Output
The Plot output widget allows you to display matplotlib Figures, SubFigures, Axes, or Plotly figures in your notebook interface.Plotly Figure Example:
Widget Parameters
label: string optional label displayed above the plotsource: Figure | SubFigure | Axes | BaseFigure the plot object to display. Can be:- Matplotlib Figure
- Matplotlib SubFigure
- Matplotlib Axes
- Plotly Figure (BaseFigure)
key: string optional unique identifier for the widgetUsage Notes
- The plot widget automatically detects the plot title from the source object
- The widget creates an interactive display of your plot that users can interact with
- In the notebook outline, the plot title from the source object will be used if no label is provided
Examples
Matplotlib Axes Example:Table Output
Table Output
The Table output widget allows you to display tabular data in an interactive table format.
Widget Parameters
label: string optional label displayed above the tablesource: DataFrame the pandas DataFrame to displaykey: string optional unique identifier for the widgetIGV Viewer
IGV Viewer
The IGV output widget allows you to visualize and interact with your genomic data.
Widget Parameters
options: dict required dictionary of options for configuring the IGV browser. See Browser Creation
for a list of available options. See Tracks for configuration options for each track.Usage Notes
- The IGV widget accepts both Latch paths and generic URLs.
- If a Latch path is provided without an index, the widget will automatically generate and pull an index for the file.
Molstar Viewer
Molstar Viewer
The Molstar output widget allows you to visualize and interact with molecular structures using the Molstar 3D viewer. It uses MolViewSpec (MVS), a toolkit for standardized description of reproducible molecular visualizations. MolViewSpec uses a tree-based approach to compose complex 3D molecular scenes from simple building blocks.
Quick Start
Widget Parameters
label: string optional label displayed above the vieweroptions: MolstarOptions required dictionary for configuring the Molstar viewer layout. Contains:layout: Layout configuration optionslayout_shown_by_default: Controls visibility of UI elementslogs: bool - Show/hide logs panel by defaultsequence_viewer: bool - Show/hide sequence viewer by defaultright_controls: bool - Show/hide right control panel by defaultleft_controls: bool - Show/hide left control panel by default
molstarviewspec_builder: Root | None optional MolViewSpec builder for defining the molecular structure viewkey: string optional unique identifier for the widgetWidget Value
The Molstar widget returns selection data when users interact with the structure:Selection Data Structure
When users select residues in the viewer, the widget returns:selection: SequenceSelection | None - Contains:segments: List of selected sequence segmentsfull_sequence: Complete sequence stringstructure_label: Optional label for the structure- Each segment contains:
chain_id: Chain identifierresidues: List of selected residues with detailed informationsequence: Sequence string for the segmentstart_residueandend_residue: Segment boundaries
MolViewSpec Builder
The MolViewSpec builder provides a powerful tree-based API for defining molecular visualizations. The builder supports:- Download & Parse: Load structures from URLs in various formats (PDB, mmCIF, bcif)
- Structure: Create structures with support for assemblies, crystal symmetry, and multi-model structures
- Component: Select substructures by chain, residue range, or custom selectors
- Representation: Define visualization modes (cartoon, ball-and-stick, surface, etc.)
- Color: Apply custom colors and opacity to selections
- Label & Tooltip: Add text labels and interactive tooltips
- Camera & Focus: Control camera position and orientation
- Volumetric Data: Render electron density maps
- Primitives: Draw custom shapes (ellipses, boxes, arrows, meshes)
- Annotations: Create data-driven components with external annotation files
Usage Notes
- The Molstar widget is fully interactive, allowing users to rotate, zoom, and select parts of the structure
- Use the
molstarviewspec_builderparameter to programmatically define the initial view and styling - The
valueproperty provides reactive access to the current selection - MolViewSpec supports both remote URLs and Latch paths for loading structure files
- The builder uses a chainable API for building complex visualizations incrementally