freeflux.analysis.stats ======================= .. py:module:: freeflux.analysis.stats .. autoapi-nested-parse:: Define statistic functions. Attributes ---------- .. autoapisummary:: freeflux.analysis.stats.__author__ Functions --------- .. autoapisummary:: freeflux.analysis.stats._chi2_test freeflux.analysis.stats._normal_probability freeflux.analysis.stats._simulated_vs_measured_measurements freeflux.analysis.stats._simulated_vs_measured_MDVs freeflux.analysis.stats._simulated_vs_measured_fluxes freeflux.analysis.stats._confidence_intervals_le freeflux.analysis.stats._confidence_intervals_mc freeflux.analysis.stats._MDV_kinetics freeflux.analysis.stats._simulated_vs_measured_inst_MDVs freeflux.analysis.stats._contribution_matrix freeflux.analysis.stats._sensitivity Module Contents --------------- .. py:data:: __author__ :value: 'Chao Wu' .. py:function:: _chi2_test(obj_value, dof, confidence_level) :param obj_value: Objective value. :type obj_value: float :param dof: Degree of freedom. :type dof: int :param confidence_level: Confidence level, e.g., 0.95 as 95% confidence level. :type confidence_level: float .. py:function:: _normal_probability(resids, show_fig, output_dir) :param resids: Residuals. :type resids: array :param show_fig: Whether to show figure. :type show_fig: bool :param output_dir: Output directory. :type output_dir: str .. py:function:: _simulated_vs_measured_measurements(sim_meas, exp_meas, exp_meas_err, xlabel, ylabel, xticklabels, filename, show_fig, output_dir) :param sim_meas: Simulated measurements. :type sim_meas: array or list :param exp_meas: Measured measurements. :type exp_meas: array or list :param exp_meas_err: Errors of measured measurements. :type exp_meas_err: array or list :param xlabel: Xlabel. :type xlabel: str :param ylabel: Ylabel. :type ylabel: str :param xticklabels: Xticklabels. :type xticklabels: array or list :param filename: File name. :type filename: str :param show_fig: Whether to show figure. :type show_fig: bool :param output_dir: Output directory. :type output_dir: str .. py:function:: _simulated_vs_measured_MDVs(simulated_MDVs, measured_MDVs, show_fig, output_dir) :param simulated_MDVs: EMU ID => simulated MDV. :type simulated_MDVs: dict :param measured_MDVs: EMU ID => [means, sds]. :type measured_MDVs: dict :param show_fig: Whether to show figure. :type show_fig: bool :param output_dir: Output directory. :type output_dir: str .. py:function:: _simulated_vs_measured_fluxes(simulated_fluxes, measured_fluxes, show_fig, output_dir) :param simulated_fluxes: Flux ID => simulated flux. :type simulated_fluxes: dict :param measured_fluxes: Flux ID => [mean, sd]. :type measured_fluxes: dict :param show_fig: Whether to show figure. :type show_fig: bool :param output_dir: Output directory. :type output_dir: str .. py:function:: _confidence_intervals_le(res, irr, cov, dof, confidence_level) :param res: Optimal results, e.g., net fluxes, total fluxes or concentrations. :type res: ser :param irr: Irreversible items. total fluxes and concentrations are all considered irreversible. :type irr: list :param cov: Corvariance matrix of free fluxes obtained from hessian at convergence. :type cov: array :param dof: Degree of freedom. :type dof: int :param confidence_level: Confidence level, e.g., 0.95 as 95% confidence level. :type confidence_level: float .. py:function:: _confidence_intervals_mc(res_set, irr, confidence_level) :param res_set: Set of optimal net fluxes. Total fluxes or concentrations. :type res_set: list of ser :param irr: Irreversible items. Total fluxes and concentrations are all considered irreversible. :type irr: list :param confidence_level: Confidence level, e.g., 0.95 as 95% confidence level. :type confidence_level: float .. py:function:: _MDV_kinetics(emuid, simulated_inst_MDVs, show_fig, output_dir) :param emuid: EMU ID. :type emuid: str :param simulated_inst_MDVs: Timepoint => MDV. :type simulated_inst_MDVs: dict :param show_fig: Whether to show figure. :type show_fig: bool :param output_dir: Output directory. :type output_dir: str .. py:function:: _simulated_vs_measured_inst_MDVs(simulated_inst_MDVs, measured_inst_MDVs, show_fig, output_dir) :param simulated_inst_MDVs: EMU ID => {t => simulated MDV}. :type simulated_inst_MDVs: dict :param measured_inst_MDVs: EMU ID => {t => [means, sds]}. :type measured_inst_MDVs: dict :param show_fig: Whether to show figure. :type show_fig: bool :param output_dir: Output directory. :type output_dir: str .. py:function:: _contribution_matrix(cov, trans_mat, simulated_der, measured_cov) :param cov: Corvariance matrix of free fluxes obtained from hessian at convergence. :type cov: array :param trans_mat: Transformation matrix from free flux to total flux or net flux, i.e., N to total flux, T@N to net flux. :type trans_mat: array :param simulated_der: Derivative of simulated measurements w.r.t. free fluxes. :type simulated_der: array :param measured_cov: Corvariance matrix of measurements. :type measured_cov: array .. py:function:: _sensitivity(cov, trans_mat, simulated_der, measured_inv_cov) :param cov: Corvariance matrix of free fluxes obtained from hessian at convergence. :type cov: array :param trans_mat: Transformation matrix from free flux to total flux or net flux, i.e., N to total flux, T@N to net flux. :type trans_mat: array :param simulated_der: Derivative of simulated measurements w.r.t. free fluxes. :type simulated_der: array :param measured_inv_cov: Inversed corvariance matrix of measurements. :type measured_inv_cov: array