Skip to Content
DocsHoodini VizAPIAPI Reference

hoodini-viz API Reference

Auto-generated API documentation.

React Components

Main components exported by hoodini-viz for building genomic neighborhood visualizations.

<HoodiniDashboard />

HoodiniDashboard - Complete genomic neighborhood visualization dashboard.

Provides:

  • Automatic data loading (Parquet/TSV)
  • Sidebar with all controls
  • HoodiniViz visualization
  • DataGrid for tabular views
  • Full theme support
  • Imperative API via ref

Import:

import { HoodiniDashboard } from 'hoodini-viz';

Optional Props:

PropTypeDefaultDescription
children?ReactNode-Children to render inside the dashboard (overlays, etc).
className?string-CSS class for the container.
config?Partial<VisualizationConfig>-Master configuration object. Overrides DEFAULT_CONFIG values
controlledState?InitialState-Controlled state - when provided, component is fully control
data?Partial<ParsedData>-Pre-parsed data (bypass loading). Use this if you’ve already
dataPaths?DataPaths-Paths to data files (Parquet and/or TSV). At minimum, provid
disableThemeProvider?boolean-Disable the ThemeProvider wrapper (use if parent already pro
initialState?InitialState-Initial state for all visualization settings. Use this for u
onDataError?object-Called when data loading fails.
onDataLoaded?object-Called when data loading completes.
onLegendChange?object-Called when legend data updates.
onLoadingChange?object-Called when loading state changes.
onMetadataColumnsDetected?object-Called when metadata columns are detected from loaded data.
onObjectClick?object-Called when a gene/object is clicked.
onSelectionChange?object-Called when selection changes.
onStateChange?object-Callback when any state changes (for controlled mode).
preferParquet?boolean-Prefer Parquet files over text when both are available.
showSidebar?boolean-Show the sidebar with controls.
showToolbar?boolean-Show the toolbar (theme toggle, export button, table toggle)
style?CSSProperties-Inline styles for the container.
theme?"light" | "dark" | "system"-Theme mode override.
toolbarExtra?ReactNode-Custom toolbar content to render alongside default buttons.

<HoodiniViz />

Import:

import { HoodiniViz } from 'hoodini-viz';

Optional Props:

PropTypeDefaultDescription
adjacencyN?number-Adjacency parameter for filtering (N neighbors).
alignCluster?string | number-Cluster ID to align all hoods by. When set, genes matching t
alignLabels?boolean-Whether to align all phylo labels to the same X coordinate.
arrowheadHeight?number-Height of the arrowhead tip. 0 = flat rectangle, >0 = arrow
colorBy?string-Field to color genes by.
config?object-Master visualization configuration object. Contains all defa
cropToGuides?boolean-Whether to crop SVG exports to the guide bounds (only export
defaultAlign?"start" | "center" | "end"-Default alignment position when no alignCluster is set.
domainColorBy?string-Field to color domains by.
domainMetadata?object[]-Domain metadata with additional domain information.
domainPalette?PaletteConfig-Palette configuration for domain coloring
domainsByGene?Record<string, object[]>-Domain annotations organized by gene ID.
domainSource?string-Filter domains by source.
flashHood?string | number-Hood ID to flash/highlight temporarily.
forceUpdateCounter?number-Counter to force re-renders when external state changes.
formatGuidePreset?FormatPreset-Selected format preset for guides.
geneColorBy?string-Field to color genes by (alternative prop name).
geneColors?ColorMap-Custom colors for genes, overriding palette assignment.
geneHeight?number-Height of gene arrow shapes in pixels.
geneLabelBy?string-Field to use for gene labels (alternative prop name).
geneLabelPosition?"center" | "top" | "bottom"-Position of gene labels relative to genes.
geneLabelSize?number-Font size for gene labels (pixels).
genePalette?PaletteConfig-Palette configuration for gene coloring
genomeXScale?number-X-axis scale for genome section (percentage). 100 = actual s
gffFeatures?GFFFeatureData[]-Array of GFF features (genes) to display. Each feature shoul
hiddenGeneIds?Set<string>-Set of hidden gene IDs. Takes precedence over visibleGeneIds
hiddenHoodIds?Set<string | number>-Set of hidden hood IDs.
hoods?HoodData[]-Hood (genomic neighborhood) definitions. Each hood groups ge
labelBy?string-Field to use for gene labels.
ncRNAPalette?PaletteConfig-Palette configuration for ncRNA coloring
newickStr?string-Newick format string for the phylogenetic tree.
nucleotideLinkConfig?NucleotideLinkConfig-Configuration for nucleotide link visualization
nucleotideLinks?NucleotideLinkData[]-Nucleotide-level synteny links between genomic regions. Used
onLegendChange?object-Callback when legend data changes.
onObjectClick?object-Callback when a visualization object is clicked. Receives th
phyloColors?ColorMap-Custom colors for phylo labels, overriding palette assignmen
phyloLabelPosition?"after-tree" | "after-tracks"-Position of phylogenetic labels.
phyloLabelSize?number-Font size for phylogenetic labels (pixels).
phyloPalette?PaletteConfig-Palette configuration for phylogenetic label coloring
proteinLinkConfig?ProteinLinkConfig-Configuration for protein link visualization
proteinLinks?ProteinLinkData[]-Protein-protein homology links between genes. Used to draw c
proteinMetadata?Record<string, object>-Protein metadata for additional gene information. Used for c
regionPalette?PaletteConfig-Palette configuration for region coloring
rulerLabelSize?number-Font size for ruler labels (pixels).
scaleExportToFormat?boolean-Whether to scale SVG exports to match the format guide dimen
scaleRulerWithCrop?boolean-Whether to scale ruler dimensions proportionally when croppi
setGenomeViewRef?object-Callback to receive the GenomeView instance reference.
showConnectingLines?boolean-Whether to show connecting lines between tree and tracks.
showDomainLayer?boolean-Show/hide domain layer.
showFormatGuides?boolean-Whether format guides are visible.
showGeneLayer?boolean-Show/hide gene layer.
showGeneTextLayer?boolean-Show/hide gene text labels.
showNcRNALayer?boolean-Show/hide ncRNA layer.
showNucleotideLinkLayer?boolean-Show/hide nucleotide link layer.
showProteinLinkLayer?boolean-Show/hide protein link layer.
showRegionsLayer?boolean-Show/hide regions layer.
showRuler?boolean-Whether to show the ruler widget.
showScrollbar?boolean-Whether to show the scrollbar widget.
showSVGWidget?boolean-Whether to show the SVG export widget.
showTreeLayer?boolean-Show/hide tree layer.
showTreeTextLayer?boolean-Show/hide tree text labels.
strokeLineWidth?number-Stroke/line width for edges (e.g., domains, genes).
styleConfig?StyleConfig-Additional style configuration for layers.
treeColorBy?string-Field to color tree labels by.
treeLabelBy?string-Field to use for tree labels.
treeMetadata?Record<string, object>-Tree leaf metadata for phylogenetic labels and coloring. Key
treeXScale?number-X-axis scale factor for the phylogenetic tree (percentage).
ultrametric?boolean-Whether to render the tree as ultrametric (all leaves at sam
useDefaultGeneAlignment?boolean-Whether to use each hood’s default alignment gene (align_gen
visibleGeneIds?Set<string>-Set of visible gene IDs. Null = show all genes.
ySpacing?number-Vertical spacing between tree leaves (pixels).

Component Props

Prop interfaces for the React components.

HoodiniDashboardProps

Props for HoodiniDashboard component

PropertyTypeDescription
childrenReactNodeChildren to render inside the dashboard (overlays, etc).
classNamestringCSS class for the container.
configPartial<VisualizationConfig>Master configuration object. Overrides DEFAULT_CONFIG values.
controlledStateInitialStateControlled state - when provided, component is fully controlled. You must handle all state changes v
dataPartial<ParsedData>Pre-parsed data (bypass loading). Use this if you’ve already loaded/parsed the data externally.
dataPathsDataPathsPaths to data files (Parquet and/or TSV). At minimum, provide gffParquet/gffText and hoodsParquet/ho
disableThemeProviderbooleanDisable the ThemeProvider wrapper (use if parent already provides one).
initialStateInitialStateInitial state for all visualization settings. Use this for uncontrolled mode - values set once on mo
onDataErrorobjectCalled when data loading fails.
onDataLoadedobjectCalled when data loading completes.
onLegendChangeobjectCalled when legend data updates.
onLoadingChangeobjectCalled when loading state changes.
onMetadataColumnsDetectedobjectCalled when metadata columns are detected from loaded data.
onObjectClickobjectCalled when a gene/object is clicked.
onSelectionChangeobjectCalled when selection changes.
onStateChangeobjectCallback when any state changes (for controlled mode).
preferParquetbooleanPrefer Parquet files over text when both are available.
showSidebarbooleanShow the sidebar with controls.
showToolbarbooleanShow the toolbar (theme toggle, export button, table toggle).
styleCSSPropertiesInline styles for the container.
theme"light" | "dark" | "system"Theme mode override.
toolbarExtraReactNodeCustom toolbar content to render alongside default buttons.

HoodiniVizProps

Props for the HoodiniViz component.

HoodiniViz is the core visualization component that renders phylogenetic trees, genomic neighborhoods, protein domains, and homology links using deck.gl.

PropertyTypeDescription
adjacencyNnumberAdjacency parameter for filtering (N neighbors).
alignClusterstring | numberCluster ID to align all hoods by. When set, genes matching this cluster will be aligned vertically.
alignLabelsbooleanWhether to align all phylo labels to the same X coordinate.
arrowheadHeightnumberHeight of the arrowhead tip. 0 = flat rectangle, >0 = arrow shape.
colorBystringField to color genes by.
configobjectMaster visualization configuration object. Contains all default values for tree, gene, domain, link,
cropToGuidesbooleanWhether to crop SVG exports to the guide bounds (only export content within guides).
defaultAlign"start" | "center" | "end"Default alignment position when no alignCluster is set.
domainColorBystringField to color domains by.
domainMetadataobject[]Domain metadata with additional domain information.
domainPalettePaletteConfigPalette configuration for domain coloring
domainsByGeneRecord<string, object[]>Domain annotations organized by gene ID.
domainSourcestringFilter domains by source.
flashHoodstring | numberHood ID to flash/highlight temporarily.
forceUpdateCounternumberCounter to force re-renders when external state changes.
formatGuidePresetFormatPresetSelected format preset for guides.
geneColorBystringField to color genes by (alternative prop name).
geneColorsColorMapCustom colors for genes, overriding palette assignment.
geneHeightnumberHeight of gene arrow shapes in pixels.
geneLabelBystringField to use for gene labels (alternative prop name).
geneLabelPosition"center" | "top" | "bottom"Position of gene labels relative to genes.
geneLabelSizenumberFont size for gene labels (pixels).
genePalettePaletteConfigPalette configuration for gene coloring
genomeXScalenumberX-axis scale for genome section (percentage). 100 = actual size, 30 = compressed, >100 = stretched.
gffFeaturesGFFFeatureData[]Array of GFF features (genes) to display. Each feature should have seqid, start, end, strand, and at
hiddenGeneIdsSet<string>Set of hidden gene IDs. Takes precedence over visibleGeneIds.
hiddenHoodIdsSet<string | number>Set of hidden hood IDs.
hoodsHoodData[]Hood (genomic neighborhood) definitions. Each hood groups genes from a contig/sequence.
labelBystringField to use for gene labels.
ncRNAPalettePaletteConfigPalette configuration for ncRNA coloring
newickStrstringNewick format string for the phylogenetic tree.
nucleotideLinkConfigNucleotideLinkConfigConfiguration for nucleotide link visualization
nucleotideLinksNucleotideLinkData[]Nucleotide-level synteny links between genomic regions. Used to draw connecting polygons showing syn
onLegendChangeobjectCallback when legend data changes.
onObjectClickobjectCallback when a visualization object is clicked. Receives the clicked object’s data.
phyloColorsColorMapCustom colors for phylo labels, overriding palette assignment.
phyloLabelPosition"after-tree" | "after-tracks"Position of phylogenetic labels.
phyloLabelSizenumberFont size for phylogenetic labels (pixels).
phyloPalettePaletteConfigPalette configuration for phylogenetic label coloring
proteinLinkConfigProteinLinkConfigConfiguration for protein link visualization
proteinLinksProteinLinkData[]Protein-protein homology links between genes. Used to draw connecting curves between related genes.
proteinMetadataRecord<string, object>Protein metadata for additional gene information. Used for coloring by cluster, labeling, etc. Keys
regionPalettePaletteConfigPalette configuration for region coloring
rulerLabelSizenumberFont size for ruler labels (pixels).
scaleExportToFormatbooleanWhether to scale SVG exports to match the format guide dimensions.
scaleRulerWithCropbooleanWhether to scale ruler dimensions proportionally when cropping to guides. When true, ruler will appe
setGenomeViewRefobjectCallback to receive the GenomeView instance reference.
showConnectingLinesbooleanWhether to show connecting lines between tree and tracks.
showDomainLayerbooleanShow/hide domain layer.
showFormatGuidesbooleanWhether format guides are visible.
showGeneLayerbooleanShow/hide gene layer.
showGeneTextLayerbooleanShow/hide gene text labels.
showNcRNALayerbooleanShow/hide ncRNA layer.
showNucleotideLinkLayerbooleanShow/hide nucleotide link layer.
showProteinLinkLayerbooleanShow/hide protein link layer.
showRegionsLayerbooleanShow/hide regions layer.
showRulerbooleanWhether to show the ruler widget.
showScrollbarbooleanWhether to show the scrollbar widget.
showSVGWidgetbooleanWhether to show the SVG export widget.
showTreeLayerbooleanShow/hide tree layer.
showTreeTextLayerbooleanShow/hide tree text labels.
strokeLineWidthnumberStroke/line width for edges (e.g., domains, genes).
styleConfigStyleConfigAdditional style configuration for layers.
treeColorBystringField to color tree labels by.
treeLabelBystringField to use for tree labels.
treeMetadataRecord<string, object>Tree leaf metadata for phylogenetic labels and coloring. Keys are leaf IDs/names from the Newick tre
treeXScalenumberX-axis scale factor for the phylogenetic tree (percentage). 100 = actual size, 50 = compressed, 200
ultrametricbooleanWhether to render the tree as ultrametric (all leaves at same X).
useDefaultGeneAlignmentbooleanWhether to use each hood’s default alignment gene (align_gene column). When true, each hood aligns b
visibleGeneIdsSet<string>Set of visible gene IDs. Null = show all genes.
ySpacingnumberVertical spacing between tree leaves (pixels).

Configuration

Configuration interfaces for customizing visualization behavior.

DashboardPaletteConfig

Palette configuration

PropertyTypeDescription
alphaRange[number, number]
enabledboolean
namestring
numColorsnumber
reverseboolean
type"sequential" | "qualitative" | "diverging"

NucleotideLinkConfig

Nucleotide link visualization config

PropertyTypeDescription
colorBy"solid" | "identity_gradient"
maxAlphanumber
minAlphanumber
oppositeStrandColorRGBAColor
sameStrandColorRGBAColor
solidColorRGBAColor
strandColoringboolean
useAlphaboolean

ProteinLinkConfig

Protein link visualization config

PropertyTypeDescription
colorBy"source_gene" | "target_gene" | "identity_solid" | "identity_gradient"
maxAlphanumber
minAlphanumber
palettePaletteConfig
solidColorRGBAColor
useAlphaboolean

StyleConfig

Style configuration for visual layers

PropertyTypeDescription
geneobjectGene layer styles
treeobjectTree layer styles

VizNucleotideLinkConfig

Configuration for nucleotide link visualization

PropertyTypeDescription
colorBy"solid" | "identity_gradient"How to color links: ‘solid’ or ‘identity_gradient’
maxAlphanumberMaximum alpha value (0-1)
minAlphanumberMinimum alpha value (0-1)
oppositeStrandColorRGBAColorColor for opposite-strand alignments
sameStrandColorRGBAColorColor for same-strand alignments
solidColorRGBAColorSolid color for links
strandColoringbooleanWhether to use strand-based coloring
useAlphabooleanWhether to use alpha transparency

VizPaletteConfig

Palette configuration for coloring

PropertyTypeDescription
enabledbooleanWhether palette coloring is enabled
namestringName of the palette (e.g., ‘Set1’, ‘Blues’, ‘RdBu’)
numColorsnumberNumber of colors to use from the palette
reversebooleanWhether to reverse the palette order
type"sequential" | "qualitative" | "diverging"Palette type: ‘qualitative’, ‘sequential’, or ‘diverging’

VizProteinLinkConfig

Configuration for protein link visualization

PropertyTypeDescription
colorBy"source_gene" | "target_gene" | "identity_solid" | "identity_gradient"How to color links: ‘source_gene’, ‘target_gene’, ‘identity_solid’, ‘identity_gradient’
maxAlphanumberMaximum alpha value (0-1)
minAlphanumberMinimum alpha value (0-1)
palettePaletteConfigPalette for gradient coloring
solidColorRGBAColorSolid color when colorBy is ‘identity_solid’
useAlphabooleanWhether to use alpha transparency

Data Types

Data structures for passing genomic data to components.

DataPaths

Data paths for loading genomic data. Supports both Parquet and TSV/text formats. If a parquet path fails, will try the corresponding text path.

PropertyTypeDescription
domainsMetadataParquetstringPath to domain metadata parquet file
domainsMetadataTextstringPath to domain metadata TSV file
domainsParquetstringPath to domains parquet file
domainsTextstringPath to domains TSV file
gffParquetstringPath to GFF features parquet file
gffTextstringPath to GFF features text file
hoodsParquetstringPath to hoods parquet file
hoodsTextstringPath to hoods TSV file
ncRNAMetadataParquetstringPath to ncRNA metadata parquet file
ncRNAMetadataTextstringPath to ncRNA metadata TSV file (seqid, start, end, type, sequence, structure)
newickstringPath to Newick tree file
nucleotideLinksParquetstringPath to nucleotide links parquet file
nucleotideLinksTextstringPath to nucleotide links TSV file
proteinLinksParquetstringPath to protein links parquet file
proteinLinksTextstringPath to protein links TSV file
proteinMetadataParquetstringPath to protein metadata parquet file
proteinMetadataTextstringPath to protein metadata TSV file
treeMetadataParquetstringPath to tree metadata parquet file
treeMetadataTextstringPath to tree metadata TSV file

GFFFeatureData

GFF Feature representing a gene or genomic feature

PropertyTypeDescription
attributesRecord<string, string>
endnumber
seqidstring
startnumber
strand"+" | "-"
typestring

HoodData

Hood (genomic neighborhood) definition

PropertyTypeDescription
align_genestring
endnumber
hood_idstring | number
hoodIdstring | number
seqidstring
startnumber

NucleotideLinkData

Nucleotide-level synteny link

PropertyTypeDescription
endAnumber
endBnumber
seqidAstring
seqidBstring
similaritynumber
startAnumber
startBnumber

ParsedData

Parsed data available after loading

PropertyTypeDescription
domainMetadataRecord<string, any>
domainsByGeneRecord<string, any[]>
gffFeaturesany[]
hoodsany[]
ncRNAMetadataRecord<string, any>
newickStrstring
nucleotideLinksany[]
proteinLinksany[]
proteinMetadataRecord<string, any>
treeMetadataRecord<string, any>

ProteinLinkData

Protein-protein homology link

PropertyTypeDescription
gAIdstring
gBIdstring
similaritynumber

Other Interfaces

FormatPreset

PropertyTypeDescription
category"print" | "screen" | "presentation"
heightnumber
idstring
namestring
unit"mm" | "px"
widthnumber

HoodiniDashboardRef

Methods exposed via ref

PropertyTypeDescription
alignByClusterobjectAlign all hoods by a cluster
exportSVGobjectExport current view to SVG
focusGeneByIdobjectFocus on a specific gene by ID
focusHoodByIdobjectFocus on a specific hood by ID
focusTreeLeafByIdobjectFocus on a tree leaf by ID
getGenomeViewobjectGet the GenomeView instance
getLegendDataobjectGet current legend data
getParsedDataobjectGet parsed data
getPhyloTreeobjectGet the PhyloTree instance
getStateobjectGet current state (all settings)
resetAlignmentobjectReset alignment to defaults
setStateobjectSet state (partial update)
vizRefRefObject<any>Direct access to HoodiniViz ref

InitialState

Initial state configuration

PropertyTypeDescription
alignClusterstring | number
alignLabelsboolean
arrowheadHeightnumber
cropToGuidesboolean
defaultAlign"start" | "center" | "end"
domainColorBystring
domainPalettePaletteConfig
domainSourcestring
formatGuidePresetFormatPreset
geneColorBystring
geneHeightnumber
geneLabelBystring
geneLabelPosition"center" | "top" | "bottom"
geneLabelSizenumber
genePalettePaletteConfig
genomeXScalenumber
ncRNAPalettePaletteConfig
nucleotideLinkConfigNucleotideLinkConfig
phyloLabelPosition"after-tree" | "after-tracks"
phyloLabelSizenumber
phyloPalettePaletteConfig
proteinLinkConfigProteinLinkConfig
regionPalettePaletteConfig
rulerLabelSizenumber
scaleExportToFormatboolean
scaleRulerWithCropboolean
showConnectingLinesboolean
showDataTableboolean
showDomainLayerboolean
showFormatGuidesboolean
showGeneLayerboolean
showGeneTextLayerboolean
showNcRNALayerboolean
showNucleotideLinkLayerboolean
showProteinLinkLayerboolean
showRegionsLayerboolean
showRulerboolean
showScrollbarboolean
showTreeLayerboolean
showTreeTextLayerboolean
strokeLineWidthnumber
treeColorBystring
treeLabelBystring
treeXScalenumber
ultrametricboolean
useDefaultGeneAlignmentboolean
ySpacingnumber

Type Aliases

ColorMap

Color map for entities - maps entity ID to RGBA color

type ColorMap = Record<string, RGBAColor> | Map<string, RGBAColor> | None

RGBAColor

RGBA color as [r, g, b, a] where each value is 0-255

type RGBAColor = [number, number, number, number]

VisualizationConfig

Type for the complete visualization configuration

type VisualizationConfig = any

VizRGBAColor

RGBA color as [r, g, b, a] where each value is 0-255

type VizRGBAColor = [number, number, number, number]

Model Classes

Internal model classes for representing genomic data structures.

Domain

Methods:

  • createDomainPolygon()

    function createDomainPolygon(g: any, domainStart: any, domainEnd: any): any[][]
  • getConvexGenePolygon()

    function getConvexGenePolygon(g: any): any[][]
  • interpolateOnLine()

    function interpolateOnLine(line: any, t: any): any[]
  • normalize()

    function normalize(v: any): number[]
  • perpVector()

    function perpVector(p0: any, p1: any): number[]
  • setParentGene()

    function setParentGene(gene: any): void
  • updatePolygon()

    function updatePolygon(): void

Gene

Methods:

  • addDomain()

    function addDomain(domain: any): void
  • computeCenterLine()

    function computeCenterLine(): any[]
  • setTrackY()

    function setTrackY(y: any): void
  • updatePolygon()

    function updatePolygon(): void

GenomeView

Methods:

  • addDomainMetadata()

    function addDomainMetadata(domainMetadata: any): void
  • addDomains()

    function addDomains(domainsByGene: any): void
  • addFeatures()

    function addFeatures(gffFeatures: any): void
  • addNucleotideLinks()

    function addNucleotideLinks(links: any, color: number[], adjacencyN: number): void
  • addProteinLinks()

    function addProteinLinks(links: any, color: number[], adjacencyN: number): void
  • alignAllToCenter()

    function alignAllToCenter(): void
  • alignAllToEnd()

    function alignAllToEnd(): void
  • alignAllToStart()

    function alignAllToStart(): void
  • alignByDefaultGenes()

    function alignByDefaultGenes(): void
  • alignCluster()

    function alignCluster(clusterId: any): void
  • applyDomainPalette()

    function applyDomainPalette(paletteConfig: any): void
  • applyHoods()

    function applyHoods(hoods: any): void
  • applyNucleotideLinkColors()

    function applyNucleotideLinkColors(colorConfig: any): void
  • applyProteinLinkColors()

    function applyProteinLinkColors(colorConfig: any): void
  • buildEdgesWithMetadata()

    function buildEdgesWithMetadata(): any
  • buildNodePoints()

    function buildNodePoints(selectedNode: any, colorLeavesBy: any): any
  • buildPhyloLabels()

    function buildPhyloLabels(phyloLabelPosition: string): any
  • buildScaleBar()

    function buildScaleBar(): any[]
  • computeGenePrevalence()

    function computeGenePrevalence(categoryField: string): Map<any, any>
  • computeTrackPositions()

    function computeTrackPositions(): void
  • fadeColor()

    function fadeColor(color: any, factor: any): any[]
  • filterBySelectedNode()

    function filterBySelectedNode(selectedNode: any): object
  • flipTrack()

    function flipTrack(hood_id: any): void
  • flipTrackState()

    function flipTrackState(hood_id: any): void
  • flipTrackStateWithCentering()

    function flipTrackStateWithCentering(hood_id: any): void
  • flipTrackToggle()

    function flipTrackToggle(hood_id: any): void
  • getAllDomains()

    function getAllDomains(): any
  • getAllNcRNAs()

    function getAllNcRNAs(): unknown[]
  • getAllNonCodingFeatures()

    function getAllNonCodingFeatures(): unknown[]
  • getAllRegions()

    function getAllRegions(): unknown[]
  • getClusterSummary()

    function getClusterSummary(): any
  • getGeneIdFromAttributes()

    function getGeneIdFromAttributes(attrs: any): any
  • getHoodIdFromSeqid()

    function getHoodIdFromSeqid(seqid: any): any
  • getHoodIdsFromSeqid()

    function getHoodIdsFromSeqid(seqid: any): any
  • getNodeDescendantLeaves()

    function getNodeDescendantLeaves(node: any): any
  • getNucleotidePolygons()

    function getNucleotidePolygons(): any[]
  • getProteinPolygons()

    function getProteinPolygons(): any[]
  • getRegionPolygons()

    function getRegionPolygons(): any[]
  • getSeqidFromHoodId()

    function getSeqidFromHoodId(hood_id: any): any
  • getTrackAnchor()

    function getTrackAnchor(hood_id: any): number
  • getTrackY()

    function getTrackY(seqid: any): any
  • getTrackYByHoodId()

    function getTrackYByHoodId(hood_id: any): any
  • initGenes()

    function initGenes(): void
  • setNcRNAColorsWithPalette()

    function setNcRNAColorsWithPalette(paletteConfig: any): void
  • setProteinClusters()

    function setProteinClusters(clusterMap: any): void
  • setProteinClustersWithPalette()

    function setProteinClustersWithPalette(clusterMap: any, paletteConfig: any): void
  • setRegionColorsWithPalette()

    function setRegionColorsWithPalette(paletteConfig: any): void
  • shiftTrack()

    function shiftTrack(hood_id: any, delta: any): void
  • shiftTrackMinus1kb()

    function shiftTrackMinus1kb(hood_id: any): void
  • shiftTrackPlus1kb()

    function shiftTrackPlus1kb(hood_id: any): void
  • toggleTrackFlip()

    function toggleTrackFlip(hood_id: any): void
  • updateGlobalBounds()

    function updateGlobalBounds(): void
  • updateLinkPositions()

    function updateLinkPositions(): void
  • flipCoordinate()

    function flipCoordinate(x: any, anchor: any): number
  • getGeneVisualX()

    function getGeneVisualX(gene: any, genomeView: any): number
  • getTransformedXUnified()

    function getTransformedXUnified(x: any, anchor: any, offset: any, flipped: any): any

PhyloNode

Methods:

  • getLeaves()
    function getLeaves(): any

PhyloTree

Methods:

  • assignInternalX()

    function assignInternalX(node: any): any
  • assignX()

    function assignX(leaves: any): void
  • buildEdges()

    function buildEdges(): any[]
  • collectAll()

    function collectAll(): void
  • computeDistances()

    function computeDistances(): void
  • getLeafNodes()

    function getLeafNodes(): any
  • ladderize()

    function ladderize(ascending: boolean): void

    Ladderize the tree by sorting branches at each node by the number of descendant leaves. This produces a cleaner visual representation matching Taxonium’s algorithm exactly. Uses iterative traversal to avoid stack overflow on large trees.

  • layout()

    function layout(leavesOrder: any): void
  • makeUltrametric()

    function makeUltrametric(): void

    Convert tree to ultrametric format where all leaves are equidistant from the root This adjusts branch lengths to make the tree ultrametric while preserving topology

  • parseNewick()

    function parseNewick(s: any): PhyloNode
  • scaleY()

    function scaleY(): void
  • setParents()

    function setParents(): void

Utility Functions

getPaletteColors

function getPaletteColors(paletteName: any, numColors: any, reverse: boolean): any

getQualitativePalettes

function getQualitativePalettes(minColors: number, maxColors: number): any

getSequentialPalettes

function getSequentialPalettes(minColors: number, maxColors: number): any

Constants

DEFAULT_CONFIG

const DEFAULT_CONFIG: object

FORMAT_PRESETS

const FORMAT_PRESETS: FormatPreset[]
Last updated on