We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have scant documentation about bootstraps - it's mentioned in a single changelog entry and a one line comment here:
Bootstrap values are allowed, and should be parsed correctly by augur refine.
It'd be good to expand on this a little, including covering:
augur refine
--keep-polytomies
import argparse import json if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--input', type = str, required = True, metavar='JSON', help = "Input dataset JSON with 'confidence' node attrs") parser.add_argument('--output', type = str, required = True, metavar='JSON', help = "Output JSON with bootstrap branch labels") args = parser.parse_args() with open(args.input) as fh: dataset = json.load(fh) nodes = [dataset['tree']] while len(nodes): node = nodes.pop(0) for child in node.get('children', []): nodes.append(child) bootstrap = node.get('node_attrs', {}).get('confidence', {}).get('value', False) if bootstrap is not False: if 'branch_attrs' not in node: node['branch_attrs'] = {} if 'labels' not in node['branch_attrs']: node['branch_attrs']['labels'] = {} node['branch_attrs']['labels']['bootstrap'] = f"{bootstrap:.2f}" with open(args.output, 'w') as fh: dataset = json.dump(dataset, fh)
This issue was prompted by this email exchange (private link)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We have scant documentation about bootstraps - it's mentioned in a single changelog entry and a one line comment here:
It'd be good to expand on this a little, including covering:
augur refine
resolves polytomies the newly created internal nodes will be missing bootstraps. A solution is to run with--keep-polytomies
This issue was prompted by this email exchange (private link)
The text was updated successfully, but these errors were encountered: