Home > metabolic-economics > metabolic-economics-utils > cba_reduce_to_active_subnetwork.m

cba_reduce_to_active_subnetwork

PURPOSE ^

[v,N_int,Es,network_act,constraints,ind_active,ind_met_active] = cba_reduce_to_active_subnetwork(v,N_int,Es,network,constraints)

SYNOPSIS ^

function [v,N_int,Es,network_act,constraints,ind_active,ind_met_active] = cba_reduce_to_active_subnetwork(v,N_int,Es,network,constraints)

DESCRIPTION ^

 [v,N_int,Es,network_act,constraints,ind_active,ind_met_active] = cba_reduce_to_active_subnetwork(v,N_int,Es,network,constraints)

 Reduce cba problem with flux mode v to a cba problem on the active subnetwork

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [v,N_int,Es,network_act,constraints,ind_active,ind_met_active] = cba_reduce_to_active_subnetwork(v,N_int,Es,network,constraints)
0002 
0003 % [v,N_int,Es,network_act,constraints,ind_active,ind_met_active] = cba_reduce_to_active_subnetwork(v,N_int,Es,network,constraints)
0004 %
0005 % Reduce cba problem with flux mode v to a cba problem on the active subnetwork
0006 
0007 eval(default('Es','[]','network','[]'));
0008 
0009 epsilon_v_off = 10^-8;
0010 
0011 ind_active = find(abs(v)>epsilon_v_off);
0012 v          = v(ind_active);
0013 N_int      = N_int(:,ind_active);
0014 N_int      = N_int(find(sum(N_int~=0,2)),:);
0015 
0016 if ~isempty(Es),
0017   Es = Es(ind_active,:);
0018 end
0019 
0020 if ~isempty(network),
0021 %  network = network_choose(network,1:length(network.metabolites),ind_active);
0022   [network_act,ind_met_active] = network_choose(network,[],ind_active);
0023 end
0024 
0025 if exist('constraints','var'), 
0026   constraints = cba_constraints_reduce_to_active(constraints,ind_active,ind_met_active,network,network_act);
0027 else
0028   constraints = [];
0029 end

Generated on Fri 12-Feb-2016 20:18:22 by m2html © 2003