Trisicell Module.

API

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.

io.read(filepath)

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.

pp.filter_mut_reference_must_present_in_at_least(adata)

Remove mutations based on the wild-type status.

pp.filter_mut_mutant_must_present_in_at_least(adata)

Remove mutations based on the mutant status.

pp.consensus_combine(df)

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.

ul.to_tree(df)

Convert a conflict-free matrix to a tree object.

ul.to_cfmatrix(tree)

Convert phylogenetic tree to conflict-free matrix.

ul.to_mtree(tree)

Convert the phylogenetic tree to mutation tree.

Datasets (datasets)

This module offers a bunch of functions for simulating data.

datasets.example([is_expression])

Return an example for sanity checking and playing with Trisicell.

datasets.sublines_bwes()

Trisicell sublines bWES data.

datasets.sublines_bwts()

Trisicell sublines bWTS data.

datasets.sublines_scrnaseq()

Trisicell sublines scRNAseq data.

datasets.treated_actla4()

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

datasets.treated_igg_ss2()

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

datasets.treated_igg_sw()

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