treetime
treetime copied to clipboard
Relaxed clock in NextStrain?
Hello Richard,
Since there is no relaxed clock argument in "rule refine" in Augur, I have tried to separately run Treetime with --relax argument then put the results back to the pipeline as they're needed for further rules. Briefly, I used "aligned.fasta" from rule align and "tree_raw.nwk" from rule tree as inputs for the Treetime running (treetime --tree tree_raw.nwk --dates metadata.tsv --aln aligned.fasta --outdir out --relax 1.0 0). However, Treetime's outputs couldn't be matched with rule refine's outputs for example "branchlengths.json" of rule refine needs branch_length, clock_length, date, mutation_length, and num_date_confidence for each taxa, but the resulting tree from Treetime only provides only branch_length, mutations, and date.
Is there any way to apply a relaxed clock model into the NextStrain's Augur pipeline or the way to tell Treetime to create some results corresponding to rule refine's output?
Thank you,
Nakarin
you are right, augur
doesn't accept arguments for a relaxed clock.
you could write a little script that produces a branchlengths.json
from the output of treetime
(the tree and tabular output). But it would probably be easier to call treetime from within a little python script. See here for an example
https://github.com/neherlab/treetime_examples/blob/master/scripts/relaxed_clock.py#L32
and then output the desired json.
Thank you for the suggestion!