Skip to content

feat: implement fast_typing.wdl workflow for #55#75

Merged
crashfrog merged 4 commits into
mainfrom
worktree-agent-a8038f34
May 29, 2026
Merged

feat: implement fast_typing.wdl workflow for #55#75
crashfrog merged 4 commits into
mainfrom
worktree-agent-a8038f34

Conversation

@crashfrog
Copy link
Copy Markdown
Member

Summary

Implements the fast typing strategy workflow that performs allelic typing using MinHash-based similarity only, skipping alignment entirely. This is the fastest strategy suitable for high-quality assemblies or when speed is critical.

  • Creates fast_typing.wdl workflow in torchbase/workflows/builtin/
  • Implements shared task modules: minhash.wdl and profile_lookup.wdl
  • Pipeline: MinHash sketching → similarity comparison → allele calling → profile lookup
  • Output includes standardized JSON with method metadata (strategy="fast", alignment_used=false)
  • Supports multi-scheme torches with automatic scheme-prefixed locus name handling

Acceptance Criteria Met

  • torchbase/workflows/builtin/fast_typing.wdl exists
  • Workflow imports shared tasks from tasks/ directory
  • Pipeline completes without alignment stage
  • Accepts standard inputs (query_sequences, allele_database, profiles_table)
  • Outputs standardized JSON result format
  • Can be executed via miniwdl independently (validated with miniwdl check)
  • Tests verify fast workflow completes successfully (27 tests pass)

Test Results

  • 27 structure and validation tests pass
  • miniwdl check passes without errors
  • Result format verified with required fields: profile_id, status, confidence, method.strategy, method.alignment_used

Implementation Details

  • Tasks use Python-based implementations for portability
  • MinHash similarities computed using Sourmash-compatible logic
  • Profile matching supports exact matches and novel profile detection
  • Confidence scoring based on MinHash similarity thresholds
  • Handles edge cases: empty queries, partial profiles, multi-scheme databases

Co-authored-by: Claude Sonnet 4.5 noreply@anthropic.com

crashfrog and others added 2 commits May 28, 2026 09:20
Add comprehensive test suite for fast typing workflow (issue #55). Tests
verify:
- Workflow file structure and location in builtin/
- Import of shared tasks from tasks/ directory
- Linear pipeline without alignment stage
- Standard inputs (query_sequences, allele_database, profiles_table)
- Standardized JSON output format
- Strategy metadata (strategy: "fast", alignment_used: false)
- MinHash-only allele calling and profile lookup
- Edge cases (empty queries, partial profiles)

All tests fail as expected (RED phase). Total: 27 failing tests covering
file structure, imports, pipeline logic, output format, and execution.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Create torchbase/workflows/builtin/fast_typing.wdl with MinHash-based typing pipeline
- Implement shared tasks: minhash.wdl (sketch_sequences, compare_sketches, call_alleles)
- Implement profile_lookup.wdl task for profile matching and result generation
- Pipeline: sketch query → compare → call alleles → lookup profile
- Output includes standardized JSON with method.strategy='fast' and alignment_used=false
- Supports multi-scheme torches with scheme-prefixed locus names
- All 27 structural and validation tests pass
- Syntax validated via miniwdl check

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@crashfrog crashfrog force-pushed the worktree-agent-a8038f34 branch from db051a7 to 82ad93c Compare May 28, 2026 14:21
crashfrog added 2 commits May 28, 2026 11:24
- Accept updated profile_lookup.wdl from main
- Update fast_typing.wdl to use new output name and alignment_used parameter
- Allow 'alignment_used' parameter in fast workflow (it's metadata, not a task call)
- Check specifically for alignment.wdl import, not just presence of word 'alignment'
- Check for align_and_call task name, not generic 'align' substring
@crashfrog crashfrog merged commit 69e31d4 into main May 29, 2026
2 checks passed
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