Creation of multi-network
The core concept is to be able to pass multiple networks to a builder which create a single multi-network encompassing all the given sub-networks. The meta-network is a special case of multi-network where each sub network remains independent, but share parts of its content with other sub networks through shared compartments. This enable the creation of multi-organ networks. The community-network is a special case of meta-network, where there is a single "medium" shared compartment that contains all the subnetworks.
The current implementation of a meta-network building is as follow:
- import/create all subnetworks
- pass each subnetworks to a metanetwork builder
- create shared compartments and pass them to the metanetwork builder
- affect each sub-network to one or several shared compartments
- define which compounds are shared in each shared-compartments. This can be done in 3 ways:
- define one metabolite at a time, selecting the compound, the source sub-network and the target shared compartment
- 'fuse' a compartment: select a (external/boundary) sub-network's compartment that will be replaced by the selected shared compartment
- 'bump' a compartment: select a (external/boundary) sub-network's compartment for which each component will be copied in the selected compartment
- create the new meta-network. Similarly to compartment merging, an aggregation function (that can be passed as optional arg) will be called to regroups in the shared compartment the same compounds from different sources, and automatically create a "pool" specie that connect to all of them. In case of bumping, transport to the shared compartment are also automatically created.