SCA-IRCM / SingleCellSignalR

R package for Bioconductor submission
30 stars 12 forks source link

How to make flow diagram like in paper Fig4G? #6

Open gt7901b opened 4 years ago

gt7901b commented 4 years ago

Hi:

How to make flow diagram like in paper Fig.4G to display total number of L-R interactions between clusters?

thanks

SCA-IRCM commented 4 years ago

Hi, The flow diagram that you can see in paper figure 4G is not a part of SingleCellSignalR. To create it you need to use the alluvial() function of the alluvial package (https://cran.r-project.org/web/packages/alluvial/). Thanks for using SingleCellSignalR.

SCA

PS: see below for an example with signal the result of the cell_signaling() function:

n <- unlist(lapply(signal,nrow))
nam <- do.call(rbind,strsplit(names(signal),"-",fixed=T))
alluvial(data.frame(nam),freq = n, col=rainbow(nrow(nam)))