n_celltype<-n[, 57:64] #1:9, 10:18, 19:27, 28:36, 37:45, 46:54, 55:63, 64:72, 73:81 #1:8 9:16 17:24 25:32 33:40 41:48 49:56 57:64
pathway.hyper.list <- lapply(colnames(n_celltype), function(i){
print(i)
tmp <- getHyperPathway(data = n_celltype, object = mt, cella_cellb = i, Org="Homo sapiens") #data:A dataframe of communication score where row name is ligand-receptor and column names is cellA-cellB, stored in the data$expr_l_r_log2_scale slot of S4 object;object:A Cellcall S4 object, the result of function CreateNichConObject() and TransCommuProfile().;cella_cellb:If explore the pathway enriched by paired ligand-receptor dataset between sender cellA and receiver cellB, user can set cella_cellb="A-B".
return(tmp)
}) #A list of enrichment result
myPub.df <- getForBubble(pathway.hyper.list, cella_cellb=colnames(n_celltype)) #If explore the pathway enriched by paired ligand-receptor dataset between sender cellA and receiver cellB, user can set cella_cellb="A-B".
png("1.png")
plotBubble(myPub.df)
dev.off()
[1] "Erythrocytes-CD14+ Monocytes"
Error in apply(path.list.tmp.df, 1, function(x) { :
dim(X) must have a positive length
原因:因为n_celltype的值全部为0?