SKILL.md
Version Compatibility
Reference examples tested with: matplotlib 3.8+, scanpy 1.10+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Metabolite-Mediated Cell Communication
"Analyze metabolic crosstalk between cell types" → Predict metabolite secretion-sensing interactions between cell populations based on enzyme and transporter expression patterns.
- Python:
mebocost.MeboCost(adata, groupby='cell_type')→run_mebocost()
MeboCost Overview
MeboCost infers metabolite-mediated communication by:
- Predicting metabolite secretion from enzyme expression
- Identifying metabolite-sensing receptors
- Computing communication scores between cell types
Basic Workflow
Goal: Infer metabolite-mediated cell-cell communication from scRNA-seq data by predicting which cell types secrete and sense specific metabolites.
Approach: Initialize a MeboCost object from an AnnData with cell type annotations, run permutation-based communication inference to score metabolite secretion-sensing interactions, then filter for statistically significant pairs.
import mebocost as mbc
import scanpy as sc
# Load scRNA-seq data
adata = sc.read_h5ad('adata.h5ad')
# Initialize MeboCost
mebo = mbc.create_obj(
adata=adata,
group_col='cell_type', # Cell type annotation column
species='human' # 'human' or 'mouse'
)
# Infer metabolite communication
mebo.infer_commu(
n_permutations=1000, # Permutations for significance testing
seed=42
)
# Get significant interactions
sig_interactions = mebo.commu_res[mebo.commu_res['pval'] < 0.05]
