Currently, the analysis directory is loosely coupled with the pathogen workflow that it is intended to run with.¹ That is, a user needs to invoke nextstrain run with the same pathogen and workflow that the analysis directory's contents were created for.
nextstrain run measles phylogenetic .
I think we should make this coupling more explicit. Analysis directories are likely to look similar with a config.yaml and supporting files. Because of the similarities across pathogen workflows, the contents might even run successfully under a different pathogen workflow, mixing result files from different pathogens.
¹ I'm speculating that each analysis directory is only created for one pathogen workflow. Maybe that's not the case and users would prefer to use the same config across different workflows? Even then, it seems weird to mix files from runs of different pathogen workflows, and I think a better pattern is to use separate analysis directories with identical config files.
Possible solution
Read the information from a file. Example contents:
pathogen: measles@main
workflow: phylogenetic
Options:
- Introduce a new configuration file for the analysis directory, e.g.
nextstrain.yaml or nextstrain-analysis.yaml.
- Overload the existing
config.yaml (workflow-specific, but standard).
Then the user can simply invoke nextstrain run without any arguments.
Prototypes
- b12e21a:
nextstrain run [--pathogen] [--workflow] [<analysis-directory>] writes to nextstrain-analysis.yaml
Currently, the analysis directory is loosely coupled with the pathogen workflow that it is intended to run with.¹ That is, a user needs to invoke
nextstrain runwith the samepathogenandworkflowthat the analysis directory's contents were created for.nextstrain run measles phylogenetic .I think we should make this coupling more explicit. Analysis directories are likely to look similar with a
config.yamland supporting files. Because of the similarities across pathogen workflows, the contents might even run successfully under a different pathogen workflow, mixing result files from different pathogens.¹ I'm speculating that each analysis directory is only created for one pathogen workflow. Maybe that's not the case and users would prefer to use the same config across different workflows? Even then, it seems weird to mix files from runs of different pathogen workflows, and I think a better pattern is to use separate analysis directories with identical config files.
Possible solution
Read the information from a file. Example contents:
Options:
nextstrain.yamlornextstrain-analysis.yaml.config.yaml(workflow-specific, but standard).Then the user can simply invoke
nextstrain runwithout any arguments.Prototypes
nextstrain run [--pathogen] [--workflow] [<analysis-directory>]writes to nextstrain-analysis.yaml