came.utils.analyze.make_abstracted_graph¶
- came.utils.analyze.make_abstracted_graph(obs_labels1: Sequence, obs_labels2: Sequence, var_labels1: Series, var_labels2: Series, avg_expr1: DataFrame, avg_expr2: DataFrame, df_var_links: DataFrame, tags_obs=('', ''), tags_var=('', ''), key_weight: str = 'weight', cut_ov: float = 0.0, norm_mtd_ov: str | None = 'zs', ov_norm_first: bool = True, global_adjust_ov: bool = True, global_adjust_vv: bool = True, vargroup_filtered='filtered', **kwds)¶
Compute and make the abstracted graph from expression matrices and the linkage weights between homologous genes
- Parameters:
obs_labels1 – group labels of the reference and query observations (cells), respectively.
obs_labels2 – group labels of the reference and query observations (cells), respectively.
var_labels1 – group labels of the reference and query variables (genes), respectively.
var_labels2 – group labels of the reference and query variables (genes), respectively.
avg_expr1 – averaged expression matrix of the reference data
avg_expr2 – averaged expression matrix of the query data
df_var_links – the linkage-weights between homologous genes
tags_obs – a tuple of two strings, for specifying homologous cel-types from different species. For example, if set
tags_obs=('human ', 'mouse ')
, the result node names (for ‘T cell’) will be ‘human T cell’ and ‘mouse T cell’, respectively.tags_var – a tuple of two strings, for specifying gene modules from different species. For example, if set
tags_obs=('human module ', 'mouse module ')
, the result node names (for gene module ‘1’) will be ‘human module 1’ and ‘mouse module 1’, respectively.key_weight – column name in
df_var_links
, specifying weights between each pair of variables.cut_ov – the threshold to cut edges with values lower than it.
norm_mtd_ov – one of {None, ‘zs’, ‘maxmin’, ‘max’}
global_adjust_ov – whether to globally adjust the weights between the observations and the variables
global_adjust_vv – whether to globally adjust the weights between the observations