cassiopeia.pp.convert_alleletable_to_lineage_profile#

cassiopeia.pp.convert_alleletable_to_lineage_profile(allele_table, cut_sites=None, collapse_duplicates=True)[source]#

Converts an AlleleTable to a lineage profile.

Takes in an allele table that summarizes the indels observed at individual cellBC-intBC pairs and produces a lineage profile, which essentially is a pivot table over the cellBC / intBCs. Conceptually, these lineage profiles are identical to character matrices, only the values in the matrix are the actual indel identities.

Parameters:
allele_table

AlleleTable.

cut_sites Optional[List[str]] (default: None)

Columns in the AlleleTable to treat as cut sites. If None, we assume that the cut-sites are denoted by columns of the form “r{int}” (e.g. “r1”)

collapse_duplicates bool (default: True)

Whether or not to collapse duplicate character states present for a single cellBC-intBC pair. This option has no effect if there are no allele conflicts. Defaults to True.

Return type:

DataFrame

Returns:

An NxM lineage profile.