Closed Valentin-Bio-zz closed 1 year ago
Hey Valentín,
By selecting nodes with highest connectivity, you won't necessarily see nodes that are connected to hubs. In doing so, you select nodes with the highest sum of edge weights.
You could instead try setting nodeFilter
to "highestEigen", which should include at least some of your hubs because eigenvector centrality is part of your hub criterion. By setting hubPar = "eigenvector"
, all hubs would be included in the plot.
Selecting all nodes connected to the hubs is not implemented. You could do this "by hand" by selecting these nodes from the adjacency matrix and setting nodeFilter
to "names".
Hope this helps to produce a more readable plot.
Best, Stefanie
Hey Stefanie,
Ok so I misunderstood the theory there. Now I changed the filtering criteria to "higuestEigen" and I got my hubs represented on the graphical net, Thanks a lot.
besides that what element of the microNetProps class object controls the displayed node's names on the plot()
?
I tried with the oral_NO_AR_comp$lccNames1
in a way that I want to display the genus of the nodes as following:
oral_NO_AR_comp$lccNames1 <- as.data.frame(tax_table(oral_AR_ps))$Genus
But when I run the plot()
function, they still have the initial names
If the labels
argument is not set, the row/column names of the adjacency matrices are used as node labels. Note that labels
must be a named vector (please see the help page).
lccNames
gives the names of taxa in the largest connected component but does not affect the labels.
Thanks so much Stefanie. I created a list of two named character vectors for my data. (nets have different OTUs/ASVs).
Best,
Valentín.
Hello I dont have clear if I'm doing something wrong but I elaborated a Network analysis with two networks and I constructed the netcomi object from spieceasi adjacency matrices as follows:
After constructing the networks I used
netAnalyze()
employing 3 metrics for hub calulcaitons:when I plot all the nodes with
plot()
function I got the following network:from here I want to display only the most connected nodes around the hubs.For that purpose (and assuming that the hubs are one of the most connected nodes given the degree and betweenness parameters for hub determination). I did the following modification using the
nodeFilter
argument:But I got the nets without the hubs:
To evaluate if the hubs are just not being highlighted as appointed with the cexHubs argument I search for the hub names with
oral_NO_AR_comp$hubs
and I verified that they are not shown on the nets.Thanks so much for your time Stefannie, best,
Valentín.