stefpeschel / NetCoMi

Network construction, analysis, and comparison for microbial compositional data
GNU General Public License v3.0
146 stars 26 forks source link

how many connection a node has #33

Closed fpeti11 closed 2 years ago

fpeti11 commented 2 years ago

Hello, I am new in using your package. I made a similar analysis like soil microbiome example in your tutorial but with my data. I got a beautiful plot, but now I would like to know how strong are the nodes connected to each other / how many connection a node has. Is there any tool to find out these connection?

Thanks in advantage

stefpeschel commented 2 years ago

Hey, the degree (local centrality measure) is exactly what you are looking for. The (unnormalized) degree of a node is defined as the number of its adjacent nodes.

The code would be the following:

netprops <- netAnalyze(net, centrLCC = TRUE, normDeg = FALSE)

summary(netprops, showCentr = "degree", numbNodes = 15L)

# access the degree directly
netprops$centralities$degree1

If you set centrLCC to FALSE, you'll get the centralities for all nodes, not only for the largest connected component.

Best, Stefanie

fpeti11 commented 2 years ago

Thank you very much for your help.

fpeti11 commented 2 years ago

Hello,

After computing the degree of a node, I would like to find out if it is a scale-free network or not. And I would like to measure modularity. Could you please help me how to find out these informations?

Thank you for your help Peter

bridgeto commented 9 months ago

Hi there,

Is there any way to identify what connections a particular node has? I would like to visualize a sub-cluster, but I'm not sure how to do this.

Bridget