Trisicell Module.


Import Trisicell as:

import trisicell as tsc

After mutation calling and building the input data via our suggested mutation calling pipeline.

Read/Write (io)

This module offers a bunch of functions for reading and writing of the data.

Read genotype matrix and read-count matrix.

io.write(obj, filepath)

Write genotype matrix or read-count matrix into a file.

Preprocessing (pp)

This module offers a bunch of functions for filtering and preprocessing of the data.

pp.remove_mut_by_list(adata, alist)

Remove a list of mutations from the data.

pp.remove_cell_by_list(adata, alist)

Remove a list of cells from the data.


Remove mutations based on the wild-type status.


Remove mutations based on the mutant status.


Combine cells in genotype matrix.

Tools (tl)

This module offers a high-level API to compute the conflict-free solution and calculating the probability of mutations seeding particular cells.

Solving the noisy input genotype matrix (Trisicell-Boost)

tl.booster(df_input, alpha, beta[, solver, …])

Trisicell-Boost solver.

Partition function calculation (Trisicell-PartF)

tl.partition_function(df_input, alpha, beta, …)

Calculate the probability of a mutation seeding particular cells.

Consensus tree building (Trisicell-Cons)

tl.consensus(sc1, sc2)

Build the consensus tree between two tumor progression trees.

Plotting (pl)

This module offers plotting the tree in clonal or dendrogram format.

pl.clonal_tree(tree[, muts_as_number, …])

Draw the tree in clonal format.

pl.dendro_tree(tree[, width, height, dpi, …])

Draw the tree in dendro fromat.

Utils (ul)

This module offers a bunch of utility functions.


Convert a conflict-free matrix to a tree object.


Convert phylogenetic tree to conflict-free matrix.


Convert the phylogenetic tree to mutation tree.

Datasets (datasets)

This module offers a bunch of functions for simulating data.


Return an example for sanity checking and playing with Trisicell.


Trisicell sublines bWES data.


Trisicell sublines bWTS data.


Trisicell sublines scRNAseq data.


Trisicell treated mice (anti-ctla-4) scRNAseq data.


Trisicell treated mice (igg, smart-seq2) scRNAseq data.


Trisicell treated mice (igg, seq-well) scRNAseq data.