6. Communication communities¶
Language: Python · Input: edges_directed_KO_WT_filtered.csv
In this step, we will group the cell types into communication communities from the differential cell–cell network. The CrossTalkeR2 community-detection procedure runs on the edge list exported in step 4 and nothing else — no expression data is required.
Detection of communication communities¶
Currently, the function is still situated on the dev branch of the pyCrossTalkeR repository. Thus we install it to perform the clustering and generate the communication community plot.
pip install git+https://github.com/CostaLab/pyCrossTalkeR.git@dev
And then we can generate and plot the communication community layout:
from pathlib import Path
import pandas as pd
import pycrosstalker as pyct
BASE = Path(Path("/path/to/Il1rn_KO"))
CTR_OUT = BASE / "crosstalker"
df = pd.read_csv(CTR_OUT / "edges_directed_KO_WT_filtered.csv")
pyct.plots.cci_community_layout(
df,
method="leiden",
res=1.3,
compression=0.3,
seed=12,
spring_k=0.1,
spring_iterations_community=1000,
spring_iterations_nodes=500,
edge_width_scale=2.5,
edge_alpha_intra=1,
edge_alpha_inter=1,
node_size=300,
arrow_size=20,
figsize=[10, 10])
At res=1.3, four communities:
Community |
Members |
Direction in KO |
|---|---|---|
Homeostasis (stem/progenitor) |
HSC, MPPs, CMP |
decreased communication |
Myeloid–Vascular |
monocytes, preDC, pericytes, sinusoidal |
increased |
Neutrophil |
G0–G4 |
increased |
Stromal |
MSCs, fibroblasts, arteriolar |
increased |
MSCs carry the highest signal in the network, and stromal–stromal interactions are predominantly upregulated.
All following steps are for running the perturbation module of IntraTalker.
Next: Receptome construction