sysbiolux/rFASTCORMICS

FASTCORMICS removes reactions set in optional_settings.func

Closed this issue · 5 comments

Hello,

I've been using the optional settings of FASTCORMICS to force the reconstruction to include reactions needed to perform some metabolic tasks, and have found that the final reconstruction often does not include all reactions in settings.func. Any idea of what might be going on? I am using HUMAN1 after fastcc, and leaving the transport and exchange reactions unpenalized; no medium constraint.

Thanks!

Hi,

Thanks for your answer. I am not constraining the process with any medium so all the metabolites are there. What I found is that when I don't include the "unpenalized" field all of the reactions in "func" are indeed included. After line 141 (A = fastcore_4_rfastcormics(B, model, epsilon, C);) the rxns in "func" are incorporated into the set C, but some of them are removed because my guess is that they are not expressed or are part of an unpenalized system?

That makes sense! However, sometimes to satisfy metabolic tasks we need to force those transporter reactions to be in the core set. I modified the code like this:

%% Establishment of the reactions in the core set

[~, ~, IB] = intersect(model_input.rxns(C), model_output.rxns);
C = IB;
%Removal of transporters from the core set

t_keep = [];
if ~isempty(optional_settings)&& isfield(optional_settings, 'unpenalized');
t_keep = find(ismember(model_output.rxns(C),optional_settings.unpenalized));
t_keep = C(unique(t_keep));
end
C = setdiff(C,t_keep);
if ~isempty(function_keep)
func_keep = find(ismember(model_output.rxns,function_keep));
C = union(C, func_keep);
end

I added the last four lines to override some of the unpenalized reactions that might have been excluded and put them back again in the core set. This has solved the issue and leads to functional models. Thanks again!