cassiopeia.pp.convert_character_matrix_to_allele_table#

cassiopeia.pp.convert_character_matrix_to_allele_table(character_matrix, state_to_indel=None, keep_ambiguous=False)[source]#

Converts a character matrix back into an allele table.

Parameters:
character_matrix DataFrame

A dataframe storing the character states for each spot.

state_to_indel Optional[Dict[int, Dict[int, str]]] (default: None)

A mapping of numerical states into indel strings.

keep_ambiguous bool (default: False)

A boolean whether to keep ambiguous states for a given intBC

Returns:

An allele table.