Highlighting specific hubs in the graph
Lucifer1814 opened this issue · 1 comments
Hello all,
Thank you for developing this package. I am Shradha Sharma, working on co-occurence analysis of Hydrothermal vent microbiome. I have a doubt reagarding highlighting specific nodes as hubs. Instead of nodes with highest degree, i want to highlight nodes of my choice. The size should be bigger than the rest of the nodes. The highlighted nodes should all be of same size.
node_sizes <- rep(2, length(node_names))
names(node_sizes) <- node_names
hub_size_increase <- 4
node_sizes[hubs] <- hub_size_increase
plot.hv_10 <- plot(prop_hv,
layout = "layout_with_fr",
rmSingles = TRUE,
layoutGroup = "union",
edgeFilter = "threshold",
edgeFilterPar = 0.1,
nodeColor = "feature",
featVecCol = featVecCol,
colorVec = colorVec,
nodeSize = 2, # Use the custom node size vector
highlightHubs = TRUE,
highlightNodes = "hubs",
cexNodes = 2,
cexHubs = 6,
cexHubLabels = 8,
cexTitle = 9,
mar = c(1, 1, 1, 1),
labels = NULL,
repulsion = 0.0,
nodeSizeSpread = 1,
edgeTranspHigh = 20,
labelFont = 10,
labelScale = TRUE,
borderWidth = 1,
cexLabels = 4
)
Your help would be greatly appreciated.
Hi,
The way you want to highlight nodes, it's unfortunately not possible.
A workaround I could think of is manipulating the hub nodes in the microNetProps object returned by netAnalyze()
.