Error when running getting started pipeline

Hello everyone,
I’m starting with nextstrain and while running getting started pipeline( documented here). I’m getting treetime.UnknownMethodError.
Here is the complete error

augur refine is using TreeTime version 0.8.6

11.08	TreeTime.reroot: with method or node: Wuhan/Hu-1/2019
Traceback (most recent call last):
  File "./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e/bin/augur", line 10, in <module>
    sys.exit(main())
  File "./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e/lib/python3.8/site-packages/augur/__main__.py", line 10, in main
    return augur.run( argv[1:] )
  File "./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e/lib/python3.8/site-packages/augur/__init__.py", line 75, in run
    return args.__command__.run(args)
  File "./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e/lib/python3.8/site-packages/augur/refine.py", line 209, in run
    tt = refine(tree=T, aln=aln, ref=ref, dates=dates, confidence=args.date_confidence,
  File "./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e/lib/python3.8/site-packages/augur/refine.py", line 42, in refine
    tt.clock_filter(reroot=reroot, n_iqd=clock_filter_iqd, plot=False) #use whatever was specified
  File "./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e/lib/python3.8/site-packages/treetime/treetime.py", line 345, in clock_filter
    self.reroot(root='least-squares' if reroot=='best' else reroot, covariation=False, clock_rate=fixed_clock_rate)
  File "./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e/lib/python3.8/site-packages/treetime/treetime.py", line 471, in reroot
    raise UnknownMethodError('TreeTime.reroot -- ERROR: unsupported rooting mechanisms or root not found')
treetime.UnknownMethodError: TreeTime.reroot -- ERROR: unsupported rooting mechanisms or root not found
[Fri Feb 11 14:56:20 2022]
Error in rule refine:
    jobid: 5
    output: results/global/tree.nwk, results/global/branch_lengths.json
    log: logs/refine_global.txt (check log file(s) for error message)
    conda-env: ./ncov/.snakemake/conda/e9f3583b50110a881a0ea5e8dcba388e
    shell:
        
        augur refine             --tree results/global/tree_raw.nwk             --alignment results/global/filtered.fasta             --metadata results/global/metadata_adjusted.tsv.xz             --output-tree results/global/tree.nwk             --output-node-data results/global/branch_lengths.json             --root Wuhan/Hu-1/2019             --timetree                          --clock-rate 0.0008             --clock-std-dev 0.0004             --coalescent opt             --date-inference marginal             --divergence-unit mutations             --date-confidence             --no-covariance             --clock-filter-iqd 8 2>&1 | tee logs/refine_global.txt
        
        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message

Hi @Sourabh7211, welcome! This treetime.UnknownMethodError error can occur for a few reasons, most commonly either:

  1. The requested root sequence isn’t present in the alignment because it got filtered out (or never added) at some earlier point in the workflow.

  2. The requested root sequence is present in the alignment, but with a different name (even slight differences matter) than what was specified to use as the root. For example, you’ll see this error if the alignment contains Wuhan/Hu-1/2019 but the requested root is Wuhan-Hu-1/2019.

For examples of resolutions to this error, see past discussions.

1 Like

Thanks, solution here worked.

1 Like