brsynth / RetroPathRL

Reinforcement Learning based bioretrosynthesis tool
MIT License
48 stars 16 forks source link

Products in reaction nodes #5

Closed meono closed 4 years ago

meono commented 4 years ago

Hi,

I'm looking at some of the pathways generated from retropath rl run. I can see all substrates and their stoichiometry in reaction nodes. Product side isn't as clear. Only one product is linked to the node and that's usually not enough to have a balanced reaction to be used in downstream analysis. Is there a way to get complete reaction definitions or am i missing a point here?

Thanks

bdelepine commented 4 years ago

Hi @meono,

Retrosynthesis trees can be confusing. The reactions nodes you are referring to are not exactly chemical reactions, they are chemical transformations that are conceptually the... well... transformation of strictly one chemical into one or many chemicals. Why the "reaction" name you may ask? Well, because those transformations are generated on the fly by RP using one of the reaction rule you provided and one chemical: RP applies the reaction rule, itself (most probably) derived from an enzymatic reaction, on a chemical. Importantly, reaction rules are used to encode/model some degree of enzymatic promiscuity, so the resulting transformation may be quite different from the original reaction depending on the degree of promiscuity you allowed (the diameter parameter).

So, if you want to get back to the original reaction, and for instance, find back the genes, you should:

  1. identify the reaction rule identifier
  2. find it back into the reaction rule file
  3. identify the original MetaNetX reaction
  4. use your chemical and biological expert knowledge to judge if the transformation is legitimate.

To spice things up, depending on your reaction rule file, you may have used rules that have been generated ignoring the directionality of the original reactions. Why? Well, because this information is difficult to get reliably, so its often more useful to get rid of impossible transformations due to directionality while processing the pathways, i.e. step 4.

HTH

meono commented 4 years ago

Hi @bdelepine

I think I understand what you mean (and I need to keep reminding myself that the process is from target to sink(s)). My goal is to pipe all pathways to downstream analysis and evaluate them for thermodynamics, cofactor use, yields as noted on the paper. We could then look into top results in more detail. Anyway, I'll need to get from transformations to new reactions as you wrote. Maybe this can be a feature request then.

Thanks for the quick response.