:py:mod:`cobra.summary.summary` =============================== .. py:module:: cobra.summary.summary .. autoapi-nested-parse:: Provide the abstract base summary class. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: cobra.summary.summary.Summary Attributes ~~~~~~~~~~ .. autoapisummary:: cobra.summary.summary.logger .. py:data:: logger .. py:class:: Summary(**kwargs) Bases: :py:obj:`abc.ABC` Define the abstract base summary. .. seealso:: :obj:`MetaboliteSummary`, :obj:`ReactionSummary`, :obj:`ModelSummary` .. py:property:: tolerance :type: float Return the set threshold. .. py:method:: _generate(model: cobra.Model, solution: Optional[cobra.Solution], fva: Optional[Union[float, pandas.DataFrame]]) -> None Prepare the data for the summary instance. :param model: The metabolic model for which to generate a metabolite summary. :type model: cobra.Model :param solution: A previous model solution to use for generating the summary. If ``None``, the summary method will generate a parsimonious flux distribution. :type solution: cobra.Solution, optional :param fva: Whether or not to include flux variability analysis in the output. If given, `fva` should either be a previous FVA solution matching the model or a float between 0 and 1 representing the fraction of the optimum objective to be searched. :type fva: pandas.DataFrame or float, optional .. py:method:: __str__() -> str Return a string representation of the summary. .. py:method:: _repr_html_() -> str Return a rich HTML representation of the summary. .. py:method:: _normalize_threshold(threshold: Optional[float]) Return a sensible threshold value. .. py:method:: to_string(names: bool = False, threshold: Optional[float] = None, float_format: str = '.4G', column_width: int = 79) -> str :abstractmethod: Return a pretty string representation of the summary. :param names: Whether or not elements should be displayed by their common names (default False). :type names: bool, optional :param threshold: Hide fluxes below the threshold from being displayed. If no value is given, the model tolerance is used (default None). :type threshold: float, optional :param float_format: Format string for floats (default '.4G'). :type float_format: str, optional :param column_width: The maximum column width for each row (default 79). :type column_width: int, optional :returns: The summary formatted as a pretty string. :rtype: str .. py:method:: to_html(names: bool = False, threshold: Optional[float] = None, float_format: str = '.4G') -> str :abstractmethod: Return a rich HTML representation of the metabolite summary. :param names: Whether or not elements should be displayed by their common names (default False). :type names: bool, optional :param threshold: Hide fluxes below the threshold from being displayed. If no value is given, the model tolerance is used (default None). :type threshold: float, optional :param float_format: Format string for floats (default '.4G'). :type float_format: str, optional :returns: The summary formatted as HTML. :rtype: str .. py:method:: to_frame() -> pandas.DataFrame Return the a data frame representation of the summary.