treetime

clock

Settings of treetime clock (Clock signal), with their flags, config keys, and defaults.

Infer the clock rate, assess the temporal signal and flag outliers using root-to-tip regression.

Inputs

  • Tree (required): Newick or Nexus
  • Metadata (required): CSV, TSV or SSV table
33 settings match

Input data

Tree

--tree
Value
FILE
Config key
tree
Tree in Newick format

Newick dialect

--newick-dialect Default: classic,beast
Value
NEWICK_DIALECT
Config key
newick_dialect
Values
  • classic,plain
  • classic,beast
  • classic,nhx
  • classic,mrbayes
  • enewick,plain
  • enewick,beast
  • enewick,nhx
  • enewick,mrbayes
  • rich,plain
  • rich,beast
  • rich,nhx
  • rich,mrbayes
Newick dialect of the tree inputs (the tree and the reference topology)

Metadata

--metadata
Value
FILE
Config key
metadata
Metadata table (CSV or TSV) with one row per sample

Metadata id columns

--metadata-id-columns Default: strain name accession
Value
COLUMN
Config key
metadata_id_columns
Candidate column name(s) holding the taxon identifier that links metadata to tree tips

Metadata delimiters

--metadata-delimiters Default: , \t ;
Value
CHAR
Config key
metadata_delimiters
Candidate field delimiter(s) for the metadata table

Date column

--date-column Default: not set
Value
COLUMN
Config key
date_column
Label of the column to be used as sampling date (auto-detected when omitted)

Date format

--date-format Default: %Y-%m-%d
Value
FORMAT
Config key
date_format
Format used to parse string sampling dates (numeric, ISO, and uncertain dates parse regardless)

Molecular clock

Clock filter

--clock-filter Default: 4
Value
CLOCK_FILTER
Config key
clock_filter
Ignore tips that do not follow a loose clock: the number of interquartile ranges from the root-to-tip regression beyond which a tip is an outlier.

Allow negative rate

--allow-negative-rate Default: off
Config key
allow_negative_rate
Allow negative clock rates.

Prune filtered tips

--prune-filtered-tips Default: off
Config key
prune_filtered_tips
Remove the tips that the clock filter flags from the tree.

Prune undated tips

--prune-undated-tips Default: off
Config key
prune_undated_tips
Remove the tips without a usable date from the tree.

Keep tips

--keep-tips Default: none
Value
NAME
Config key
keep_tips
Names of tips that stay in the tree when --prune-filtered-tips or --prune-undated-tips removes tips

Keep tips file

--keep-tips-file
Value
FILE
Config key
keep_tips_file
File with names of tips that stay in the tree when --prune-filtered-tips or --prune-undated-tips removes tips, one name per line

Rooting

Reroot method

--reroot Default: not set
Value
REROOT
Config key
reroot
Values
  • least-squares Minimizes the residuals of the root-to-tip regression on the sampling dates
  • min-dev Minimizes the variance of root-to-tip distances over all tips; more robust than midpoint
  • oldest Roots at the middle of the branch above the oldest dated tip
  • midpoint Roots at the middle of the longest tip-to-tip path; uses only the two farthest tips
Cannot be combined with
--keep-root --outgroup
Method that chooses the root of the tree

Outgroup

--outgroup Default: none
Value
OUTGROUP
Config key
outgroup
Cannot be combined with
--keep-root --reroot
Examples
  • ["outgroup_tip"]
Root the tree on the branch above the most recent common ancestor of the named tips

Keep root

--keep-root Default: off
Config key
keep_root
Cannot be combined with
--outgroup --reroot
Keep the root of the input tree instead of rerooting it.

Output

Output all

--output-all
Value
DIR
Config key
output_all
Folder that receives the default outputs of the command

Newick annotations

--newick-annotations Default: plain
Value
NEWICK_ANNOTATIONS
Config key
newick_annotations
Values
  • plain
  • beast
  • nhx
Node comments of the Newick outputs: plain, beast, or nhx.

Output tree Newick

--output-tree-nwk
Value
FILE
Config key
output_tree_nwk
Path to output Newick tree file.

Output tree nexus

--output-tree-nexus
Value
FILE
Config key
output_tree_nexus
Path to output Nexus tree file.

Output tree auspice

--output-tree-auspice
Value
FILE
Config key
output_tree_auspice
Path to output Auspice v2 JSON tree file.

Output tree MAT protobuf

--output-tree-mat-pb
Value
FILE
Config key
output_tree_mat_pb
Path to output UShER MAT protobuf tree file.

Output tree MAT JSON

--output-tree-mat-json
Value
FILE
Config key
output_tree_mat_json
Path to output UShER MAT JSON tree file.

Output tree graph JSON

--output-tree-graph-json
Value
FILE
Config key
output_tree_graph_json
Path to output internal graph JSON tree file.

Output tree DOT

--output-tree-dot
Value
FILE
Config key
output_tree_dot
Path to output Graphviz DOT tree file.

Output files

--output-selection Default: none
Value
OUTPUT_SELECTION
Config key
output_selection
Values
  • all
  • nwk
  • nexus
  • auspice
  • mat-pb
  • mat-json
  • graph-json
  • dot
  • clock-model
  • rtt
  • rtt-chart
List of outputs to produce with --output-all.

Output clock model

--output-clock-model
Value
FILE
Config key
output_clock_model
Path to output clock model JSON.

Output root-to-tip

--output-rtt
Value
FILE
Config key
output_rtt
Path to output the root-to-tip regression table.

Output root-to-tip chart

--output-rtt-chart
Value
FILE
Config key
output_rtt_chart
Path to output the root-to-tip regression chart.

Tree ordering

Topology order

--topology-order Default: not set
Value
TOPOLOGY_ORDER
Config key
topology_order
Values
  • keep
  • descendant-count
  • descendant-count-reverse
  • height
  • height-reverse
  • divergence
  • divergence-reverse
  • label
  • label-reverse
  • target-order
  • target-order-reverse
Canonical topology ordering preset.

Topology order tree

--topology-order-tree
Value
FILE
Config key
topology_order_tree
Cannot be combined with
--topology-order-list
Tree whose leaf order sets the target order

Topology order list

--topology-order-list
Value
FILE
Config key
topology_order_list
Cannot be combined with
--topology-order-tree
File with leaf names in the target order, one name per line

Topology order aggregate

--topology-order-aggregate Default: mean
Value
TOPOLOGY_ORDER_AGGREGATE
Config key
topology_order_aggregate
Values
  • mean
  • median
Aggregate used to map a subtree to a target-order position.