How scverse/liana works
LIANA+ is a cell–cell communication analysis framework for single-cell, spatial, and multimodal omics. The main workflow accepts AnnData or MuData, prepares expression and cell-group data, applies ligand–receptor knowledge and inference methods, then returns interaction scores for downstream comparison and visualization. Separate branches support spatially constrained and spatial-pattern analyses, multisample integration, and causal-network interpretation. The README documents the broad method families; source excerpts confirm selected preparation, inference, and result-handling relationships, so uncertain wiring is omitted.
Main entry points: _liana_pipe.py Single-cell pipeline · plotting Result plots · preprocessing Spatial preprocessing · _rank_aggregate.py Consensus ranking
Components 22
Data preparation
- Example datasets
src/liana/datasets/datasets.py - Spatial preprocessing
src/liana/preprocessing - MuData conversion
src/liana/multisample/mdata_to_anndata.py - Dataset retrieval
src/liana/datasets/_fetch.py
Prior knowledge
- Resource selection
src/liana/resource/select_resource.py - Prior networks
src/liana/resource/_prior_network.py - Orthology mapping
src/liana/resource/_orthology.py
Communication inference
- Single-cell pipeline
src/liana/method/sc/_liana_pipe.py - Single-cell methods
src/liana/method/sc - Consensus ranking
src/liana/method/sc/_rank_aggregate.py - DEA to interactions
src/liana/method/df_to_lr.py - Spatial LR scoring
src/liana/method/sp/_inflow.py - Spatial co-occurrence
src/liana/method/sp/_LRIC.py - Bivariate metrics
src/liana/method/sp/_bivariate - MISTy learning
src/liana/method/sp/_misty
Integration and interpretation
- Sample comparison
src/liana/multisample - Interaction views
src/liana/multisample/to_mudata.py - Tensor conversion
src/liana/multisample/to_tensor_c2c.py - Program discovery
src/liana/multisample/_nmf.py - Causal networks
src/liana/method/fun/_causalnet.py
Results and visualization
- Result plots
src/liana/plotting
Other components
- Analyst
Connections 30
- Analyst → Example datasets: requests data
- Example datasets → Dataset retrieval: fetches dataset
- Dataset retrieval → Example datasets: returns data
- Analyst → Single-cell pipeline: submits data
- MuData conversion → Single-cell pipeline: converts input
- Single-cell pipeline → MuData conversion: converts MuData
- Single-cell pipeline → Resource selection: selects resource
- Single-cell pipeline → Single-cell methods: runs methods
- Single-cell pipeline → Consensus ranking: aggregates scores
- Analyst → DEA to interactions: provides DEA results
- Analyst → Spatial preprocessing: prepares coordinates
- Analyst → Spatial LR scoring: submits spatial data
- Analyst → Spatial co-occurrence: submits spatial data
- Analyst → Bivariate metrics: submits spatial data
- Analyst → MISTy learning: submits spatial data
- Spatial preprocessing → Spatial LR scoring: prepares input
- Spatial preprocessing → Spatial co-occurrence: prepares input
- Consensus ranking → Sample comparison: provides scores
- Sample comparison → Interaction views: builds views
- Sample comparison → Tensor conversion: converts results
- Interaction views → Program discovery: supports programs
- Analyst → Causal networks: provides scores
- Prior networks → Causal networks: supplies network
- Analyst → Result plots: requests visualization
- Consensus ranking → Result plots: provides results
- Spatial LR scoring → Result plots: provides results
- Spatial co-occurrence → Result plots: provides results
- Bivariate metrics → Result plots: provides results
- MISTy learning → Result plots: provides results
- Resource selection → Orthology mapping: maps genes