Open dimwas opened 2 days ago
Thank you for reporting this. The code is actually correct, although the documentation is not clear enough:
% report
% reactants array with reactant indexes
% canMake boolean array, true if the corresponding reactant can
% be synthesized
% products array with product indexes
% canConsume boolean array, true if the corresponding reactant can
% be consumed
As you see, canMake
refers to the metabolites in reactants
, while canConsume
refers to the metabolites in products
. The dimensions are therefore correct. The names of these fields might be somewhat misleading though.
Take reactants
, this contains the metabolites that are specified as substrates in the selected reaction (r_4041
in your example). canMake
then specifies if the rest of the metabolic network can make these metabolites.
You likely interpreted canMake
as "can-this-be-made-by-r_4041
"? This would then indeed refer to the products of this reaction.
I propose to clarify this in the documentation as follows:
% report
% reactants array with reactant indexes
% canMake boolean array, true if the corresponding reactant can
% be synthesized by the rest of the metabolic network
% products array with product indexes
% canConsume boolean array, true if the corresponding reactant can
% be consumed by the rest of the metabolic network
You likely interpreted
canMake
as "can-this-be-made-by-r_4041
"? This would then indeed refer to the products of this reaction.
Yes, you are correct. I thought it is natural to think so, because 'reactants' and 'products' are the terms related to the reaction in question. I think your suggestions regarding the documentation will clear the misunderstanding up; to be precisely specific, I would write:
% report
% reactants array with reactant indexes
% canMake boolean array, true if the corresponding reactant can
% be synthesized by the rest of the metabolic network
% products array with product indexes
% canConsume boolean array, true if the corresponding **product** can
% be consumed by the rest of the metabolic network
Ah, I missed that reactant/product in the last definition.
Description of the issue:
The function
checkRxn
produces a struct as a report. In it, 4 arrays are included:reactants
,products
,canMake
andcanConsume
. ThereforecanMake
must has the same dimension asproducts
, but now it has the same dimension asreactants
.canConsume
has the same dimension asproducts
instead. There are no error messages. One can fix it by simply switchingcanMake
andcanConsume
names.Reproducing this issue:
Can be reproduced using 'yeastGEM_v9.0.0'. 'r_4041' is the biomass production reaction.
Here,
reactants
is a 9x1 array, butcanConsume
is a 4x1 array. In the same time,products
is a 4x1 array, andcanMake
is a 9x1 array.System information
=== Model import and export ===
=== Model solvers ===
=== Essential binary executables ===
=== Compatibility ===
checkInstallation complete
ans =
I hereby confirm that I have: