nextstrain / augur

Pipeline components for real-time phylodynamic analysis
https://docs.nextstrain.org/projects/augur/
GNU Affero General Public License v3.0
268 stars 128 forks source link

Add escape hatch for the "Augur version incompatibility detected" error #1635

Closed corneliusroemer closed 1 month ago

corneliusroemer commented 2 months ago

Context

When working across machines with incongruent augur major versions, I get an error:

ERROR: Augur version incompatibility detected: \
  the JSON builds/wuhan/muts.json was generated by {'program': 'augur', 'version': '26.0.0'},\
  which is incompatible with the current augur version (25.3.0). \
  We suggest you rerun the pipeline using the current version of augur."

In this case I got the error when running augur clades on output from ancestral.

Description

We should allow ignoring this error through a command line option. I don't want to rerun the pipeline, and I don't need to rerun the pipeline because nothing relevant has changed for the command I'm trying to run. I know I can manually edit the version, but it'd be nice not to have to do that for each file every time.

Examples

We already do something similar for augur export:

OTHER OPTIONAL SETTINGS:
  --validation-mode {error,warn,skip}
                        Control if optional validation checks are performed and what happens if they fail. 'error' and 'warn' modes perform validation and emit messages
                        about failed validation checks. 'error' mode causes a non-zero exit status if any validation checks failed, while 'warn' does not. 'skip' mode
                        performs no validation. Note that some validation checks are non-optional and as such are not affected by this setting. (default: error)
  --skip-validation     Skip validation of input/output files, equivalent to --validation-mode=skip. Use at your own risk! (default: None)
victorlin commented 2 months ago

Isn't this error already from augur export? There is a test that shows --skip-validation applies to the version mismatch error.

https://github.com/nextstrain/augur/blob/9c9245833c8c893671d1522ba7ea8de3087d258c/tests/functional/export_v2/cram/augur-version-mismatch.t#L13-L28

corneliusroemer commented 2 months ago

No, I got this error in augur classes, sorry this wasn't clear from my issue description. I think the error can be thrown wherever we read any intermediate augur json files.