Truth

Truth#

missionbio.demultiplex.protein.truth.Truth

class Truth(celltypes: Sequence[CellType] = (), version: str = 'NA')#

A phylogenetic tree of cell types.

Parameters:
  • celltypes – A list of cell types.

  • version – The version of the truth.

Functions#

__init__

param celltypes:

A list of cell types.

add_ab

Add an antibody to a cell type and all its descendants

add_cell

Add a celltype to the truth.

add_doublets

Adds doublets to the truth.

assert_valid

Assert that the truth is valid.

builtin

The default truth for PBMCs.

cellnames

Returns a list of cell type names.

complete

returns:

True, when all the celltypes contain the expression of

copy

Returns a deep copy of the truth.

del_ab

Delete an antibody from the truth.

del_cell

Delete a clone from the truth.

get

Returns the cell type with the specified name.

has_cell

Checks if the truth has a cell type with the specified name.

is_panel_compatible

Checks if the panel can be read using read_panel and is compatible with hashing.

isolate

Isolate the truth to only contain the given cell and its descendants.

palette

Get the palette of the truth.

plot

Plot the truth as a tree.

read_panel

Reads the truth from a csv panel file.

read_yaml

Reads a truth from a YAML file.

set_color

Set the color of a cell type.

signature

returns:

A signature matrix of the truth. 1 for ab+, 0 for ab-,

to_yaml

Writes the truth to a YAML file.

trim

Trim the truth to remove the given cell and all its descendants.

Attributes#