micom.interaction

Submodules

Package Contents

Functions

interactions(→ pandas.DataFrame)

Quantify interactions of a focal/reference taxon with other taxa.

MES(→ pandas.DataFrame)

Calculate the Metabolic Exchange Score (MES) for each metabolite.

summarize_interactions(→ pandas.DataFrame)

Summarize interactions to key quantities.

micom.interaction.interactions(results: micom.workflows.GrowthResults, taxa: None | str | List[str], threads: int = 1, progress: bool = True) pandas.DataFrame[source]

Quantify interactions of a focal/reference taxon with other taxa.

Parameters:
  • results (GrowthResults) – The growth results to use.

  • taxa (str, list of str, or None) – The focal taxa to use. Can be a single taxon, a list of taxa or None in which case all taxa are considered.

Returns:

The mapped interactions between the focal taxon and all other taxa.

Return type:

pandas.DataFrame

micom.interaction.MES(results: micom.workflows.GrowthResults, cutoff: float = None) pandas.DataFrame[source]

Calculate the Metabolic Exchange Score (MES) for each metabolite.

MES is the harmonic mean of producers and consumers for a chosen metabolite in one sample. High values indicate a large prevalence of cross-feeding for the particular metabolite. A value of zero indicates an absence of cross-feeding for the particular metabolite.

Parameters:
  • results (GrowthResults) – The growth results to use.

  • cutoff (float) – The smallest flux to consider in the analysis. Will default to the solver tolerance if set to None.

Returns:

The scores for each metabolite and each sample including metabolite annotations.

Return type:

pandas.DataFrame

References

micom.interaction.summarize_interactions(ints: pandas.DataFrame) pandas.DataFrame[source]

Summarize interactions to key quantities.

Parameters:

ints (pandas.DataFrame) – The interactions for individual metabolites calculated before.

Returns:

The summarized interactions contaning the total flux, mass flux, carbon flux, nitrogen flux and number of interactions between any pair of taxa in that sample.

Return type:

pandas.DataFrame