cocomico.score
Compute scores for communities, which permit ranking communities based on potential for cooperation or competition, or based on added value in terms of scope or activated reactions.
Functions
|
The competition potential of a community is calculated as the ratio of |
|
The delta score of a community is the difference between the number |
|
The rho score of a community is the difference between the number |
|
The cooperation potential of a community is calculated from the metabolic |
Module Contents
- cocomico.score.competition(community: cocomico.community.Community, seeds: cocomico.base.Seeds) tuple[float, dict[str, float]][source]
The competition potential of a community is calculated as the ratio of polyopsonist metabolites to taxa.
- Parameters:
community (cocomico.community.Community)
seeds (cocomico.base.Seeds)
- Return type:
tuple[float, dict[str, float]]
- cocomico.score.delta(community: cocomico.community.Community, seeds: cocomico.base.Seeds) tuple[float, dict[str, int]][source]
The delta score of a community is the difference between the number of metabolites in the community scope and the sum of the individual scopes.
- Parameters:
community (cocomico.community.Community)
seeds (cocomico.base.Seeds)
- Return type:
tuple[float, dict[str, int]]
- cocomico.score.rho(community: cocomico.community.Community, seeds: cocomico.base.Seeds) tuple[float, dict[str, int]][source]
The rho score of a community is the difference between the number of activated×taxon tuples in the community scope and the sum of the individual activated×taxon tuples.
- Parameters:
community (cocomico.community.Community)
seeds (cocomico.base.Seeds)
- Return type:
tuple[float, dict[str, int]]
- cocomico.score.cooperation(community: cocomico.community.Community, seeds: cocomico.base.Seeds) tuple[float, dict[str, float]][source]
The cooperation potential of a community is calculated from the metabolic exchanges. It is the weighted sum, over all exchanged metabolites, of the number of producers and consumers of that metabolite. The weight is an exponentially decaying bonus.
- Parameters:
community (cocomico.community.Community)
seeds (cocomico.base.Seeds)
- Return type:
tuple[float, dict[str, float]]