Skip to content

Commit

Permalink
clades: Add test for --skip-validation
Browse files Browse the repository at this point in the history
Note: I didn't actually use a command to generate
`aa_muts_generated_by.json`. I just copied the "generated_by" entry from
another JSON file.
  • Loading branch information
victorlin committed Oct 23, 2024
1 parent feef8d5 commit c0b6dac
Show file tree
Hide file tree
Showing 2 changed files with 355 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/functional/clades/cram/augur-version-mismatch.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Integration tests for augur clades.

$ source "$TESTDIR"/_setup.sh

Node-data JSONs produced from a different major version of augur
are not allowed.

$ ${AUGUR} clades \
> --tree "$TESTDIR/../data/tree.nwk" \
> --mutations "$TESTDIR/../data/aa_muts_generated_by.json" \
> --clades "$TESTDIR/../data/clades.tsv" \
> --output-node-data clades.json
ERROR: Augur version incompatibility detected: the JSON .*aa_muts_generated_by\.json.* was generated by \{'program': 'augur', 'version': '21.1.0'\}, which is incompatible with the current augur version \([.0-9]+\). We suggest you rerun the pipeline using the current version of augur. (re)
[2]

Skipping validation allows mismatched augur versions to be used without error.

$ ${AUGUR} clades \
> --tree "$TESTDIR/../data/tree.nwk" \
> --mutations "$TESTDIR/../data/aa_muts_generated_by.json" \
> --clades "$TESTDIR/../data/clades.tsv" \
> --output-node-data clades.json \
> --skip-validation &>/dev/null
332 changes: 332 additions & 0 deletions tests/functional/clades/data/aa_muts_generated_by.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,332 @@
{
"generated_by": {
"program": "augur",
"version": "21.1.0"
},
"nodes": {
"BRA/2016/FC_6706": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"COL/FLR_00008/2015": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [
"L169I",
"G292E"
],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"Colombia/2016/ZC204Se": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": [
"N17K"
]
}
},
"DOM/2016/BB_0183": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [
"D208G"
],
"NS2A": [
"L152M"
],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [
"I322V",
"Q650R",
"D878E"
],
"PRO": []
}
},
"EcEs062_16": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"HND/2016/HU_ME59": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [
"G100A"
],
"NS2A": [],
"NS2B": [],
"NS3": [
"M572L"
],
"NS4A": [],
"NS4B": [],
"NS5": [
"R525C"
],
"PRO": []
}
},
"NODE_0000001": {
"aa_muts": {
"2K": [],
"CA": [
"D107E"
],
"ENV": [],
"MP": [],
"NS1": [
"R324W"
],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [
"T833A"
],
"PRO": []
}
},
"NODE_0000002": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [
"M349V"
],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"NODE_0000003": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"NODE_0000004": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"NODE_0000005": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"NODE_0000006": {
"aa_muts": {}
},
"NODE_0000007": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"NODE_0000008": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"PAN/CDC_259359_V1_V3/2015": {
"aa_muts": {
"2K": [],
"CA": [],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [
"M32I"
],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [],
"PRO": []
}
},
"PRVABC59": {
"aa_muts": {
"2K": [],
"CA": [
"I80T"
],
"ENV": [],
"MP": [],
"NS1": [],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [
"A91V"
],
"PRO": []
}
},
"VEN/UF_1/2016": {
"aa_muts": {
"2K": [],
"CA": [
"E76D"
],
"ENV": [],
"MP": [],
"NS1": [
"T301P"
],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [
"A833T"
],
"PRO": []
}
},
"ZKC2/2016": {
"aa_muts": {
"2K": [],
"CA": [
"S109N"
],
"ENV": [
"K419R"
],
"MP": [],
"NS1": [
"R324Q"
],
"NS2A": [],
"NS2B": [],
"NS3": [],
"NS4A": [],
"NS4B": [],
"NS5": [
"V114M",
"N624S",
"K670R"
],
"PRO": []
}
}
}
}

0 comments on commit c0b6dac

Please sign in to comment.