API#

Preprocessing#

pp.add_depth(tdata[, key_added, tree, copy])

Tools#

tl.ancestral_states(tdata, keys[, method, ...])

tl.autocorr(tdata[, keys, connect_key, ...])

tl.clades(tdata[, depth, depth_key, clades, ...])

tl.compare_distance(tdata[, dist_keys, ...])

Get pairwise observation distances.

tl.distance(tdata, key[, obs, metric, ...])

tl.neighbor_distance(tdata[, connect_key, ...])

tl.sort(tdata, key[, reverse, tree])

Reorders branches based on a node attribute.

tl.tree_distance(tdata[, depth_key, obs, ...])

tl.tree_neighbors(tdata[, n_neighbors, ...])

tl.n_extant(tdata[, depth_key, groupby, ...])

tl.fitness(tdata[, depth_key, key_added, ...])

tl.partition_test(tdata, keys[, comparison, ...])

tl.expansion_test(tdata[, tree, ...])

Plotting#

pl.tree(tdata[, keys, nodes, polar, ...])

Plot a tree with branches, nodes, and annotations.

pl.branches(tdata[, polar, extend_branches, ...])

Plot the branches of a tree.

pl.nodes(tdata[, nodes, color, style, size, ...])

Plot the nodes of a tree.

pl.annotation(tdata[, keys, width, gap, ...])

Plot leaf annotations for a tree.

pl.n_extant(tdata[, color, data, key, ...])

Plot extant branches over time.

Getting elements#

get.leaves(tdata[, tree])

Get the leaves of a tree.

get.root(tdata[, tree])

Get the root of a tree.

get.node_df(tdata[, tree])

Get tree node attributes as DataFrame.

get.edge_df(tdata[, tree])

Get tree edge attributes as DataFrame.

get.palette(tdata, key[, custom, cmap, ...])

Get color palette for a given key.

Datasets#

datasets.packer19([cache_dir, tree])

C elegans lineage tree with cell state and position [PZH+19].

datasets.yang22([tumors, cache_dir])

Single-cell lineage tracing from KP mouse model [YJN+22].

datasets.koblan25([experiment, cache_dir])

Spatially resolved lineage tracing of 4T1 tumors [KYZ+25].