May you be happy every day, Mr. Wu Yiqing!
In the field of cellular communication there are cellphoneDB, cellchat, iTALK and many other tools for cell-cell communication;
Among cellchat, I think it's more approachable and good looking I guess ^_^
cellchat <- createCellChat(Matrix(health@assays$RNA$data,sparse = T), # for seurat.v5 objects
meta = health@, ="Celltype")
#######################################
More fixed code modules to start with!
#######################################
## III. Creating CellChat Objects
summary(cellchat)
str(cellchat)
levels(cellchat@idents)
groupSize <- (table(cellchat@idents)) #see how many cells are in each cluster
groupSize
## IV. Importing the Ligand Receptor Database
CellChatDB <- #mice are #human are
str(CellChatDB) #View DatabaseInformation with interaction, complex, cofactor and geneInfo
colnames(CellChatDB$interaction)
showDatabaseCategory(CellChatDB) #cellchat's L-R library is still very comprehensive
unique(CellChatDB$interaction$annotation) #View the sides that can be selected, i.e. the three in the center-left of the image above
#Select "Secreted Signaling" for subsequent cell interaction analysis.
<- subsetDB(CellChatDB, search = "Secreted Signaling") #Also default to using all the
cellchat@DB <- # set the used database in the object
## V. Pretreatment
cellchat <- subsetData(cellchat)
future::plan("multicore", workers = 4) #multiprocess
cellchat <- identifyOverExpressedGenes(cellchat) #Equivalent to Seurat's FindMarkers, find highly expressed ligand receptor genes in each cell population
cellchat <- identifyOverExpressedInteractions(cellchat) # Identify overexpressed ligand-receptor interactions based on the CellChatDB database.
cellchat <- projectData(cellchat,) #After finding the ligand-receptor relationship, projectData projects the expression values of the ligand-receptor pairs to the PPI to correct the expression values in @. The result is saved in @
## VI. Extrapolating cellular communication networks ##
#6.1 Inferring cellular communication networks based on ligand-receptor levels
cellchat <- computeCommunProb(cellchat, = FALSE, = TRUE) # If you don't want to use the result of the PPI correction in the previous step, = TRUE will do. #Infer the probability of cell interactions based on the expression value, this step takes a bit longer
cellchat <- filterCommunication(cellchat, = 10)# Filter out the cell-cell communication if there are only few number of cells in certain cell groups
<- subsetCommunication(cellchat)
#6.2 Inferring cellular communication networks based on signaling pathway levels
cellchat <- computeCommunProbPathway(cellchat)
<- subsetCommunication(cellchat, = "netP")
## VII. Stage of visualization of inferred results of intercellular communication:
cellchat <- aggregateNet(cellchat)# count the number (number of ligand-receptor pairs) and strength (probability) of intercellular communication
groupSize <- (table(cellchat@idents))#calculate how many cells are in each cluster
groupSize
#######################################
More fixed code modules End!
#######################################
# are imported into Excel and processed into 13X13 matrices; symmetric corner matrices;
rio::export(cellchat@net$count,"clipboard",=TRUE)
rio::export(cellchat@net$weight,"clipboard",=TRUE)
#7.1 Overall first look at the amount and strength of intercellular communication
netVisual_circle(cellchat@net$count, = groupSize, = T,
edge. = 15, = 0, = 0,
= F, = "Number of interactions") #Number of cell-to-cell communications
netVisual_circle(cellchat@net$weight, = groupSize,
= T,
= 15, = 0, = 0,
= F, = "Interaction weights/strength") # Strength of intercellular communication
#7.2 The following shows the communication network when each cell type is used as a ligand signal respectively
#7.2.1 → Inferred results for the number of intercellular communications.
mat <- cellchat@net$count
#7.2.2 → Inferred results for strength of intercellular communication.
mat <- cellchat@net$weight
#7.2.3 → Visualization of Pro-B and Pre-B alone; in terms of intercellular communication strength.
netVisual_circle(cellchat@net$count,
= "Pre-B", # "Pre-B" "Pro-B"
= NULL,
= groupSize,
top = 1,
= TRUE,
= 0,
= 0,
= 0.5,
= 0.1) #max(cellchat@net$weight)
data <- rio::import("clipboard",=TRUE,header=T,check.names = FALSE)
netVisual_circle((data), = c("CLP","DCs","Erythroblast","GMP","HSPCs","","","Monocyte",
"Neutrophil","","","",""),
= 2,
= 1,
= T,
= F,
= c(rep("#BC8F8F",13)),
= "health",
=12,
margin = 0.4,
= 0,
= 0)
These 3 parameters are surprisingly the same when I use them: ;;.
I don't know what the problem is yet.
(from a literature saw; counted to have seen the cell communication in the eye of the figure, I gave a cat and mouse to reproduce a bit, quite a lot of detail, the author has (used) heart))
Generally speaking; I think that in terms of cellular communication: the sicker the cell, the less communicative it is and the thinner the line will be; the healthier the cell population, the more it will be happy to express L-R pairs and the thicker the line will be;
If my article is helpful to you, welcome to like the collection of forwarding, which this this is also support my continuous progress of power~
If there's anything you don't understand, feel free to leave it in the comments section haha