neko.core.network.Network.connect_subgroup
- Network.connect_subgroup(group: str | DataFrame | list[str], maxlen: int = 1, only_signed: bool = False, consensus: bool = False) None
This function is used to connect all the nodes in a particular subgroup. It iterates over all pairs of nodes in the subgroup and finds paths between them in the resources’ database. If a path is found, it is added to the edge list of the network. The function also filters out unsigned paths if the
only_signed
flag is set to True.- Args:
- group: A list of nodes representing the subgroup to connect. Nodes can be represented as strings,
pandas DataFrame, or list of strings.
maxlen: The maximum length of the paths to be searched for in the resources’ database. Default is 1.
- only_signed: A boolean flag indicating whether to only add signed interactions to the network. Default is
False.
- consensus: A boolean flag indicating whether to only add signed interactions with consensus among
references to the network. Default is False.
- Returns:
None