augur.traits module¶
Infer ancestral traits based on a tree.
-
augur.traits.
mugration_inference
(tree=None, seq_meta=None, field='country', confidence=True, infer_gtr=True, root_state=None, missing='?', sampling_bias_correction=None)¶ Infer likely ancestral states of a discrete character assuming a time reversible model.
- Parameters
tree (str) – name of tree file
seq_meta (dict) – meta data associated with sequences
field (str, optional) – meta data field to use
confidence (bool, optional) – calculate confidence values for inferences
infer_gtr (bool, optional) – infer a GTR model for trait transitions (otherwises uses a flat model with rate 1)
root_state (None, optional) – force the state of the root node (currently not implemented)
missing (str, optional) – character that is to be interpreted as missing data, default=’?’
- Returns
T (Phylo.Tree) – Biophyton tree
gtr (treetime.GTR) – GTR model
alphabet (dict) – mapping of character states to
-
augur.traits.
register_arguments
(parser)¶ Add subcommand specific arguments
- Parameters
parser (argparse) – subcommand argument parser
-
augur.traits.
run
(args)¶ run mugration inference
- Parameters
args (namespace) – command line arguments are parsed by argparse