17.1.1.1.1.1. cobra.core.summary
¶
17.1.1.1.1.1.1. Submodules¶
17.1.1.1.1.1.2. Package Contents¶
17.1.1.1.1.1.2.1. Classes¶
Define the abstract base summary. |
|
Define the metabolite summary. |
|
Define the model summary. |
-
class
cobra.core.summary.
Summary
(model, solution=None, threshold=None, fva=None, names=False, float_format='{:.3G}'.format, **kwargs)[source]¶ Bases:
object
Define the abstract base summary.
-
model
¶ The metabolic model in which to generate a summary description.
- Type
-
solution
¶ A solution that matches the given model.
- Type
-
fva
¶ The result of a flux variability analysis (FVA) involving reactions of interest if an FVA was requested.
- Type
pandas.DataFrame, optional
-
float_format
¶ Format string for displaying floats.
- Type
callable
-
to_frame
()¶ Return a data frame representation of the summary.
-
abstract
_generate
(self)¶ Generate the summary for the required cobra object.
This is an abstract method and thus the subclass needs to implement it.
-
_process_flux_dataframe
(self, flux_dataframe)¶ Process a flux DataFrame for convenient downstream analysis.
This method removes flux entries which are below the threshold and also adds information regarding the direction of the fluxes. It is used in both ModelSummary and MetaboliteSummary.
- Parameters
flux_dataframe (pandas.DataFrame) – The pandas.DataFrame to process.
- Returns
- Return type
A processed pandas.DataFrame.
-
abstract
to_frame
(self) Generate a pandas DataFrame.
This is an abstract method and thus the subclass needs to implement it.
-
abstract
_to_table
(self)¶ Generate a pretty-print table.
This is an abstract method and thus the subclass needs to implement it.
-
__str__
(self)¶ Return str(self).
-
_repr_html_
(self)¶
-
-
class
cobra.core.summary.
MetaboliteSummary
(metabolite, model, **kwargs)[source]¶ Bases:
cobra.core.summary.Summary
Define the metabolite summary.
-
metabolite
¶ The metabolite to summarize.
- Type
-
_generate
(self)¶ - Returns
flux_summary – The DataFrame of flux summary data.
- Return type
pandas.DataFrame
-
to_frame
(self)¶ - Returns
- Return type
A pandas.DataFrame of the summary.
-
_to_table
(self)¶ - Returns
- Return type
A string of the summary table.
-
-
class
cobra.core.summary.
ModelSummary
(model, **kwargs)[source]¶ Bases:
cobra.core.summary.Summary
Define the model summary.
-
_generate
(self)¶ - Returns
flux_summary – The DataFrame of flux summary data.
- Return type
pandas.DataFrame
-
to_frame
(self)¶ - Returns
- Return type
A pandas.DataFrame of the summary.
-
_to_table
(self)¶ - Returns
- Return type
A string of the summary table.
-