You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:#21474Author: @mvdbeek
Created: 2025-12-16
State: OPEN
Labels: kind/enhancement, kind/feature, area/visualizations
Summary
We're working on an end 2 end differential expression workflow and it'd be awesome if we can build and embed a multi-track IGV instance in pages and workflow reports.
Requirements
What's necessary is a config syntax that works with multiple inputs and collections.
Feature #21474: IGV Configuration for Templates - Implementation Approaches
Summary
Build and embed multi-track IGV instances in Galaxy Pages and Workflow Reports. The feature requires a configuration syntax that supports multiple inputs and collections for creating complex visualizations with alignment tracks, gene models, and other genomic data.
Current Architecture
Visualization Embedding Overview
Galaxy uses "Galaxy Flavored Markdown" to embed visualizations in Pages and Workflow Reports. The system has three main layers:
Feature #21474: IGV Configuration for Templates - Code Research
Summary
This document contains research findings for implementing multi-track IGV visualization embedding in Galaxy pages and workflow reports, as requested in GitHub issue #21474.
1. Existing Visualization Embedding in Pages/Workflow Reports
Current Syntax
Galaxy uses "Galaxy Flavored Markdown" for embedding visualizations. The syntax is:
**Pros:**
- Maximum flexibility
- Can specify per-track options
- Follows established Vitessce pattern
**Cons:**
- More verbose
- Requires JSON editing
### Option C: Hybrid Approach
Support both:
1. Simple directive for single-track: `visualization(visualization_id=igv, history_dataset_id=X)`
2. JSON block for multi-track configurations
**Recommended:** Option C provides backward compatibility while enabling advanced use cases.
## 7. Collection Handling Considerations
### Expanding Collections to Individual Tracks
For `alignment_tracks=<hdca_id>`, the system needs to:
1. Resolve HDCA to individual HDA elements
2. Generate track configuration for each element
3. Handle nested collections (e.g., `list:list` structures)
**Backend code for collection resolution:**
```python
# lib/galaxy/managers/hdcas.py
class HDCASerializer:
def serialize_to_view(hdca, ...) # Already exists
Frontend collection handling:
// Similar to existing collection display logicfunctionexpandCollection(collectionId: string): Track[]{// Fetch collection elements// Create track entry for each HDA}
API Endpoints Needed
Existing endpoints that can be leveraged:
GET /api/dataset_collections/{id} - Get collection contents
GET /api/datasets/{id}/display - Get dataset content URL
8. Implementation Roadmap
Phase 1: Backend Foundation
Update markdown_parse.py to accept collection references in visualization directive
Add collection resolution in markdown_util.py
Create data provider for multi-track visualization configs
Phase 2: IGV Plugin
Create basic IGV visualization plugin using igv.js
Define plugin XML with track configuration schema
Implement iframe communication for track updates
Phase 3: Frontend Integration
Update MarkdownVisualization.vue to handle multi-track configs
Assessment: Very recent issue with minimal external engagement so far. However, the request comes from a core committer working on a specific workflow use case.
Related Issues Analysis
Directly Related: Visualization in Reports/Collections
Key Finding: #20420 (by same author @mvdbeek) directly addresses HDCA visualization in reports - a prerequisite for #21474. This shows a pattern of building toward multi-track visualization capability.
This feature has strong internal demand from the Galaxy development team for a specific workflow use case. While external community engagement is minimal (likely due to issue being very new), the request aligns with:
Years of requests for embedded genome browsers in reports
Active visualization modernization work
Specific BRC project needs
The feature represents a natural evolution of recently completed IGV.js work and addresses a gap in workflow reporting capabilities. Implementation appears to be proceeding with @guerler assigned.
Feature #21474: IGV Configuration for Templates - Importance Assessment
Issue:#21474Feature: Build and embed multi-track IGV instances in Pages and Workflow Reports
1. User Demand
Rating: MEDIUM-HIGH
Signals
Signal
Strength
Evidence
Core team request
Strong
@mvdbeek (core committer) opened issue for differential expression workflow
BRC project dependency
Strong
@nekrut: "We REALLY need this now (in particular for BRC)"
5-year IGV history
Strong
IGV.js requested since 2020 (#11075), finally merged Sept 2025
Community reactions
Weak
Issue new (~4 weeks), 0 reactions, 1 comment
Related requests
Medium
#11426 (JBrowse embed, 8 comments), #20420 (HDCA in reports)
Assessment
Internal demand is strong - this is a direct ask from a core committer building an end-to-end workflow. The feature represents the logical next step after IGV.js integration (merged Sept 2025) and addresses a long-standing gap in workflow reporting capabilities.
External community engagement is minimal, but the issue is new and the underlying need (embedded genome browsers in reports) has been requested since 2021.
2. Strategic Value
Rating: HIGH
Alignment with Project Direction
Factor
Assessment
Visualization modernization
Directly aligned - complements IGV.js integration, Vega work
Workflow reporting maturity
Directly aligned - addresses key gap in report capabilities
Significant improvement for RNA-seq/genomics workflows
Reduces friction - Users stay in Galaxy instead of exporting to external viewers
Better reproducibility - Visualization configuration stored with workflow
Strategic Assessment
This feature sits at the intersection of multiple project priorities: visualization modernization, workflow report enhancement, and BRC project support. The JSON configuration pattern (following Vitessce) establishes a reusable foundation for future multi-dataset visualizations.
LOW - Feature is additive with clear implementation patterns established by Vitessce.
5. Recommendation
PRIORITIZE NOW
Rationale
Strategic alignment: Directly supports BRC project and visualization modernization
Effort justified: Medium effort for high strategic value
Low risk: No breaking changes, clear implementation path
Foundation building: Establishes pattern for future multi-track visualizations
Active development: IGV.js recently integrated, momentum exists
Internal customer: Core team needs this for specific workflow use case
Implementation Sequence
JSON configuration support for visualization directive (Phase 1)
IGV visualization plugin with multi-track support (Phase 2)
Collection expansion logic (Phase 3)
UI configuration tooling (Phase 4, optional)
Dependencies to Address First
Fix broken visualization insertion (#18448) if not already resolved
HDCA visualization in reports (#20420) for collection support
Success Criteria
Multi-track IGV embedded in workflow report
Support for alignment tracks (BAM collection) + annotation tracks (GTF)
Configuration via JSON block in Galaxy Flavored Markdown
Works with workflow output label references
Summary
Dimension
Rating
User Demand
Medium-High
Strategic Value
High
Effort
Medium
Risk
Low
Recommendation
Prioritize Now
This feature addresses a clear internal need, aligns with multiple strategic priorities, and has manageable implementation risk. The recent IGV.js integration provides foundation and momentum. Recommend proceeding with JSON configuration approach (Approach 2 from code research) as it provides maximum flexibility with established patterns.
Feature #21474: IGV Configuration for Templates - Implementation Plan
Overview
Build and embed multi-track IGV instances in Galaxy Pages and Workflow Reports, supporting multiple inputs and collections for differential expression workflows.
The recommended approach uses a dedicated JSON configuration block within Galaxy Flavored Markdown, following the pattern established by Vitessce visualization.
This feature request proposes building and embedding multi-track IGV instances in Galaxy Pages and Workflow Reports to support end-to-end differential expression workflows. The recommended approach uses a JSON configuration block (similar to Vitessce) that allows specifying multiple alignment tracks from collections plus annotation tracks like GTF files. This feature has strong internal demand from core team members (@mvdbeek, @nekrut for BRC project), represents a natural evolution of the recently integrated IGV.js visualization (Sept 2025), and aligns with ongoing visualization modernization efforts. With medium effort and low risk (no breaking changes, clear implementation patterns), this feature is recommended for immediate prioritization.
Importance Assessment Summary
Dimension
Rating
User Demand
Medium-High
Strategic Value
High
Effort Estimate
Medium
Risk
Low
Recommendation
Prioritize Now
Key Factors
Internal demand is strong: Core committer building differential expression workflow
No breaking changes: Additive JSON configuration block syntax
Key Questions for Discussion
Requirements Clarification
Collection handling: Should large collections (50+ BAMs) be automatically limited, or should users manually select which elements become tracks?
Reference genome: Support only named genomes (hg38, mm10) or also allow custom FASTA datasets as references?
Track grouping: For collections, should tracks be grouped visually (e.g., "Sample Alignments" as a collapsible group) or kept as flat individual tracks?
Implementation Decisions
Index file handling: How should BAI files be associated with BAM files when both are needed for IGV display? Same collection element? Separate reference?
PDF export behavior: Static screenshot capture, placeholder text ("Interactive visualization not available in PDF"), or omit entirely?
Configuration UI priority: Is a visual JSON builder needed for MVP, or is JSON-only acceptable initially?
Scope Boundaries
Other genome browsers: Should this infrastructure be designed to also support JBrowse2 embedding, or focus solely on IGV?
Track-level options: Support IGV display options per-track (color, height, visibility mode) in v1, or defer to future enhancement?
Concerns
Scope Creep Risk
The request is focused on IGV specifically, but the infrastructure could generalize to any multi-track genome browser. Consider whether to:
Implement IGV-specific solution (faster, simpler)
Build generalized multi-track visualization framework (more effort, more reusable)
Recommendation: Start with IGV-specific, refactor to generalize if JBrowse2 request follows.
Breaking Changes
None identified. The JSON configuration block is additive and doesn't affect existing visualization() directive syntax.
Long-term Maintenance
IGV.js version pinning needed to prevent breaking changes from upstream
JSON schema should be versioned if configuration format evolves
Collection expansion logic could become complex for nested collections
Dependencies
Two related issues may need resolution first:
#18448 - Inserting visualizations into workflow reports is broken
#20420 - Enable visualization in reports for HDCAs (same author)