larry._utils._count_fate_values¶
Module Contents¶
Classes¶
Container for keep track of subset indices. |
|
Functions¶
|
return if ALL specified values are contained in passed list |
|
|
|
Parameters: |
|
generate a list of lineages that are seen at d2 as well as d4 and d6 |
|
We use this function to denote lineages with cells at d2 |
|
|
|
|
|
Count fate values. |
Attributes¶
- larry._utils._count_fate_values.NoneType¶
- class larry._utils._count_fate_values.IndexSubsets(adata, time_key='Time point', lineage_key='clone_idx')¶
Bases:
larry._utils._abc_parse.ABCParseContainer for keep track of subset indices.
- property lineage_traced¶
- _configure_time_subset()¶
- _configure_lineage_traced_time_subset()¶
- larry._utils._count_fate_values._has_t(df, time_key, query_t: list)¶
return if ALL specified values are contained in passed list
- larry._utils._count_fate_values.filter_fate(adata, fate_time=[4, 6], fate=['undiff'], time_key='Time point', state_key='Cell type annotation')¶
- larry._utils._count_fate_values.time_occupance(adata: anndata.AnnData, lineage_key: str = 'clone_idx', exclude_fate: tuple = ('Cell type annotation', ['undiff']), fate_time=[4, 6], time_key: str = 'Time point', return_df=False) Union[pandas.DataFrame, None]¶
- adata
type: anndata.AnnData
- lineage_key
type: str
- time_key
type: str
- time_occupance
type: pandas.DataFrame
- larry._utils._count_fate_values.fated_idx(adata, fate_time=[4, 6], exclude_fate: tuple = ('Cell type annotation', ['undiff']), lineage_key: str = 'clone_idx', time_key: str = 'Time point') list¶
generate a list of lineages that are seen at d2 as well as d4 and d6
This function returns the indices of lineages NOT cells.
- larry._utils._count_fate_values.annotate_fated(adata, lineage_key='clone_idx', time_key='Time point', t0=2, fate_time=[4, 6], key_added='fate_observed', t0_key_added='t0_fated', exclude_fate: tuple = ('Cell type annotation', ['undiff'])) None¶
We use this function to denote lineages with cells at d2 and one or more cells in [d4, d6]
Updates adata.obs with two columns -> adata.obs[[‘fate_observed’, ‘t0_fated’]]
- class larry._utils._count_fate_values.FateValues(adata, origin_time=[2], fate_time=[4, 6], annotation_key='Cell type annotation', time_key='Time point', lineage_key='clone_idx')¶
Bases:
larry._utils._abc_parse.ABCParse- _count_values_at_lineage_fate(df, labels_excluded=['undiff'])¶
df is the pandas.DataFrame obs table for a single clonal lineage
- __call__() pandas.DataFrame¶
Takes ~13s for the in vitro dataset
- larry._utils._count_fate_values.count_t0_cell_fates(adata, key_added='cell_fate_df', return_df=False)¶
- larry._utils._count_fate_values.d2_cell_fate_matrix(adata, time_key: str = 'Time point', lineage_key: str = 'clone_idx')¶
- larry._utils._count_fate_values.count_fate_values(adata, origin_time=[2], fate_time=[4, 6], annotation_key='Cell type annotation', time_key='Time point', lineage_key='clone_idx', key_added='fate_counts', return_dfs=False)¶
Count fate values.