augur.validate_export moduleļ
Functions that are from earlier versions of augur validate and havenāt yet been moved into validate.py. Thereās a lot of duplication here which can be abstracted and refactored over time.
- augur.validate_export.collectAAMutationGenesV1(root)ļ
Returns a set of all genes specified in the tree in the āaa_mutsā objects
- augur.validate_export.collectBranchLabels(root)ļ
- augur.validate_export.collectMutationGenes(root)ļ
Returns a set of all genes specified in the tree in the āaa_mutsā objects
- augur.validate_export.collectTreeAttrsV1(root)ļ
Collect all keys specified on node->attr (or node->traits) throughout the tree If the values of these keys are strings, then also collect the values
- augur.validate_export.collectTreeAttrsV2(root, warn)ļ
Collect all keys specified on node[ānode_attrsā] throughout the tree and the values associated with them. Note that this will only look at attributes which are themselves objects with a value property. I.e. a node attribute node[ānode_attrsā][ādivā] -> numeric will not be collected. Returns a tuple. return[0]: dict of node_attr_property -> x, where x is a dict with keys count -> INT, values -> SET, onAllNodes -> BOOL. return[1]: INT of number of terminal nodes in tree
- augur.validate_export.ensure_no_duplicate_names(root, ValidateError)ļ
Check that all node names are identical, which is required for auspice (v2) JSONs.
- augur.validate_export.verifyMainJSONIsInternallyConsistent(data, ValidateError)ļ
Check possible sources of conflict within the main (unified) JSON This function is only used for schema v2.0 In an ideal world, the JSON schema would be able to validate this, however this function performs tests which are not possible to define in the schema (as of JSON schema v6).
- augur.validate_export.verifyMetaAndOrTreeJSONsAreInternallyConsistent(meta_json, tree_json, ValidateError)ļ
Check all possible sources of conflict internally & between the metadata & tree JSONs This is only that which cannot be checked by the schemas