ModelSEED / ModelSEEDDatabase

This repository contains the definitive copy of the biochemistry and metadata used to construct models using the ModelSEED/ProbAnno approach
Other
53 stars 38 forks source link

How did status field get updated in reactions.master.tsv? #10

Closed mmundy42 closed 9 years ago

mmundy42 commented 9 years ago

I'm trying to verify my changes to the Print_Master_Reactions_List.pl script and I'm not sure how the status field changed in the reactions.master.tsv file. Looking at rxn00001, in reactions.default.tsv the status is "OK":

rxn00001    PPA Pyrophosphate phosphohydrolase  (1) cpd00001[c] + (1) cpd00012[c] <=> (2) cpd00009[c]   -1:cpd00001:c:0:"H2O";-1:cpd00012:c:0:"PPi";2:cpd00009:c:0:"Phosphate";2:cpd00067:c:0:"H+"  0   (1) cpd00001[c] + (1) cpd00012[c] <=> (2) cpd00009[c] + (2) cpd00067[c] (1) H2O[c] + (1) PPi[c] <=> (2) H+[c] + (2) Phosphate[c]    >   =   null    null    null    null    -5.391  1.22474 cpd00067;cpd00001;cpd00009;cpd00012 OK

And in reactions.plantdefault.tsv the status is "OK":

rxn00001    R00004  diphosphate phosphohydrolase    (1) cpd00001[c] + (1) cpd00012[c] <=> (2) cpd00009[c]   -1:cpd00001:c:0:"H2O";-1:cpd00012:c:0:"Diphosphate";2:cpd00009:c:0:"Orthophosphate";1:cpd00067:c:0:"H+" 0   (1) cpd00001[c] + (1) cpd00012[c] <=> (2) cpd00009[c] + (1) cpd00067[c] (1) Diphosphate[c] + (1) H2O[c] <=> (1) H+[c] + (2) Orthophosphate[c]   =   =   null    null    null    null    4.14    1.22    cpd00012;cpd00009;cpd00001;cpd00067 OK

But in reactions.master.tsv the status is "OK|HB":

rxn00001    R00004  diphosphate phosphohydrolase    (1) cpd00001[0] + (1) cpd00012[0] <=> (2) cpd00009[0]   -1:cpd00001:0:0:"H2O";-1:cpd00012:0:0:"PPi";2:cpd00009:0:0:"Phosphate";1:cpd00067:0:0:"H+"  0   (1) cpd00001[0] + (1) cpd00012[0] <=> (2) cpd00009[0] + (1) cpd00067[0] (1) H2O[0] + (1) PPi[0] <=> (2) Phosphate[0] + (1) H+[0]    =   =   null    null    null    null    4.14    1.22    cpd00012;cpd00009;cpd00001;cpd00067 OK|HB

I'm guessing this related to commit 51fb37e but I'm not sure how the updated reactions.master.tsv in the commit was generated.

mmundy42 commented 9 years ago

I'm also seeing some differences in directionality. Looking at rxn39104, in reactions.plantdefault.tsv it is defined as right directional:

rxn39104    rxn1369_c   RXN-8618    (1) cpd00001[c] + (1) cpd23795[c] <=> (1) cpd00012[c] + (1) cpd01062[c] -1:cpd00001:c:0:"H2O";-1:cpd23795:c:0:"(E)-geranyl phosphate";1:cpd00012:c:0:"Diphosphate";1:cpd01062:c:0:"Geraniol"    0   (1) cpd00001[c] + (1) cpd23795[c] => (1) cpd00012[c] + (1) cpd01062[c]  (1) (E)-geranyl phosphate[c] + (1) H2O[c] => (1) Diphosphate[c] + (1) Geraniol[c]   >   >   null    null    null    null    -211.74 0.74    cpd00012;cpd23795;cpd01062;cpd00001

And in the current reactions.master.tsv the equation fields show it as bi-directional:

rxn39104    rxn1369_c   RXN-8618    (1) cpd00001[0] + (1) cpd23795[0] <=> (1) cpd00012[0] + (1) cpd01062[0] -1:cpd00001:0:0:"H2O";-1:cpd23795:0:0:"(E)-geranyl phosphate";1:cpd00012:0:0:"PPi";1:cpd01062:0:0:"Geraniol"    0   (1) cpd00001[0] + (1) cpd23795[0] <=> (1) cpd00012[0] + (1) cpd01062[0] (1) H2O[0] + (1) (E)-geranyl phosphate[0] <=> (1) PPi[0] + (1) Geraniol[0]  >   >   null    null    null    null    -211.74 0.74    cpd00012;cpd23795;cpd01062;cpd00001

And with the new script, it is generated as right directional:

rxn39104    rxn1369_c   RXN-8618    (1) cpd00001[0] + (1) cpd23795[0] <=> (1) cpd00012[0] + (1) cpd01062[0] -1:cpd00001:0:0:"H2O";-1:cpd23795:0:0:"(E)-geranyl phosphate";1:cpd00012:0:0:"PPi";1:cpd01062:0:0:"Geraniol"    0(1) cpd00001[0] + (1) cpd23795[0] => (1) cpd00012[0] + (1) cpd01062[0] (1) H2O[0] + (1) (E)-geranyl phosphate[0] => (1) PPi[0] + (1) Geraniol[0]   >   >   null    null    null    null    -211.74 0.74    cpd00012;cpd23795;cpd01062;cpd00001

Is that just an artifact of the previous script's use of the KBase Biochemistry objects?

samseaver commented 9 years ago

Hi Mike, in the first case, if you run Print_Master_Reactions_List.pl, you have to run Update_Reaction_Status.pl to get the correct status. In other words I'm assuming you haven't taken the second step, are you still seeing differences even after running that?

In the second case, with regards to reaction directionality, I'll have to have a closer look at what's happening.

mmundy42 commented 9 years ago

I updated the README so hopefully I'll remember to run Update_Reaction_Status.pl in the future.

mmundy42 commented 9 years ago

Running the Update_Reaction_Status.pl script resolved the reaction directionality differences. Still tracking down 45 differences in the final reactions.master.tsv when I build with all of the latest compared to the current reactions.master.tsv that is in the repository.

mmundy42 commented 9 years ago

There were three types of differences: (1) reactions where there was an "HB" in the status field of one file but not the other, (2) bi-directional reactions where the products and reactants were flipped, (3) reactions where the compartment indexes were flipped.

I committed updated Print_Master_Reaction_List.pl and Update_Reaction_Status.pl scripts that remove the dependency on KBase and added options for specifying the paths to files.