nuskell.dsdenumerator¶
- nuskell.dsdenumerator.enumerate_modules(modules, interpretation, solution, reactions, args, prefix='m')[source]¶
Enumerate all modules, but replaces wildcard species with other signal species.
- nuskell.dsdenumerator.enumerate_solution(complexes, args, named=None, molarity='nM', prefix='i')[source]¶
- nuskell.dsdenumerator.get_peppercorn_args(args)[source]¶
Transfer options to self._enumerator object.
Do NOT change default values here. These are supposed to be the defaults of peppercorn! Defaults for nuskell or any other script using this library are set with the argparse object of your script, e.g. nuskell/framework.py.
- nuskell.dsdenumerator.interpret_species(complexes, reactions, fspecies, prune=True)[source]¶
Get an interpretation dictionary.
If a
NuskellComplex()sequence contains a wildcard, then this function will find all matching complexes with history domains, rename them, and return them in form of a partial interpretation dictionary, mapping implementation species to (multisets of) formal species. Complexes may have at most one wildcard domain, which corresponds to exactly one unpaired long history domain.- Parameters:
complexes (dict[name] = obj) – A dictionary of complex names mapping to the object.
rections (list[obj]) – A list of reaction objects.
fspecies (list[str], optional) – A list of complex names that are potential regular-expression complexes.
prune (bool, optional) – Remove all formal species with wildcard domains from the network, for which there exists an logically equivalent species without the wildcard. Defaults to True.
Example
It is possible to specify sthg like: A = “? a b c” | “… .” B = “a ? b + c* a*” | “( . . + . )”
It is not possible to specify sthg like: A = “? a b ?” | “( . . )” A = “* a b c” | “* …” A = “? a ? “ | “( . ) *” A = “? a ? x + z x* f* “ | “? ? ? ( + . ) .” A = “* a * t” | “* . * .”
- Returns:
Interpretation dictionary. dict[name] = obj: complexes (after pruning) list[obj]: reactions (after pruning)
- Return type:
dict[impl.name] = Counter([fs.name])