augur.validate_exportļƒ

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