sqjin / CellChat

R toolkit for inference, visualization and analysis of cell-cell communication from single-cell data
GNU General Public License v3.0
621 stars 142 forks source link

How to extract some specific types of cells to construct a independent communication circleplot? #33

Open Rui-Jing opened 4 years ago

Rui-Jing commented 4 years ago

Hi, I'm really sorry to bother you again. When I mapped the total cell interaction network(Circleplot), the effect of presentation were poor because there were too many cell types. So, I was wondering if I could draw a simple version of the interactive loop diagram based on the cell type I specified.( Let's say I have a total of 12 cell types, and I'm only looking at four of those cell types. Meanwhile, the type of drawing is a circleplot ) In additon, Can I consider showing L-R numbers according to my will( The example is shown in the figure below)? L-R number representation is determined by a TRUE or FALSE according code setting. image

sqjin commented 4 years ago

@Rui-Jing Currently it cannot specify the cell types. But I can try to support this function later. The parameter label.edge can allow you to show the label or nor.

Rui-Jing commented 4 years ago

Thanks for your kindly reply.

Rui-Jing commented 4 years ago

@sqjin Please let me know if you are making progress about specifying some specific cell type interactions. Thanks.

sqjin commented 4 years ago

@Rui-Jing It now supports showing a part of connections in circle plot. Example: netVisual_circle(cellchat@net$count, from = c(1,2), to = c(10:15), vertex.size = groupSize, weight.scale = T, label.edge= F, edge.label.cex = 0.8, vertex.label.cex = 1)

netVisual_aggregate(cellchat, signaling = pathways.show, from = c(1,2), to = c(10:20), layout = "circle", vertex.size = groupSize)

Rui-Jing commented 4 years ago

@sqjin Hi, Thanks your efforts. As for this update, do I need to download the new version of CellChat again, or just use it directly? The error occurs when I run this code: Error in netVisual_circle(cellchat@net$count, from = c(1, 2), to = c(10:15), : unused argument (from = c(1, 2)). Do from and to need to be reconfigured, or do they need to be aligned with CellChat$idents ?

sqjin commented 4 years ago

@Rui-Jing You need to re-install the package.

Rui-Jing commented 4 years ago

Thanks for your kind help. My mentor thought Cellchat was a powerful tool and would be a hit.

BeyondMyPast228 commented 3 years ago

@sqjin Hi, After upgrading to the latest version, I found that when I executed the command, I got an error。 Code :netVisual_circle(P121@net$count,vertex.weight = groupSize,sources.use = "Pericytes",weight.scale = T, label.edge= F, title.name = "Number of interactions") error :Error in levels(object@idents) : object 'object' not found

levels(P121@idents):

1] "tumor-8" "Astrocytes" [3] "tumor-0" "Oigodendrocytes" [5] "Microglia-1" "tumor-1" [7] "Neuron-like tumor-2" "Fibroblast-like cells or VLMC" [9] "Microglia-2" "OPC-like tumor-3" [11] "tumor-4" "Endothelial cells" [13] "tumor-5" "Unknown" [15] "Pericytes" "Macrophage" [17] "Inhibitory neuron" "Unknown-mito" [19] "Ependymal cells" "Pericytes-2" [21] "Proliferation-related immune cells"

sqjin commented 3 years ago

@BeyondMyPast228 If should work now after re-installing the package.