LARIS enables accurate and efficient ligand and receptor interaction analysis in spatial transcriptomics
Project description
LARIS: Ligand And Receptor Interaction in Spatial transcriptomics data
LARIS is a Python package for analyzing ligand-receptor interactions in spatial transcriptomics data. It identifies spatially-specific cell-cell communication patterns by integrating gene expression, spatial information, and cell type annotations.
Features
- Spatial LR interaction strength: Calculate ligand-receptor interaction scores using spatial adjacency information
- Spatial specificity: Identify LR pairs with significant spatial variable patterns
- Inference at cell type level: Compute sender-receiver cell type interaction scores
- Spatial neighborhoods: Analyze interactions in the context of spatial cell type neighborhoods
📦 Installation
For the development version in GitHub, you could install via:
pip install git+https://github.com/genecell/LARIS.git
You could simply install LARIS via pip in your conda environment (future):
pip install laris
Quick Start
import laris as la
import scanpy as sc
import pandas as pd
# Load your spatial transcriptomics data
adata = sc.read_h5ad('spatial_data.h5ad')
# Define ligand-receptor pairs
lr_df = pd.DataFrame({
'ligand': ['Tgfb1', 'Vegfa', 'Cxcl12'],
'receptor': ['Tgfbr1', 'Kdr', 'Cxcr4']
})
# Step 1: Calculate LR integration scores
lr_adata = la.tl.prepareLRInteraction(
adata,
lr_df,
number_nearest_neighbors=15,
use_rep_spatial='X_spatial'
)
# Step 2: Identify spatially-specific LR interactions and infer the LR interaction at cell type level
laris_results, celltype_results = la.tl.runLARIS(
lr_adata,
adata,
n_nearest_neighbors=15,
n_repeats=100,
n_top_lr=1000,
by_celltype=True,
groupby='cell_type'
)
# View top spatially-specific LR pairs
print(laris_results.head(10))
# View top cell type-specific interactions
print(celltype_results.head(10))
# Filter for specific cell type pairs
endothelial_to_tumor = celltype_results[
(celltype_results['sending_celltype'] == 'Endothelial') &
(celltype_results['receiving_celltype'] == 'Tumor')
]
print(endothelial_to_tumor.head(10))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file laris-0.9.0.tar.gz.
File metadata
- Download URL: laris-0.9.0.tar.gz
- Upload date:
- Size: 41.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c4f77d8089537e378b883168b292bdb2d07c25b0cb54061655b8f26f7bfa902
|
|
| MD5 |
744a3a9e6a7d93f5f645e79c592feec5
|
|
| BLAKE2b-256 |
ca61fb4b1fb6fd21232c12699067f08034dad122110f6515d46baef8112d7a5c
|
File details
Details for the file laris-0.9.0-py3-none-any.whl.
File metadata
- Download URL: laris-0.9.0-py3-none-any.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4605ca567a10538761faeb8c53d9755248b7a8d9f7513973e1e09d65ae6e18f0
|
|
| MD5 |
d338d9c017e600b0c9f1c555bf015141
|
|
| BLAKE2b-256 |
13c01c005a83797c4b1929953b0f4ea357e6ed80386690a06563319492525412
|