came.aligned_datapair_from_adatas¶
- came.aligned_datapair_from_adatas(adatas: Sequence[AnnData], vars_feat: Sequence, vars_as_nodes: Sequence | None = None, oo_adjs: Sequence[spmatrix] | None = None, dataset_names: Sequence[str] = ('reference', 'query'), **kwds) AlignedDataPair ¶
Build
AlignedDataPair
object from a pair of adatas.Note that the node features will be extracted from
adata.raw
(if not None), so please make sure that these values are normalized.- Parameters:
adatas – a list or tuple of 2 sc.AnnData objects.
vars_feat – a list of variable-names that will be used as (cell) node features. for example, names of differentail expressed genes (DEGs), highly variable features.
vars_as_nodes – a sequence of variable names, optional. a name-list of variables that will be taken as nodes in the graph for model training. if None (not provided), it will be the same as vars_feat
oo_adjs – a sequence of (sparse) adjacent matrices of observations. for example, the single-cell network within each dataset.
dataset_names – list or tuple of 2. names to discriminate data source, e.g. (‘reference’, ‘query’)
- Returns:
dpair
- Return type:
Examples
>>> dpair = aligned_datapair_from_adatas( ... [adata1, adata2], ... vars_feat, ... dataset_names = ['reference', 'query'] ... )
See also