Skip to content

Gene API

Entry Point

ts
import { GeneTooltip } from 'bio-tooltips/mygene';

Methods

MethodDescription
GeneTooltip.init(config?)Initializes gene tooltips and returns a cleanup function.
GeneTooltip.preload()Preloads optional heavy dependencies used by gene visuals.
GeneTooltip.filterNestedList(query, listId)Filters nested rendered lists by text.

Config Type

GeneTooltipConfig combines the shared CoreTooltipConfig with MyGene-specific options.

OptionDefaultDescription
apimygeneAdapter identifier.
selector.gene-tooltipElements to attach gene tooltips to.
truncateSummary4Summary line clamp.
displayModule defaultsSection visibility and collapse state.
ideogramModule defaultsIdeogram dimensions and labels.
pathwaySourcekeggPathway source: reactome, kegg, or wikipathways.
pathwayCount3Number of pathways shown before overflow UI.
domainCount3Number of protein domains shown before overflow UI.
transcriptCount3Number of transcripts shown before overflow UI.
structureCount3Number of PDB structures shown before overflow UI.
generifCount3Number of GeneRIFs shown before overflow UI.
display.footertrueMyGene attribution and JSON link.

For exact exported types, see the generated MyGene reference.