ChiLiubio / meconetcomp

Compare microbial co-occurrence networks based on the trans_network class of microeco package
GNU General Public License v3.0
4 stars 0 forks source link

subset_network function in meconetcomp package #7

Open Madi784 opened 6 months ago

Madi784 commented 6 months ago

Hi,

I extracted the subset of edges according to the intersections of edges across networks using the subset_network function in meconetcomp package. I am just wondering how the "weight" of the edges and "relative abundance" of nodes (attr3 in node table) are calculated in the overlapped network?

ChiLiubio commented 6 months ago

Hi. An edge weight in the intersection is the mean of weights of the edges among all the input networks. If there is one or more networks with weight NULL, the subset network will have all weights 1. Similarly, the relative abundance of nodes is obtained by manipulating the merged abundance table (data_abund object inside the overlappled network object), which is summed based on the nodes in all the networks.