neko.core.network.Network.add_edge

Network.add_edge(edge: DataFrame)

This method adds an interaction to the list of interactions while converting it to the Omniflow-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.

Parameters: - 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. The function modifies the network object in-place by adding the interaction to the edges DataFrame and adding any new nodes to the nodes DataFrame.