larry._tools._cell_fates¶
Module Contents¶
Classes¶
Functions¶
|
Given a DataFrame of integer counted fate/state observations, normalize to the total within the sample. |
|
- larry._tools._cell_fates._sum_normalize_fate(fate_df: pandas.DataFrame) pandas.DataFrame¶
Given a DataFrame of integer counted fate/state observations, normalize to the total within the sample.
- fate_df
DataFrame with fates along the columns and lineages along the index. type: pandas.DataFrame
If not already filtered for null-valued fates at the time of observations, these will return NaNs due to the resulting div. by zero.
Can have a multi-index but select for only a single timepoint if that’s the desired behavior.
- larry._tools._cell_fates.state_description_at_time(df, time_key='Time point', state_label_key='Annotation')¶
- class larry._tools._cell_fates.CellFates(adata, time_key='Time point', lineage_key='clone_idx', state_label_key='Annotation')¶
- property fates¶
- property lineage_state_descriptions: pandas.DataFrame¶
- __parse__(kwargs, ignore=['self'])¶
- __setup__(kwargs, ignore=['self'])¶
- subset(subset_time=None)¶
# subset for lineages with cells at d2 and d6 # cf.subset([2, 6]) # subset for lineages with cells at all time points
- _lineage_state_descriptions()¶
- _configure_fates()¶
- temporal_fate_descriptions()¶
- combine_fate_matrices(t_combine: list = [4, 6], normalize=True)¶
Combine fate matrices across timepoints (e.g., d4 and d6)
- clustermap(fate_df)¶
cf.clustermap(cf.combined)
- format_state_for_merge(state_df)¶
- state_to_cell_indexed_fate_bias(state_df)¶
Transform cell state df to a cell-indexed fate bias df
Can pass: cf.d6_state, cf.d4_state
- __call__(subset_time=[2, 6], fate_t=6)¶