A dynamic, interactive web application for exploring and visualizing seasonal Influenza A and B clade nomenclature in real-time.
The Influenza Clade Explorer provides an intuitive interface to navigate the complex hierarchical relationships of influenza virus clades. This tool visualizes hemagglutinin (HA) subclade nomenclature for H3N2, H1N1pdm, and B/Victoria lineages, pulling data directly from authoritative sources in real-time.
Since data is fetched dynamically from GitHub:
Automatic Updates: New clades appear as soon as they're added to the official repositories Manual Refresh: Click "🔄 Refresh Data" to reload without page refresh Version Tracking: Check the footer for the current version
All clade nomenclature data is sourced from the official Influenza Clade Nomenclature GitHub repositories:
- H3N2:
seasonal-flu/h3n2/ha - H1N1pdm:
seasonal-flu/h1n1pdm/ha - B/Victoria:
seasonal-flu/vic/ha
Each lineage contains:
clade_definitions.tsv- Defines clades, parent relationships, and defining mutationsaliases.tsv- Maps shortened clade aliases to full nomenclaturerepresentative_isolates.tsv- Lists representative sequences for each clade
The application always pulls fresh data from the GitHub repositories on each page load:
- On Initialization: Data is fetched directly from GitHub's raw content API
- Refresh Button: Users can manually reload data without refreshing the page
- No Caching: Ensures users always see the most current nomenclature
fetchData(lineage) → parseData() → buildHierarchy() → renderTree()
-
Fetch (
fetchData):- Fetches three TSV files from GitHub raw URLs
- Uses JavaScript's
fetch()API with error handling - Supports CORS-enabled public GitHub content
-
Parse (
parseData):- Parses TSV format using D3's
d3.tsvParse() - Extracts clade names, parent relationships, mutations, and aliases
- Merges data from multiple files into unified clade objects
- Parses TSV format using D3's
-
Build Hierarchy (
buildHierarchy):- Constructs tree structure from parent-child relationships
- Identifies root nodes (clades without parents)
- Handles orphaned nodes and circular references
- Computes depth levels for layout
-
Render (
renderTree):- Generates hierarchical tree layout using D3.js
- Applies custom positioning algorithms
- Renders nodes, edges, and mutation labels
- Enables interactive features (zoom, pan, selection)
- Hierarchical Visualization: Parent-child relationships shown as connected nodes
- Color Coding: Major clade groups distinguished by color
- Mutation Labels: Defining mutations displayed on edges between clades
- Dynamic Positioning: Adjustable spacing and layout parameters
- Click Selection: Click nodes to view detailed information
- Multi-Select: Ctrl/Cmd + Click to compare multiple clades
- Search: Real-time search to highlight specific clades
- Filter: Show only descendants of selected clades
- Zoom & Pan: Navigate large trees with mouse/trackpad
- Label Size: Adjust text size (8-30px)
- Edge Length: Control horizontal spacing (40-150px)
- Vertical Spacing: Adjust node separation (12-150px)
- Node Size: Modify circle radius (3-20px)
- Mutation Font: Change mutation label size (5-30px)
Displays detailed information for selected clades:
- Clade name and alias
- Parent clade
- Defining mutations (color-coded)
- Representative isolates
- Multi-clade comparison mode
Sortable, filterable table view with:
- All clades and metadata
- Sortable columns (clade, parent, mutations, etc.)
- Real-time filtering
- CSV export functionality
- Framework: Quarto (HTML output)
- Visualization: D3.js v7
- Styling: Custom CSS with CSS Grid and Flexbox
- Data Format: TSV (Tab-Separated Values)
- Deployment: Static site (GitHub Pages compatible)
If you use this tool in your research, please cite:
@software{akin2025flu,
author = {Akin, Elgin},
title = {Influenza Clade Explorer},
year = {2025},
url = {https://github.com/yourusername/flu-clade-explorer}
}