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 thesourcemodality to thetargetmodality, otherwise vice-versa.alternative_attr (
Optional[Dict[str,Any]]) –Alternative embedding to translate. Valid option are:
**kwargs (
Any) – The description is missing.
- Return type:
- Returns:
: If
forward = True, the translation of thesourcemodality to thetargetmodality, otherwise vice-versa.