augur.traits module
Infer ancestral traits based on a tree.
- augur.traits.mugration_inference(tree=None, seq_meta=None, field='country', confidence=True, missing='?', sampling_bias_correction=None, weights=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
missing (str, optional) – character that is to be interpreted as missing data, default=’?’
sampling_bias_correction (None, optional) – factor by which the transition rate is scaled up to counter sampling bias
weights (None, optional) – vector of equilibrium frequencies that one expects the far ancestor to be sampled from
- 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