Error in netVisual_circle(prob.i, sources.use = sources.use, targets.use = targets.use, : The input `color.use` should be a named vector!
Thanks for your useful tool. However, when I use netVisual_individual, I have a problem. This is my code. color_use <- c('#E41A1C','#377EB8','#00CCCC','#984EA3','#FF7F00','#FFCC33','#A65628','#F781BF','#999999','#A6CEE3','#9999CC','#666633','#33A02C','#FB9A99', "#CC33FF", "#FF3366") netVisual_individual(cell_chat_all_cell, signaling = "PD-L1", pairLR.use = "CD274_PDCD1", layout = "circle", color.use = color_use)
Error in netVisual_circle(prob.i, sources.use = sources.use, targets.use = targets.use, : The input color.use should be a named vector!
Traceback:
- netVisual_individual(cell_chat_all_cell, signaling = "PD-L1", . pairLR.use = "CD274_PDCD1", layout = "circle", color.use = color_use)
- netVisual_circle(prob.i, sources.use = sources.use, targets.use = targets.use, . remove.isolate = remove.isolate, top = top, color.use = color.use, . vertex.weight = vertex.weight, vertex.weight.max = vertex.weight.max, . vertex.size.max = vertex.size.max, weight.scale = weight.scale, . edge.weight.max = edge.weight.max, edge.width.max = edge.width.max, . title.name = signalName_i, vertex.label.cex = vertex.label.cex, . ...)
- stop("The input
color.useshould be a named vector! \n")
when I set layout = "chord", it can normally run.
When I use the netVisual_circle() in V2.0.0, It is ok. I think this problem is a bug.
Were you able to resolve this? I am having a similar issue with netAnalysis_signalingRole_network which outputted the error: 'elements in 'col' should be named vectors. A named vector was used for color.use parameter in a similar manner to other visualisation functions (e.g netVisual_chord_gene (where it worked fine) but here in the instance of the netAnalysis_signalingRole_network function, it did not work.
Were you able to resolve this? I am having a similar issue with netAnalysis_signalingRole_network which outputted the error: 'elements in 'col' should be named vectors. A named vector was used for color.use parameter in a similar manner to other visualisation functions (e.g netVisual_chord_gene (where it worked fine) but here in the instance of the netAnalysis_signalingRole_network function, it did not work.
I have used the 2.0.0 of CellChat to solve this problem.
I am getting this error with version 2.1.2 of cellchat for heatmap-related plots, including netAnalysis_signalingRole_network() and netVisual_heatmap(). Has this bug been addressed?
I am getting the same error with CellChat version 2.2.0. I have stored my colors in a named vector and used the this vector in netVisual_diffInteraction without any issues, but when I give the same vector to netVisual_heatmap, I am getting Error: elements in col should be named vectors.
Is there any update concerning this?