augur.validate module

Validate a set of JSON files intended for visualization in auspice.

exception augur.validate.ValidateError

Bases: Exception

augur.validate.checkSchemaIsValid(schema, name)
augur.validate.collectAAMutationGenesNextfluSchema(root)

Returns a set of all genes specified in the tree in the “aa_muts” objects

augur.validate.collectMutationGenes(root)

Returns a set of all genes specified in the tree in the “aa_muts” objects

augur.validate.collectTreeAttrs(root, nextflu=False)

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.loadJSONsToValidate(paths)

paths: array of paths to JSONs. JSON type (and therefore schema type) is inferred from the pathname, paralleling Auspice tree & meta JSONs are “nexflu-schema”, unified JSON is the new schema

augur.validate.loadSchemas(types, nextflu_schema)

For types (such as “tree”, “meta”), load and internally-verify the schema.

augur.validate.register_arguments(parser)
augur.validate.run(args)

Validate auspice-compatable JSONs against a schema

augur.validate.verifyMainJSONIsInternallyConsistent(main)

Check all possible sources of conflict within the main (unified) JSON This function is only used for schema v2.0

augur.validate.verifyMetaAndOrTreeJSONsAreInternallyConsistent(meta, tree)

Check all possible sources of conflict internally & between the metadata & tree JSONs This is only that which cannot be checked by the schemas This function is only used for nexflu-like schemas