micom.solution¶
A community solution object.
Attributes¶
Classes¶
An FBA solution for an entire community. |
Functions¶
|
Format a list of values by id and taxa. |
|
Add pFBA objective. |
|
Get all fluxes stratified by taxa. |
|
Reset the solver. |
|
Try to reset the solver. |
|
Get the crossover solution. |
|
Optimize with a constrained community growth rate. |
Module Contents¶
- micom.solution._group_taxa(values, ids, taxa, what='reaction')[source]¶
Format a list of values by id and taxa.
- class micom.solution.CommunitySolution(community, slim=False, reactions=None, metabolites=None)[source]¶
Bases:
cobra.core.Solution
An FBA solution for an entire community.
- members[source]¶
Contains basic info about the individual compartments/members of the community such as id, abundance and growth rates. Will also include one row for the external medium (without abundance and growth rate).
- Type:
pandas.Series
- fluxes[source]¶
Contains the reaction fluxes (primal values of variables) stratified by compartment. Columns denote individual fluxes and rows denote compartments: one for every taxon plus one for the external medium. Fluxes will be NA if the reaction does not exist in the organism.
- Type:
pandas.DataFrame
- reduced_costs[source]¶
Contains reaction reduced costs (dual values of variables) stratified by taxa. Columns denote individual fluxes and rows denote taxa. Reduced costs will be NA if the reaction does not exist in the organism.
- Type:
pandas.Series
- micom.solution.add_pfba_objective(community, atol=1e-06, rtol=1e-06)[source]¶
Add pFBA objective.
Add objective to minimize the summed flux of all reactions to the current objective. This one will work with any objective (even non-linear ones).
See also
pfba
- Parameters:
community (micom.Community) – The community to add the objective to.
- micom.solution.solve(community, fluxes=True, pfba=True, raise_error=False, atol=1e-06, rtol=1e-06)[source]¶
Get all fluxes stratified by taxa.