neko.core.network.Network.connect_component

Network.connect_component(comp_A: str | list[str], comp_B: str | list[str], maxlen: int = 2, mode: Literal['OUT', 'IN', 'ALL'] = 'OUT', only_signed: bool = False, consensus: bool = False)

This function attempts to connect subcomponents of a network object using one of the methods presented in the Connection object. This is a core characteristic of this package and the user should have the possibility to choose different methods to enrich its Network object.

Parameters: - comp_A: A string or list of strings representing the first component to connect. - comp_B: A string or list of strings representing the second component to connect. - maxlen: The maximum length of the paths to be searched for. Default is 2. - mode: The search mode, which can be ‘OUT’, ‘IN’, or ‘ALL’. Default is ‘OUT’. - only_signed: A boolean flag indicating whether to filter unsigned paths. Default is False. - consensus: A boolean flag indicating whether to check for consensus among references. Default is False.

Returns: None. The function modifies the network object in-place.