liana.utils.get_variable_loadings¶
- liana.utils.get_variable_loadings(adata: AnnData | MuData, varm_key: str | None = None, view_sep: str | None = None, variable_sep: str | None = None, pair_sep: str | None = None, var_names: list = ['ligand_complex', 'receptor_complex'], pair_names: list = ['source', 'target'], drop_columns: bool = True)¶
Extract variable loadings from an AnnData object.
- Parameters:
- adata
Annotated data object.
- varm_key: str
Key to use when extracting variable loadings from mdata.varm
- view_sep: str
Separator to use when splitting view:variable names into view and variable
- variable_sep: str
Separator to use when splitting variable names into var_names (‘ligand_complex’ and ‘receptor_complex’ by default)
- pair_sep: str
Separator to use when splitting view names into pair_names (‘source’ and ‘target’ by default)
- drop_columns: bool
If True, drop the view:variable column
- Returns:
- Returns a pandas DataFrame with the variable loadings for the specified index.