Learn R Programming

abcdeFBA (version 0.2)

CHANGE_OBJ_FUNCTION: CHANGE_OBJ_FUNCTION, a function to change the objective for optimization

Description

a function akin to the COBRA function to change the objective function for FBA

Usage

CHANGE_OBJ_FUNCTION(objective_reaction,fba_object,new_obj_weight,old_obj_weight)

Arguments

fba_object
Is a list containing the data required to perform flux balance analysis. The elements of the list are mat which is the stoichiometric matrix, dir which gives the direction of the equality constraints, obj specifies the objective function for the simu
objective_reaction
a reaction number which is to be made the new objective function; retrieved using the SEARCH reaction function
new_obj_weight
the weight of the new objective, defaults to 1 but can be any number from 0~1
old_obj_weight
the weight of the old objective, defaults to 0 but can be any number from 0~(1-new_obj_weight) or any other co-efficient if you wish for a customized objective function.

Examples

Run this code
#To change the objective function of the model.
	data(Ecoli_core)
	ec_new_obj<-CHANGE_OBJ_FUNCTION(11,Ecoli_core,0.5,0.5)
	#ec_new_obj will be identical to the Ecoli_core model except that 
	#the objective function would change
	FBA_solve(ec_new_obj)

Run the code above in your browser using DataLab