moscot.problems.cross_modality.TranslationProblem.translate¶
- TranslationProblem.translate(source, target, forward=True, alternative_attr=None, **kwargs)¶
Translate the source modality to the target modality.
See also
See Translating multiomics single-cell data on how to translate chromatic accessibility to gene expression.
- Parameters:
source (
TypeVar
(K
, bound=Hashable
)) – Key identifying the source distribution.target (
TypeVar
(K
, bound=Hashable
)) – Key identifying the target distribution.forward (
bool
) – IfTrue
, translate thesource
modality to thetarget
modality, otherwise vice-versa.alternative_attr (
Optional
[Dict
[str
,Any
]]) –Alternative embedding to translate. Valid option are:
kwargs (
Any
) – Keyword arguments forpush()
orpull()
, depending on theforward
.
- Return type:
- Returns:
: If
forward = True
, the translation of thesource
modality to thetarget
modality, otherwise vice-versa.