Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions treetime/wrappers.py
Original file line number Diff line number Diff line change
@@ -801,8 +801,8 @@ def mugration(params):
attr = states.columns[1]
print("Attribute for mugration inference was not specified. Using "+attr, file=sys.stderr)

leaf_to_attr = {x[taxon_name]:x[attr] for xi, x in states.iterrows()
if x[attr]!=params.missing_data and type(x[attr])!=float and (str(x[attr])!='nan')}
leaf_to_attr = {x[taxon_name]:str(x[attr]) for xi, x in states.iterrows()
if x[attr]!=params.missing_data}

mug, letter_to_state, reverse_alphabet = reconstruct_discrete_traits(params.tree, leaf_to_attr, missing_data=params.missing_data,
pc=params.pc, sampling_bias_correction=params.sampling_bias_correction, verbose=params.verbose)

0 comments on commit 622b4c1

Please sign in to comment.