TREETIME(1)
π TREETIME(1) π
ok so this is the manual page for treetime β it lives in the User Commands section of the manual, and bestie, it is so much. Let's get into it π§
β¨ NAME β¨
treetime β Maximum Likelihood Phylodynamics π³β°
πΈ SYNOPSIS πΈ
treetime <positional> [optional]
that's it. that's the whole vibe. a positional thing and then whatever optional stuff you wanna throw at it π
π¦ DESCRIPTION π¦
okay so TreeTime is out here providing routines for ancestral sequence reconstruction and inference of molecular-clock phylogenies. which, if you're wondering what that even means: it's a tree where all the branches are scaled such that the positions of terminal nodes correspond to their sampling times, and the internal nodes get placed at the most likely time of divergence. lowkey iconic, fr fr β
To optimize the likelihood of time-scaled phylogenies, TreeTime uses an iterative approach, and here's the cycle:
- first it infers ancestral sequences given the branch length of the tree
- then it optimizes the positions of unconstrained nodes on the time axis
- then it repeats this cycle π
The only topology optimization are (optional) resolution of polytomies in a way that is most (approximately) consistent with the sampling time constraints on the tree. so like, mostly it's not out here rearranging your whole tree, it's just vibing with the polytomies. periodt.
The package is designed to be used as a stand-alone tool on the command-line or as a library used in larger phylogenetic analysis work-flows. so you can be a CLI girlie or a library girlie, both are valid π«Ά
π OPTIONS π
π positional arguments
ancestralβ infer ancestral sequences maximizing the joint or marginal likelihood. this is the "what did the ancestors even look like" one π«homoplasyβ analyze patterns of recurrent mutations aka homoplasies. the same mutation showing up over and over again, not me though, I'd never repeat myself πclockβ estimate molecular clock parameters and reroot the tree β°mugrationβ map discrete character such as host or country to the tree. yes it's called mugration. yes it's migration + mutation. no I don't make the rules π¦
π optional arguments
-h,--helpβ show this help message and exit. the classic. the goat π--tree TREEβ Name of file containing the tree innewick,nexus, orphylipformat. If none is provided, treetime will attempt to build a tree from the alignment usingfasttree,iqtree, orraxml(assuming they are installed). key phrase: assuming they are installed, so bestie please check first π--sequence-length SEQUENCE_LENGTHβ length of the sequence, used to calculate expected variation in branch length. Not required if alignment is provided. one of these two, you gotta give it something π--aln ALNβ alignment file (fasta)--vcf-reference VCF_REFERENCEβ only forvcfinput: fasta file of the sequence the VCF was mapped to. vcf girlies only, everyone else look away π--dates DATESβ csv file with dates for nodes with'node_name, date'where date is float (as in2012.15). so like,2012.15not"March 2012-ish"pls π--clock-filter CLOCK_FILTERβ ignore tips that don't follow a loose clock,'clockfilter=number of interquartile ranges from regression'. bye to the tips that aren't clocking in π--reroot REROOTβ reroot the tree. Valid choices are'ML','ML-rough','least-squares','min_dev','midpoint'or a node name to be used as outgroup. Use--keep-rootto keep the current root. pick your fighter β¨--keep-rootβ don't reroot the tree. Otherwise, reroot to minimize the the residual of the regression of root-to-tip distance and sampling time. (yes, "the the" is in the original, we love her anyway π)--gtr GTRβ GTR model to use.'--gtr infer'will infer a model from the data. Alternatively, specify the model type. If the specified model requires additional options, use'--gtr-params'to specify those.--gtr-params GTR_PARAMS [GTR_PARAMS ...]β GTR parameters for the model specified by the--gtrargument. The parameters should be feed as'key=value'list of parameters. Example:'--gtr K80 --gtr-params kappa=0.2 pis=0.25,0.25,0.25,0.25'. See the exact definitions of the parameters in the GTR creation methods intreetime/nuc_models.pyortreetime/aa_models.py. go read the source bestie, it's giving homework but it's giving answers too π--clock-rate CLOCK_RATEβ if specified, the rate of the molecular clock won't be optimized. you're locking it in, no takebacks π--branch-length-mode {auto,input,joint,marginal}β If set to'input', the provided branch length will be used without modification. Note that branch lengths optimized by treetime are only accurate at short evolutionary distances. β οΈ short distances only, don't come for her when your deep divergences look weird--confidenceβ estimate confidence intervals of divergence times. give me the error bars, I want the range π«--keep-polytomiesβ Don't resolve polytomies using temporal information. leave the messy bits messy, respect π«Ά--relax [RELAX [RELAX ...]]β use an autocorrelated molecular clock. Prior strength and coupling of parent and offspring rates can be specified e.g. as--relax 1.0 0.5--max-iter MAX_ITERβ maximal number of iterations the inference cycle is run. Note that for polytomy resolution and coalescence modelsmax_itershould be at least 2. so like, don't set it to 1 and then be shocked, okay? π--coalescent COALESCENTβ coalescent time scale β sensible values are on the order of the average hamming distance of contemporaneous sequences. In addition,'opt''skyline'are valid options and estimate a constant coalescent rate or a piecewise linear coalescent rate history. skyline said "I contain multitudes" π--plot-tree PLOT_TREEβ filename to save the plot to. Suffix will determine format (choicespdf,png,svg, default=pdf). aesthetic AND functional π--plot-rtt PLOT_RTTβ filename to save the plot to. Suffix will determine format (choicespdf,png,svg, default=pdf). yes it's the same description as the one above, they're twins, let them be π―--keep-overhangsβ do not fill terminal gaps--zero-basedβ zero based mutation indexing. for the programmers who believe counting starts at 0 (correct btw) β¨--report-ambiguousβ include transitions involving ambiguous states--verbose VERBOSEβ verbosity of output0-6. six whole levels of yapping, pick your volume π₯--outdir OUTDIRβ directory to write the output to
π SEE ALSO π
go. look. it's right there. click it bestie π
π EXAMPLES π
this one is literally the examples repo, it's giving tutorial, it's giving "start here" π
π AUTHOR π
This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program. thank you Andreas, absolute legend, we appreciate you πββοΈ
heads up bestie: this page documents treetime version 0.5.0 and it's dated September 2018, so it's a little vintage but still slaying πΈ
ok bye, go build a tree, mwah ππ³
π¦ where this page comes from
- debian bookworm: python3-treetime 0.9.4-1 Β· MIT
- debian trixie: python3-treetime 0.11.4-1 Β· MIT
- ubuntu jammy: python3-treetime 0.8.6-1 Β· MIT
- ubuntu noble: python3-treetime 0.11.1-1 Β· MIT
- ubuntu resolute: python3-treetime 0.11.4-1 Β· MIT
- ubuntu stonking: python3-treetime 0.12.1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms