Skip to content

A tree and its samples

You have a tree (Newick) and a sample sheet: a table with the sample names in its first column and one column for each thing you know about them.

karyon tree.nwk --traits samples.tsv --columns lineage,country -o tree.svg

A tree of forty samples with a strip of lineage colours and a column of country symbols beside the tips, and a key underneath The same figure on the dark page

Each column you name is drawn beside the tips, and the key underneath says which colour is which. A column with more values than colours uses shapes as well, and the figure says so under the tree. A tree needs no place.

In Rust, the same figure and the others a tree takes, its support, coloured branches, a folded clade, a circle, an alignment beside it and a time axis, are a few lines each in Phylogenetics.

Change it

To Write
Colour the branches too --color-by lineage
Draw it as a circle --projection circular
Show the support values of 70 and over --support-style labels --threshold 70
Fold a large tree to fit --max-rows 60
Draw one clade --focus S26,S27

The example files: tree.nwk and samples.tsv. Every option: karyon help tree, or the command line reference.