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. |
|
Computes group-specific ligand-receptor means and permutation-based p-values. |
Spatial proximity & interaction metrics#
|
Cross pair-correlation function for all directed cell-type pairs. |
|
Ligand-Receptor Interaction Correlation (LRIC). |
|
A method for trivariate (source cell type, ligand, receptor) 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 |
|
Converts a LIANA result to a MuData object with views that represent an aggregate for each entity in |
|
Remove potential cell type marker genes found in the background of other views. |
|
Fits NMF to an AnnData object. |
|
Visualization#
|
Dotplot interactions by source and target cells |
|
A dotplot of interactions by sample |
|
Tileplot interactions by source and target cells |
|
Visualize the cell-cell communication network using a circular plot. |
|
Plot spatial connectivity weights. |
|
Plot target metrics. |
|
Plot view contributions per target. |
|
Plot interaction importances. |
|
Visualise concentric annuli around a randomly chosen cell on a tissue section. |
|
Line plot for cross-PCF / LRIC g(r) curves with a baseline at 1. |
|
Plot inflow scores for single feature across spatial coordinates. |
Utility#
|
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. |
|
Computes aggregated spatial statistics and proximity scores between cell types. |
|
Query the bandwidth (maximum distance) at which the average number of neighbors is maximized. |
|
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 |
|
Reassemble complexes from exploded long-format pandas Dataframe. |
|
Generate orthologs for multiple columns in a DataFrame. |
|
Generate orthologs for a given column in a DataFrame. |
|
Download the HCOP orthology file and filter it by minimum evidence. |
|
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. |