CASCI-lab / CANA

CANAlization: Control & Redundancy in Boolean Networks
https://casci-lab.github.io/CANA/
MIT License
22 stars 15 forks source link

Effective degree computation missing 'weight' argument #26

Closed fcphysics closed 1 year ago

fcphysics commented 1 year ago

When computing the degree of a weighted graph in Networkx, one needs to specify the weight attribute name. This is missing on lines 536 and 548.

Another possible solution (for the indegree) is to set get it from node.effective_connectivity(norm=False).

jcrozum commented 1 year ago

This problem extends to the effective_outdegrees function, and probably others as well.

austin-marcus commented 1 year ago

30 resolves this for the effective_indegrees and effective_outdegrees functions.

The networkx function in_degree or out_degree is used also to compute the structural graph and state transition graph node degrees, but I don't know if these need to consider the edge weights.

austin-marcus commented 1 year ago

Effectiveness is not used to compute the structural or STG node degrees, so those functions don't need to utilize the weight argument in their networkx functions for effectiveness.