SPARCResult

Contents

SPARCResult#

missionbio.demultiplex.phylogeny.state.SPARCResult

class SPARCResult(profile_init: Profile, profile_valid: Profile, profile: Profile, valid_ngts: Dict[str, List[int]], tree_valid: PhyloTree, tree: PhyloTree, labels_valid: Series, labels: Series, events: Dict[str, Any])#

A NamedTuple to store the output of predictions by SPARC.

Variables#

profile_init

Initial clone genotypes from valid NGT based clustering

profile_valid

Clusters remaining after doublet based assignment

profile

Final clusters present in the phylogeny

valid_ngts

The NGTs allowed for each variant

tree_valid

The initial tree created using ngt_valid

tree

The final phylogenetic tree

labels_valid

The initial labels using ngt_valid

labels

The final labels classifying the cells

events

The events that occurred in each clone in the final tree.

Functions#

draw([init])

Draw the phylogenetic tree using plotly

serialize_clones()

Renames the clones as Wildtype, Clone 1, Clone 2, Clone 3...

reorder(barcodes)

Reorder the labels to match the given barcode order.

Create new instance of SPARCResult(profile_init, profile_valid, profile, valid_ngts, tree_valid, tree, labels_valid, labels, events)