freeflux.analysis.simulate ========================== .. py:module:: freeflux.analysis.simulate .. autoapi-nested-parse:: Define the Simulator class. Attributes ---------- .. autoapisummary:: freeflux.analysis.simulate.__author__ Classes ------- .. autoapisummary:: freeflux.analysis.simulate.Simulator Module Contents --------------- .. py:data:: __author__ :value: 'Chao Wu' .. py:class:: Simulator(model) :param model: Freeflux Model. :type model: Model .. py:attribute:: model .. py:attribute:: calculator .. py:attribute:: contexts :value: [] .. py:method:: __enter__() .. py:method:: __exit__(type, value, traceback) .. py:method:: set_target_EMUs(target_emus) :param target_emus: Metabolite ID => atom NOs or list of atom NOs. Atom NOs can be int list or str, e.g.,, {'Ala': [[1,2,3], [2,3]], 'Ser': '123'}. :type target_emus: dict .. py:method:: _unset_target_EMUs(emuids) .. py:method:: set_labeling_strategy(labeled_substrate, labeling_pattern, percentage, purity, label_atom='C') Use this method for every substrate tracer. :param labeled_substrate: Metabolite ID. :type labeled_substrate: str :param labeling_pattern: Labeling pattern of substrate, '0' for unlabeled atom, '1' for labeled atom, e.g., '100000' for 1-13C glucose. List if tracer with multiple labeling patterns are used. Natural substrate (with all '0's) don't need to be explicitly set. If str, labeling_pattern should not be natural substrate. :type labeling_pattern: str or list of str :param percentage: Molar percentage (in range of [0,1]) of corresponding tracer. Sum of percentage should be <= 1, and the rest will be considered as natural substrate. List if tracer with multiple labeling patterns are used. * If list, len(percentage) should be equal to len(labeling_pattern). * If float, labeling_pattern should not be natural substrate. :type percentage: float or list of float :param purity: Labeled atom purity (in range of [0,1]) of corresponding tracer. List if tracer with multiple labeling patterns are used. * If list, len(purity) should be equal to len(labeling_pattern). * If float, labeling_pattern should not be natural substrate. :type purity: float or list of float :param label_atom: Labeled atom, i.e., base atom in the MDV. Currently supports only "H", "C" and "N". :type label_atom: str .. py:method:: _unset_labeling_strategy(labeled_substrate) :param labeled_substrate: Metabolite ID. :type labeled_substrate: str .. py:method:: set_flux(fluxid, value) Set metabolic flux value. :param fluxid: Flux IDs, i.e., reaction ID + '_f' or '_b' for reversible reaction, and reaction ID for irreversible reaction. :type fluxid: str :param value: Flux value. :type value: float .. py:method:: set_fluxes_from_file(file) Read metabolic flux values from file. :param file: tsv or excel file, fields are flux ID and value, flux ID is reaction ID + '_f' or '_b' for reversible reaction, and reaction ID for irreversible reaction. :type file: file path .. py:method:: _unset_fluxes(fluxids) :param fluxids: Flux ID(s). :type fluxids: str or list of str .. py:method:: _decompose_network(n_jobs, lump=True) :param n_jobs: # of jobs to run in parallel. :type n_jobs: int :param lump: Whether to lump linear EMUs. :type lump: bool .. py:method:: _unset_decomposition() .. py:method:: _lambdify_matrix_As_and_Bs() .. py:method:: _unset_matrix_As_and_Bs() .. py:method:: _calculate_substrate_MDVs(extra_subs=None) :param extra_subs: Metabolite ID(s). Additional metabolites that are considered as substrates. :type extra_subs: str or list of str .. py:method:: _unset_substrate_MDVs() .. py:method:: prepare(n_jobs=1) :param n_jobs: If n_jobs > 1, decomposition job will run in parallel. :type n_jobs: int .. py:method:: _check_dependencies() .. py:method:: simulate()