neko.core.network.Network.add_edge

Network.add_edge(edge: DataFrame) None

This method adds an interaction to the list of interactions while converting it to the NeKo-network format. It checks if the edge represents inhibition or stimulation and sets the effect accordingly. It also checks if the nodes involved in the interaction are already present in the network, if not, it adds them.

Args:
  • edge: A pandas DataFrame representing the interaction. The DataFrame should contain columns for

‘source’, ‘target’, ‘type’, and ‘references’. The ‘source’ and ‘target’ columns represent the nodes involved in the interaction. The ‘type’ column represents the type of interaction. The ‘references’ column contains the references for the interaction.

Returns:
  • None