API¶
Import liana as:
import liana as li
Single-cell¶
Callable Ligand-Receptor Method instances¶
Ligand-receptor method instances provide helper functions and consistent attributes, to describe each method instance, and are callable:
|
Run a ligand-receptor method. |
|
Run a ligand-receptor method. |
|
Run a ligand-receptor method. |
|
Run a ligand-receptor method. |
|
Run a ligand-receptor method. |
Run a ligand-receptor method. |
|
|
Run a ligand-receptor method. |
|
Get an aggregate of ligand-receptor scores from multiple methods. |
Spatial¶
Local bivariate metrics¶
|
A method for bivariate local spatial metrics. |
Learn Spatial Relationships¶
|
MistyData Class used to construct multi-view objects |
|
Construct a MistyData object from an AnnData object with views as presented in the manuscript. |
|
Generate a MistyData object from an AnnData object in ligand-receptor format. |
Multi-Sample¶
|
Convert DEA results to ligand-receptor pairs. |
|
Function to convert a LIANA result to a tensor for cell2cell analysis. |
|
Converts an AnnData object to a MuData object with views that represent an aggregate for each entity in adata.obs[groupby]. |
|
Converts a LIANA result to a MuData object with views that represent an aggregate for each entity in adata.obs[groupby]. |
|
Fits NMF to an AnnData object. |
|
Visualization options¶
|
Dotplot interactions by source and target cells |
|
A dotplot of interactions by sample |
|
Tileplot interactions by source and target cells |
|
Plot spatial connectivity weights. |
|
Plot target metrics. |
|
Plot view contributions per target. |
|
Plot interaction importances. |
Utility functions¶
|
Extracts a dataframe from adata.obsm and returns a new AnnData object with the values stored in X. |
|
Convert a MultiData object to an AnnData object. |
|
Zero-inflated min-max scaling, adopted from CiteFuse (Kim et al., 2020; https://academic.oup.com/bioinformatics/article/36/14/4137/5827474). |
|
Set negative values to 0. |
|
Generate spatial connectivity weights using Euclidean distance. |
|
Extract factor scores from an AnnData object. |
|
Extract variable loadings from an AnnData object. |
|
Interpolates spatial data from a target AnnData object to a reference AnnData object based on spatial coordinates. |
Prior knowledge¶
|
Read resource of choice from the pre-generated resources in LIANA. |
Show available resources. |
|
|
Generate a ligand-receptor gene set from a resource and a network. |
|
Function to explode ligand-receptor complexes |
|
Fetches edges of metabolite-proteins with specified annotations, applying filters if they are not None. |
|
Prints the schema information and foreign key details for all tables in the specified SQLite database. |
|
Fetches distinct values from a specified column in a specified table. |
Intracellular¶
|
Find the causal network that best explains the input/output node scores. |
|
Build Prior Network from PPIs and input/output nodes. |
|
Estimate Metabolites from anndata object, and return a MuData object of metabolites and receptors. |