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

competition(→ tuple[float, dict[str, float]])

The competition potential of a community is calculated as the ratio of

delta(→ tuple[float, dict[str, int]])

The delta score of a community is the difference between the number

rho(→ tuple[float, dict[str, int]])

The rho score of a community is the difference between the number

cooperation(→ tuple[float, dict[str, float]])

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:
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:
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:
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:
Return type:

tuple[float, dict[str, float]]