Skip to content

nextstrain run: Define available workflows in the nextstrain-pathogen.yaml #454

@joverlee521

Description

@joverlee521

Context

Currently it's unclear what workflows are available for a pathogen unless you go to the pathogen repo (or in the future, pathogen docs). We can improve the discoverability of the workflows in a pathogen repo by defining the workflows in nextstrain-pathogen.yaml. This fits in with the idea of having per-workflow compatibility registration suggested in nextstrain/seasonal-flu#226 (comment).

Examples

For most pathogens (e.g. measles), this would just list the 3 standard workflows

---
compatibility:
  nextstrain run:
    - ingest
    - phylogenetic
    - nextclade

For pathogens with custom workflows (e.g. avian-flu), this would list the custom workflows

---
compatibility:
  nextstrain run:
    - genome-focused
    - segment-focused

Then we can add a new command or extend nextstrain version --pathogens that would list these available workflows.

$ nextstrain version --pathogens
Nextstrain CLI x.x.x (standalone)

Pathogens
  avian-flu (default)
    avian-flu@master
      genome-focused
      segment-focused
  measles
    measles@main (default)
      ingest
      phylogenetic
      nextclade 

Additional feature to define workflow Snakefile/config file

If we explicitly list out the workflows in the nextstrain-pathogen.yaml, I think this also opens the door to defining the location of the Snakfile and/or config file for the workflow. This is mainly inspire by my current work in mpox to update the phylo workflow support nextstrain run.

Instead of creating 4 extra directories/Snakefile per build (as shown in nextstrain/mpox#327), the phylogenetic directory structure could remain the same. The nextstrain-pathogen.yaml would define the Snakefile and config file used per workflow.

---
compatibility:
  nextstrain run:
    ingest:
        snakefile: ~ # Set to null to use the default ingest/Snakefile
        configfile: ~ # Set to null to use the default config ingest/defaults/config.yaml
    phylogenetic/all-clades:
        snakefile: phylogenetic/Snakefile
        configfile: phylogenetic/defaults/mpxv/config.yaml
    phylogenetic/clade-I: 
        snakefile: phylogenetic/Snakefile
        configfile: phylogenetic/defaults/clade-i/config.yaml
    phylogenetic/clade-IIb: 
        snakefile: phylogenetic/Snakefile
        configfile: phylogenetic/defaults/hmpxv1/config.yaml
    phylogenetic/lineage-B.1:
        snakefile: phylogenetic/Snakefile
        configfile: phylogenetic/deafults/hmpxv1_big/config.yaml

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions