|
| 1 | +import optlang |
| 2 | +import pandas as pd |
| 3 | +import types |
| 4 | +from ..medium import find_boundary_types as find_boundary_types, find_external_compartment as find_external_compartment, sbo_terms as sbo_terms |
| 5 | +from ..util.context import HistoryManager as HistoryManager, get_context as get_context, resettable as resettable |
| 6 | +from ..util.solver import add_cons_vars_to_problem as add_cons_vars_to_problem, assert_optimal as assert_optimal, check_solver as check_solver, interface_to_str as interface_to_str, remove_cons_vars_from_problem as remove_cons_vars_from_problem, set_objective as set_objective |
| 7 | +from ..util.util import AutoVivification as AutoVivification, format_long_string as format_long_string |
| 8 | +from .configuration import Configuration as Configuration |
| 9 | +from .dictlist import DictList as DictList |
| 10 | +from .gene import Gene as Gene |
| 11 | +from .group import Group as Group |
| 12 | +from .metabolite import Metabolite as Metabolite |
| 13 | +from .object import Object as Object |
| 14 | +from .reaction import Reaction as Reaction |
| 15 | +from .solution import get_solution as get_solution |
| 16 | +from _typeshed import Incomplete |
| 17 | +from cobra import Solution as Solution |
| 18 | +from cobra.summary import ModelSummary as ModelSummary |
| 19 | +from cobra.util.solver import CONS_VARS as CONS_VARS |
| 20 | +from optlang.container import Container as Container |
| 21 | +from optlang.symbolics import Basic |
| 22 | +from types import ModuleType |
| 23 | +from typing import Iterable |
| 24 | + |
| 25 | +logger: Incomplete |
| 26 | +configuration: Incomplete |
| 27 | + |
| 28 | +class Model(Object): |
| 29 | + genes: Incomplete |
| 30 | + reactions: Incomplete |
| 31 | + metabolites: Incomplete |
| 32 | + groups: Incomplete |
| 33 | + def __init__(self, id_or_model: str | Model | None = None, name: str | None = None) -> None: ... |
| 34 | + @property |
| 35 | + def solver(self) -> optlang.interface.Model: ... |
| 36 | + @solver.setter |
| 37 | + @resettable |
| 38 | + def solver(self, value: str | ModuleType) -> None: ... |
| 39 | + @property |
| 40 | + def tolerance(self) -> float: ... |
| 41 | + @tolerance.setter |
| 42 | + def tolerance(self, value: float) -> None: ... |
| 43 | + @property |
| 44 | + def compartments(self) -> dict: ... |
| 45 | + @compartments.setter |
| 46 | + def compartments(self, value: dict) -> None: ... |
| 47 | + @property |
| 48 | + def medium(self) -> dict[str, float]: ... |
| 49 | + @medium.setter |
| 50 | + def medium(self, medium: dict[str, float]) -> None: ... |
| 51 | + def copy(self) -> Model: ... |
| 52 | + def add_metabolites(self, metabolite_list: list | Metabolite) -> None: ... |
| 53 | + def remove_metabolites(self, metabolite_list: list | Metabolite, destructive: bool = False) -> None: ... |
| 54 | + def add_boundary(self, metabolite: Metabolite, type: str = 'exchange', reaction_id: str | None = None, lb: float | None = None, ub: float | None = None, sbo_term: str | None = None) -> Reaction: ... |
| 55 | + def add_reactions(self, reaction_list: Iterable[Reaction]) -> None: ... |
| 56 | + def remove_reactions(self, reactions: str | Reaction | list[str | Reaction], remove_orphans: bool = False) -> None: ... |
| 57 | + def add_groups(self, group_list: str | Group | list[Group]) -> None: ... |
| 58 | + def remove_groups(self, group_list: str | Group | list[Group]) -> None: ... |
| 59 | + def get_associated_groups(self, element: Reaction | Gene | Metabolite) -> list[Group]: ... |
| 60 | + def add_cons_vars(self, what: list['CONS_VARS'] | tuple['CONS_VARS'], **kwargs) -> None: ... |
| 61 | + def remove_cons_vars(self, what: list['CONS_VARS'] | tuple['CONS_VARS']) -> None: ... |
| 62 | + @property |
| 63 | + def problem(self) -> optlang.interface: ... |
| 64 | + @property |
| 65 | + def variables(self) -> Container: ... |
| 66 | + @property |
| 67 | + def constraints(self) -> Container: ... |
| 68 | + @property |
| 69 | + def boundary(self) -> list[Reaction]: ... |
| 70 | + @property |
| 71 | + def exchanges(self) -> list[Reaction]: ... |
| 72 | + @property |
| 73 | + def demands(self) -> list[Reaction]: ... |
| 74 | + @property |
| 75 | + def sinks(self) -> list[Reaction]: ... |
| 76 | + def slim_optimize(self, error_value: float | None = ..., message: str | None = None) -> float: ... |
| 77 | + def optimize(self, objective_sense: str | None = None, raise_error: bool = False) -> Solution: ... |
| 78 | + def repair(self, rebuild_index: bool = True, rebuild_relationships: bool = True) -> None: ... |
| 79 | + @property |
| 80 | + def objective(self) -> optlang.Objective: ... |
| 81 | + @objective.setter |
| 82 | + def objective(self, value: dict[Reaction, 'Container'] | str | int | Reaction | optlang.interface.Objective | Basic) -> None: ... |
| 83 | + @property |
| 84 | + def objective_direction(self) -> str: ... |
| 85 | + @objective_direction.setter |
| 86 | + @resettable |
| 87 | + def objective_direction(self, value: str) -> None: ... |
| 88 | + def summary(self, solution: Solution | None = None, fva: pd.DataFrame | float | None = None) -> ModelSummary: ... |
| 89 | + def __enter__(self) -> Model: ... |
| 90 | + def __exit__(self, type: type[BaseException] | None, value: BaseException | None, traceback: types.TracebackType | None) -> None: ... |
| 91 | + def merge(self, right: Model, prefix_existing: str | None = None, inplace: bool = True, objective: str = 'left') -> Model: ... |
0 commit comments