ensemble_fva(ensemble, reaction_list, num_models=, specific_models=None, fraction_of_optimum=1.0, loopless=False, **solver_args)¶
Performs FVA on num_models. If num_models is not passed, performs FVA on every model in the ensemble. If the model is a community model, num_models must be passed.
Performs flux variability analysis (FVA) on models within an ensemble.
- ensemble (medusa.core.Ensemble) – The ensemble on which FVA is to be performed.
- reaction_list (str or list of str, optional) – List of reaction ids (cobra.core.reaction.id), or a single reaction id, for which to return flux ranges. If None, all reaction fluxes are returned (default).
- num_models (int, optional) – Number of models for which FVA will be performed. The number of models indicated will be randomly sampled and FVA will be performed on the sampled models. If None, all models will be selected (default), or the models specified by specific_models will be selected. Cannot be passed concurrently with specific_models.
- specific_models (list of str, optional) – List of ensemble_member.id corresponding to the models for which FVA will be performed. If None, all models will be selected (default), or num_models will be randomly sampled and selected. Cannot be passed concurrently with num_models.
- fraction_of_optimum (float, optional) – fraction of the optimum objective value, set as a constraint such that the objective never falls below the provided fraction when assessing variability of each reaction.
- loopless (boolean, optional) – Whether or not to perform loopless FVA. This is much slower. See cobrapy.flux_analysis.variability for details.
A dataframe in which each row (index) represents a model within the ensemble and the lower or upper value of flux ranges, and each column represents a reaction and its lower or upper value of its flux range. Based on this formatting, each model is present in two rows, one of which contains the lower flux value and the other of which contains the upper flux value.