Skip to content

feat: Integrate mantis-analysis-template as reusable pipeline templates#200

Open
tayllatheodoro wants to merge 1 commit intomainfrom
feature/merge-mantis-analysis-template
Open

feat: Integrate mantis-analysis-template as reusable pipeline templates#200
tayllatheodoro wants to merge 1 commit intomainfrom
feature/merge-mantis-analysis-template

Conversation

@tayllatheodoro
Copy link
Collaborator

Merges the mantis-analysis-template repository into biahub as a collection of reusable analysis pipeline templates. Includes three template variants for different microscopy workflows.

Templates Added

1. Mantis Template (templates/mantis/)

Complete pipeline for standard Mantis microscope workflows:

  • Zarr conversion and data management
  • Label-free phase reconstruction with waveorder
  • Virtual staining with VisCy
  • Light-sheet deskewing and deconvolution
  • Multi-channel registration (manual/beads/ANTs)
  • XYZ stabilization
  • Cell tracking with ultrack
  • Visualization and QC tools

2. Dragonfly Template (templates/dragonfly/)

Pipeline variant optimized for Dragonfly spinning disk confocal systems

  • Similar structure to Mantis template
  • Dragonfly-specific configurations and parameters

3. Zebrafish Physics Pipeline (templates/zebraphysics-mantis-pipeline/) Specialized pipeline for zebrafish developmental biology experiments:

  • Extended drift analysis tools
  • Physics-specific data processing
  • Customized tracking parameters
  • Additional SLURM batch configurations

New Features

Template CLI Commands

# List available templates
biahub template list

# Show template details
biahub template info mantis

# Initialize new project from template
biahub template init -t mantis -o ./my-project --dataset exp_001

Template Structure

Each template includes:

  • 0-convert/: Data conversion and setup
  • 1-preprocess/: Label-free and light-sheet preprocessing
  • 2-assemble/: Data assembly and concatenation
  • 3-visualization/: Visualization and QC scripts
  • run_pipeline.py: Pipeline orchestration
  • check_logs.py: SLURM log monitoring
  • README.md: Complete documentation

Files Added

  • templates/ - New templates directory with all three templates (~250 files)
  • biahub/cli/template_manager.py - Template management CLI
  • templates/README.md - Templates overview and usage guide
  • MANTIS_TEMPLATE_INTEGRATION.md - Detailed integration documentation

Files Modified

  • biahub/cli/main.py - Added template CLI commands

Usage

Copy Template for New Project

cp -r biahub/templates/mantis ~/my-experiment
cd ~/my-experiment
export DATASET=my_dataset_name
python run_pipeline.py

Using Template CLI

# Initialize new project
biahub template init -t mantis -o ~/my-experiment --dataset exp_2026

# List templates
biahub template list

# Get template info
biahub template info mantis

Integration Approach

Templates are kept separate from biahub core code to:

  • ✅ Preserve modularity and clear separation
  • ✅ Enable easy customization by users
  • ✅ Support multiple workflow variants
  • ✅ Provide real-world usage examples
  • ✅ Allow independent versioning

Templates orchestrate biahub commands and provide:

  • Workflow logic and orchestration
  • Environment management
  • Error handling and logging
  • Visualization tools

Source

Original repository: https://github.com/czbiohub-sf/mantis-analysis-template

  • main branch → templates/mantis/
  • dragonfly branch → templates/dragonfly/
  • zebraphysics-mantis-pipeline branch → templates/zebraphysics-mantis-pipeline/

Documentation

  • templates/README.md - Quick start guide
  • MANTIS_TEMPLATE_INTEGRATION.md - Detailed integration docs
  • Individual template READMEs - Workflow-specific guides

Benefits

For Users:

  • Quick project initialization from proven workflows
  • Best practices and configurations included
  • Complete documentation
  • Easy customization

For Biahub:

  • Real-world usage examples
  • Integration testing
  • Community contribution pathway
  • Flexible template ecosystem

See MANTIS_TEMPLATE_INTEGRATION.md for complete details.

Merges the mantis-analysis-template repository into biahub as a collection
of reusable analysis pipeline templates. Includes three template variants
for different microscopy workflows.

## Templates Added

### 1. Mantis Template (templates/mantis/)
Complete pipeline for standard Mantis microscope workflows:
- Zarr conversion and data management
- Label-free phase reconstruction with waveorder
- Virtual staining with VisCy
- Light-sheet deskewing and deconvolution
- Multi-channel registration (manual/beads/ANTs)
- XYZ stabilization
- Cell tracking with ultrack
- Visualization and QC tools

### 2. Dragonfly Template (templates/dragonfly/)
Pipeline variant optimized for Dragonfly spinning disk confocal systems
- Similar structure to Mantis template
- Dragonfly-specific configurations and parameters

### 3. Zebrafish Physics Pipeline (templates/zebraphysics-mantis-pipeline/)
Specialized pipeline for zebrafish developmental biology experiments:
- Extended drift analysis tools
- Physics-specific data processing
- Customized tracking parameters
- Additional SLURM batch configurations

## New Features

### Template CLI Commands
```bash
# List available templates
biahub template list

# Show template details
biahub template info mantis

# Initialize new project from template
biahub template init -t mantis -o ./my-project --dataset exp_001
```

### Template Structure
Each template includes:
- **0-convert/**: Data conversion and setup
- **1-preprocess/**: Label-free and light-sheet preprocessing
- **2-assemble/**: Data assembly and concatenation
- **3-visualization/**: Visualization and QC scripts
- **run_pipeline.py**: Pipeline orchestration
- **check_logs.py**: SLURM log monitoring
- **README.md**: Complete documentation

## Files Added

- `templates/` - New templates directory with all three templates (~250 files)
- `biahub/cli/template_manager.py` - Template management CLI
- `templates/README.md` - Templates overview and usage guide
- `MANTIS_TEMPLATE_INTEGRATION.md` - Detailed integration documentation

## Files Modified

- `biahub/cli/main.py` - Added template CLI commands

## Usage

### Copy Template for New Project
```bash
cp -r biahub/templates/mantis ~/my-experiment
cd ~/my-experiment
export DATASET=my_dataset_name
python run_pipeline.py
```

### Using Template CLI
```bash
# Initialize new project
biahub template init -t mantis -o ~/my-experiment --dataset exp_2026

# List templates
biahub template list

# Get template info
biahub template info mantis
```

## Integration Approach

Templates are kept separate from biahub core code to:
- ✅ Preserve modularity and clear separation
- ✅ Enable easy customization by users
- ✅ Support multiple workflow variants
- ✅ Provide real-world usage examples
- ✅ Allow independent versioning

Templates orchestrate biahub commands and provide:
- Workflow logic and orchestration
- Environment management
- Error handling and logging
- Visualization tools

## Source

Original repository: https://github.com/czbiohub-sf/mantis-analysis-template
- main branch → templates/mantis/
- dragonfly branch → templates/dragonfly/
- zebraphysics-mantis-pipeline branch → templates/zebraphysics-mantis-pipeline/

## Documentation

- `templates/README.md` - Quick start guide
- `MANTIS_TEMPLATE_INTEGRATION.md` - Detailed integration docs
- Individual template READMEs - Workflow-specific guides

## Benefits

**For Users:**
- Quick project initialization from proven workflows
- Best practices and configurations included
- Complete documentation
- Easy customization

**For Biahub:**
- Real-world usage examples
- Integration testing
- Community contribution pathway
- Flexible template ecosystem

See MANTIS_TEMPLATE_INTEGRATION.md for complete details.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@tayllatheodoro tayllatheodoro self-assigned this Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant