Welcome to colomoto_jupyter’s documentation!#

Types#

class colomoto.types.Hypercube[source]#

Bases: dict

as_dataframe()[source]#
count()[source]#

Returns number of states represented by this object

extend(ts)[source]#
property is_single_state#
match_partial_state(ps)[source]#
match_state(ps)#
project(keys)[source]#
simplify()[source]#

Returns a State object if there is no free component in this hypercube, self otherwise.

class colomoto.types.HypercubeCollection(iterable=(), /)[source]#

Bases: list

as_dataframe()[source]#
classmethod cast(states)[source]#
count()[source]#

Returns number of states represented by this object

extend(ts)[source]#

Extend list by appending elements from the iterable.

property is_single_state#
match_partial_state(ps)[source]#
match_state(ps)#
project(keys)[source]#
simplify()[source]#

Warning: supports only Boolean states

class colomoto.types.PartialState[source]#

Bases: dict

as_dataframe()[source]#
match_partial_state(s)#
match_state(s)[source]#
project(keys)[source]#
class colomoto.types.State[source]#

Bases: PartialState

count()[source]#

Returns number of states represented by this object (1)

simplify()[source]#
class colomoto.types.TrapSpaceAttractor[source]#

Bases: Hypercube

class colomoto.types.TrapSpacesAttractor(iterable=(), /)[source]#

Bases: HypercubeCollection

colomoto.types.multivalue_merge(a, b)[source]#

miniBN#

class colomoto.minibn.BaseNetwork(data=None, Symbol_class=<class 'boolean.boolean.Symbol'>, allowed_in_name=('.', '_', ':', '-'), **kwargs)[source]#

Bases: dict

classmethod auto_cast(obj)[source]#
biolqm_format = None#
copy() a shallow copy of D[source]#
import_data(data)[source]#
classmethod load(filename, **kwargs)[source]#
rename(a, b)[source]#
rewrite(a, tr, simplify=True)[source]#
sanitize_names()[source]#
source(sep)[source]#
to_biolqm()[source]#
v(name)[source]#
vars(*names)[source]#
zero()[source]#
class colomoto.minibn.BlockParallelDynamics(spec, model, **opts)[source]#

Bases: BlockSequentialDynamics

class colomoto.minibn.BlockSequentialDynamics(sequence, model, loops=True)[source]#

Bases: PeriodicDynamics

class colomoto.minibn.BooleanNetwork(data=None, Symbol_class=<class 'boolean.boolean.Symbol'>, allowed_in_name=('.', '_', ':', '-'), **kwargs)[source]#

Bases: BaseNetwork

as_dnf()[source]#
biolqm_format = 'bnet'#
constants()[source]#
dynamics(update_mode='asynchronous', init=None, loops=None)[source]#

Returns a directed graph (networkx.DiGraph object) of the dynamics with the update_mode.

Parameters:
  • update_mode – either “asynchronous” (or equivalently “fully-asynchronous”), “synchronous” (or equivalently “parallel”), “general”. Alternatively, it can be a function returning an UpdateModeDynamics object.

  • init (dict[str,int]) – Optional initial state from which the dynamics is computed.

import_data(data)[source]#
influence_graph()[source]#
inputs()[source]#
make_hash(simplify=False)[source]#

compute a hash for the BN based on its DNF representation

propagate_constants()[source]#
For each node having a constant function, replace references to that

node by the constant in the expression of all the other nodes.

Performs simple function simplification. Modifies the Boolean network in-place. The set of constant nodes can be accessed with the constants() method.

simplify(in_place=False, suspect_dnf=True)[source]#

if in_place, modifies the network in place, otherwise works on a copy returns it. if suspect_dnf, try harder simplifications for functions that are in DNF and have literals with opposite signs in clauses (will make CNF and DNF transformations).

source(sep=', ')[source]#
to_pint()[source]#
to_pyboolnet()[source]#
class colomoto.minibn.ElementaryUpdateModeDynamics(model, min_u, max_u, **opts)[source]#

Bases: UpdateModeDynamics

class colomoto.minibn.FAsyncRun(model, init, k, seed=None)[source]#

Bases: _RandomRun

Fully-asynchronous update run

Run at most k steps of an execution of given model from initial configuration init.

Stops at fixpoints.

select_for_update(nodes)[source]#

Return the sub-sequence of nodes to actually update

class colomoto.minibn.FullyAsynchronousDynamics(model, **opts)[source]#

Bases: ElementaryUpdateModeDynamics

class colomoto.minibn.GAsyncRun(model, init, k, seed=None)[source]#

Bases: _RandomRun

(General) asynchronous update run

Run at most k steps of an execution of given model from initial configuration init.

Stops at fixpoints.

select_for_update(nodes)[source]#

Return the sub-sequence of nodes to actually update

class colomoto.minibn.GeneralAsynchronousDynamics(model, **opts)[source]#

Bases: ElementaryUpdateModeDynamics

class colomoto.minibn.MVVar(obj)[source]#

Bases: Symbol

is_instanciated()[source]#
level()[source]#
nodevar()[source]#
class colomoto.minibn.MultiValuedNetwork(*args, **kwargs)[source]#

Bases: BaseNetwork

append(a, f)[source]#
biolqm_format = 'mnet'#
import_data(data)[source]#
influence_graph()[source]#
rewrite(a, tr)[source]#
simplify()[source]#
source(sep=' <- ')[source]#
class colomoto.minibn.NOT(*args)[source]#

Bases: NOT

colomoto.minibn.ParallelDynamics#

alias of SynchronousDynamics

class colomoto.minibn.PeriodicDynamics(sequence, model, loops=True)[source]#

Bases: UpdateModeDynamics

Periodic (deterministic) updating mode.

It is parameterized by a sequence of sets of nodes to update simultaneously in order to compute the next configuration.

class colomoto.minibn.SequentialDynamics(sequence, model, **opts)[source]#

Bases: BlockSequentialDynamics

class colomoto.minibn.SyncRun(model, init, k)[source]#

Bases: _Run

Synchronous update run

Run at most k steps of an execution of given model from initial configuration init.

Stops at fixpoints.

select_for_update(nodes)[source]#

Return the sub-sequence of nodes to actually update

class colomoto.minibn.SynchronousDynamics(model, loops=True, **opts)[source]#

Bases: ElementaryUpdateModeDynamics

class colomoto.minibn.UpdateModeDynamics(model, loops=False)[source]#

Bases: object

Abstract class for the updating mode of a BooleanNetwork object

dynamics()[source]#
partial_dynamics(init)[source]#
push(d, x)[source]#
random_walk(init, steps=0, stop_condition=None, stop_at=None)[source]#
colomoto.minibn.is_constant(f)[source]#
colomoto.minibn.simplify_dnf(ba, f)[source]#
colomoto.minibn.struct_of_dnf(ba, f, container=<class 'frozenset'>, sort=False)[source]#

CellCollective#

class cellcollective.CellCollectiveConnector(identifier, version=1)[source]#
property sbml_basename#
property sbml_urls#
class cellcollective.CellCollectiveSBMLModel(localfile)[source]#
property species#

Returns the set of defined species

Return type:

set

species_metadata(name)[source]#
species_ncbi_gene(name)[source]#
species_uniprotkb(name)[source]#
cellcollective.connect(identifier)[source]#
cellcollective.id_from_url(url)[source]#
cellcollective.load(identifier, auto_persistent=True)[source]#

Load a CellCollective model from its URL or SBML export.

identifier can be: - a URL of the form "cellcollective://{model_id}:{model_version}" - the model URL from research.cellcollective.org - the location of the SBML file exported from CellCollective

Whenever identifier is one of the two first cases, the module relies on the online API of CellCollective to download the SBML file. As the API may change over time, it is strongly recommended to rely on instead on downloaded SBML files and attach them with the notebook to ensure its repeatibility over time.

With the option auto_persistent=True, the module first looks for an existing downloaded SBML file. If it does not exists, it uses the online API to download it and move it alongside the notebook.

cellcollective.to_biolqm(model)[source]#
cellcollective.url_matches(url)[source]#

colomoto_jupyter#

colomoto_jupyter.URL(url)[source]#
colomoto_jupyter.disp_jupyter_js(data, **opts)[source]#
colomoto_jupyter.import_colomoto_tool(modname)[source]#

Import the module modname and make it available globally when in IPython.

Usage:

>>> modname = import_colomoto_tool("modname")
colomoto_jupyter.jupyter_js(data, autoclean=True, **args)[source]#
colomoto_jupyter.jupyter_setup(*args, **kwargs)[source]#
colomoto_jupyter.show_image(data, is_svg=False)[source]#
colomoto_jupyter.tabulate(data, drop_duplicates=True, reindex=False, sort=True, **kwargs)[source]#

Indices and tables#