From 6952fe72640add0bc0adf21b7c63cd3af7499fb0 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz Date: Fri, 8 Nov 2024 13:49:54 -0800 Subject: [PATCH] mapper->mappers --- .../concatenators/cyclic_concatenator.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/konnektor/network_planners/concatenators/cyclic_concatenator.py b/src/konnektor/network_planners/concatenators/cyclic_concatenator.py index eb1fba7..f783c07 100644 --- a/src/konnektor/network_planners/concatenators/cyclic_concatenator.py +++ b/src/konnektor/network_planners/concatenators/cyclic_concatenator.py @@ -20,7 +20,7 @@ class CyclicConcatenator(NetworkConcatenator): def __init__( self, # TODO: should this be "mappers" for API consistency, or is it only one mapper by design? - mapper: AtomMapper, + mappers: Union[AtomMapper, Iterable[AtomMapper]], scorer: AtomMappingScorer, n_connecting_cycles: int = 2, cycle_sizes: Union[int, list[int]] = 3, @@ -33,12 +33,12 @@ def __init__( Parameters ---------- - mapper: AtomMapper - the atom mapper is required, to define the connection - between two ligands. + mappers: AtomMapper + The AtomMapper(s) to use to propose mappings. At least 1 required, + but many can be given, in which case all will be tried to find the + lowest score edges scorer: AtomMappingScorer - scoring function evaluating an atom mapping, and giving a - score between [0,1]. + Any callable which takes a AtomMapping and returns a float between [0,1] n_connecting_cycles: int, optional build at least n cycles between th networks. (default: 2) cycle_sizes: Union[int, list[int]], optional @@ -50,11 +50,11 @@ def __init__( """ if _initial_edge_lister is None: _initial_edge_lister = MaxConcatenator( - mappers=mapper, scorer=scorer, n_processes=n_processes + mappers=mappers, scorer=scorer, n_processes=n_processes ) super().__init__( - mappers=mapper, + mappers=mappers, scorer=scorer, network_generator=MstNetworkAlgorithm(), n_processes=n_processes,