Skip to content

API Reference v1.0.60

A reference for every public API exported by RBrowser. All signatures are taken from the @rbrowser/main v1.0.60 TypeScript source, split across dedicated pages by renderer / per-Manager / functions & entry. Complex types live on the same page as the Manager that owns them; plain config types are collected on Types.

How to read

  • method marks a method; property marks a property / getter; event marks an event; type marks an exported TS type.
  • All method signatures use TypeScript syntax; parameter names match the source.
  • Large config types (IChannel / IReferenceConfig, etc.) are defined in full on their owning Manager page or on Types.

Top-level exports

Package name: @rbrowser/main. The following are all the public symbols the package actually exports — only these can be imported from the top level.

import {
  // Entry & renderer
  mountBrowser,
  TranscriptBrowserRenderer,
  App,
  VERSION,

  // Global singleton managers
  historyManager,
  favouriteManager,

  // Manager classes
  FavouriteManager,
  ChannelManager,
  ReferenceManager,
  HighlightManager,
  HeaderPanelManager,

  // Preset configs
  defaultConfig,
  headerBase,
} from "@rbrowser/main";

import type {
  // Top-level config
  IRBrowerConfig,    // top-level config (note the spelling: single "s")
  ITRConfig,         // @deprecated alias of IRBrowerConfig
  IRendererConfig,
  ITargetConfig,
  IRegionConfig,
  IGridConfig,
  IAnnotationConfig,
  IReferenceConfig,
  ISettingsConfig,
  IPanelsSettings,
  IHeaderPanelsSettings,
  IPanelToggle,
  IGridSettings,
  IHeaderPanelConfig,
  IChannelLabelConfig,

  // Reference resources
  ISpeciesInfo,
  IAssemblyInfo,
  IFastaReference,
  IAnnotationReference,
  ITranscriptomeReference,
  IChromSizesReference,
  ICytobandReference,
  IGenomeReference,

  // Locus
  ILocus,
  ILocusRna,
  ILocusDna,

  // Channel
  IChannel,
  IChannelData,
  IChannelStyle,
  IChannelLabelStyle,
  IChannelAnnotation,

  // Sub-module config
  IAxisConfig,
  ILoadingConfig,

  // Events / interaction
  IDomain,
  InteractionMode,
  NavigationChangeEvent,

  // Tooltip / Cursor / Highlight
  TooltipMode,
  TooltipTrigger,
  CursorMode,
  CursorCoordMode,
  IHighlightRegion,

  // Manager events & types
  ChannelManagerEvent,
  ChannelManagerListener,
  IChannelManagerDelegate,
  ReferenceManagerEvent,
  ReferenceManagerListener,
  ITrans,
  FavouriteEvent,
  FavouriteListener,
  HeaderButtonId,
  HeaderPanelEvent,
  HeaderPanelEventDetail,
  HeaderPanelListener,

  // Renderer state
  IRendererState,
  RendererStatus,

  // Preset types
  DefaultConfig,
  IFeaturePartConfig,

  // Literal unions
  GridDisplay,
  RenderQuality,
  ViewMode,
} from "@rbrowser/main";

Do NOT import these from the top level

LocusManager, SearchManager, and locusKey / locusToRegionString / regionStringToLocus exist in the source but are not exported from @rbrowser/main. LocusManager / SearchManager are reached only via the renderer.locusManager / renderer.searchManager instance properties; an ILocus is obtained directly from renderer.locusManager.getLocus() — you never assemble one by hand.

The package also exports three ready-to-run demo configs: rendererRNAConfigTEST, rendererQTLsConfig, rendererHighlightConfig — pass any of them straight to new TranscriptBrowserRenderer(config) to sanity-check the renderer.


Singleton vs instance

Kind Symbol How to obtain Notes
Global singleton historyManager top-level import One shared history for the whole process
Global singleton favouriteManager top-level import One shared favourites store for the whole process
Instance property channelManager renderer.channelManager Bound to the renderer instance
Instance property referenceManager renderer.referenceManager Bound to the renderer instance
Instance property locusManager renderer.locusManager Bound to the renderer instance
Instance property searchManager renderer.searchManager Bound to the renderer instance
Instance property highlightManager renderer.highlightManager Bound to the renderer instance
Instance property headerPanelManager renderer.headerPanelManager Bound to the renderer instance

Multiple browsers share the singletons

historyManager / favouriteManager are process-level singletons. When a page hosts more than one TranscriptBrowserRenderer, they share the same history and favourites.


Find it by topic

Page Contents
Renderer All TranscriptBrowserRenderer methods / getters / callbacks: lifecycle, navigation, RNA/CDS modes, viewport, data, export, reference, Tooltip / Cursor / Highlight / Grid / Legend toggles, Channel convenience add/remove, state
Channel Manager ChannelManager + IChannel / IChannelData / IChannelStyle / IChannelAnnotation / IChannelGroup
Reference Manager ReferenceManager + ITrans / DefaultLocusPlan
Locus Manager renderer.locusManager + ILocus / ILocusRna / ILocusDna / ILocusSetInput / LocusListener
Search Manager renderer.searchManager + ITransGroup
Highlight Manager HighlightManager + IHighlightRegion
Header Panel Manager HeaderPanelManager + HeaderButtonId and events
History Manager historyManager + HistoryEvent / HistoryListener
Favourite Manager favouriteManager / FavouriteManager + FavouriteEvent / FavouriteListener
Functions & entry mountBrowser / App / defaultConfig / headerBase / VERSION
Types Top-level config types: IRBrowerConfig / IRendererConfig / IReferenceConfig and sub-resources, enums, etc.