swnn.group_mean_adata¶
- swnn.group_mean_adata(adata, groupby, features=None, binary=False, use_raw=False)¶
Compute averaged feature-values for each group
- Parameters
adata (AnnData) –
groupby (str) – a column name in adata.obs
features – a subset of names in adata.var_names (or adata.raw.var_names)
binary (bool) – if True, the results will turn to be the non-zeor proportions for all (or the given) features
use_raw (bool) – whether to access adata.raw to compute the averages.
- Returns
- Return type
a pd.DataFrame with features as index and groups as columns