zakandrewking / escher

Build, share, and embed visualizations of metabolic pathways.
https://escher.github.io
Other
210 stars 78 forks source link

Change direction of reaction #140

Closed jotech closed 5 years ago

jotech commented 8 years ago

The direction of a reaction is somehow arbitrarily defined in the model. (A <-> B vs B <-> A) When loading csv data sometimes model directions do not fit with the data. Would be nice to have an option to change the default direction in escher (instead of changing the model).

zakandrewking commented 8 years ago

Yeah I can see the sense behind that. The direction in the model exists as an implementation detail (you need to be able to specify a positive direction and a negative direction).

Can you be more specific about a case where switching the direction makes sense? this will help me think about solutions.

On Tue, Jan 5, 2016 at 8:20 AM, jo notifications@github.com wrote:

The direction of a reaction is somehow arbitrarily defined in the model. (A <-> B vs B <-> A) When loading csv data sometimes model directions do not fit with the data. Would be nice to have an option to change the default direction in escher (instead of changing the model).

— Reply to this email directly or view it on GitHub https://github.com/zakandrewking/escher/issues/140.

jotech commented 8 years ago

For sure ;) Issue occurred while loading reaction data into central metabolism map using iJO1366 model. Consider the TCA, the default direction of SUCOAS is succ-->succcoa, which is the reductive case. But former reactions like CS, ACONTa/b, ICDHyr and AKGDH are defined according to oxidative case. That's why loaded data can lead to different arrow colors which is correct but attracts the eye to something which is caused only arbitrarily. Same happens in glucolysis. Would be best to define models more consistently but this is not always possible. Desired direction also depends on the pathway you want to depict and is therefore ambiguous.

zakandrewking commented 8 years ago

My approach to this issue has been to turn on Absolute Value for reaction coloring (the 'Abs' checkbox in Settings). Have you tried that? Does that help at all with your case?

On Thu, Jan 7, 2016 at 7:29 AM, jo notifications@github.com wrote:

For sure ;) Issue occurred while loading reaction data into central metabolism map using iJO1366 model. Consider the TCA, the default direction of SUCOAS is succ-->succcoa, which is the reductive case. But former reactions like CS, ACONTa/b, ICDHyr and AKGDH are defined according to oxidative case. That's why loaded data can lead to different arrow colors which is correct but attracts the eye to something which is caused only arbitrarily. Same happens in glucolysis. Would be best to define models more consistently but this is not always possible. Desired direction also depends on the pathway you want to depict and is therefore ambiguous.

— Reply to this email directly or view it on GitHub https://github.com/zakandrewking/escher/issues/140#issuecomment-169695365 .

bdelepine commented 5 years ago

Hi @zakandrewking,

I had some trouble interpreting a flux map and, long story short, it turned out that some reactions from my model where not in the same direction as their counterpart from BiGG which mess some arrow directionality up. I can open another ticket if you prefer.

I thought arrow directionality would be updated to match the data file (negative value displayed in reverse) AND the model file provided (as a reference for what is the "positive" direction, which I assumed to be left-to-right). In the end I believe that the base/default direction of the reaction arrows is always the one from the map file and not the one from the model, that is totally ignored.

Am I right? I can provide tests if you wish so.

The behavior I would like would be either:

zakandrewking commented 5 years ago

@jotech if you're still watching this, the latest beta release of Escher is up now:

https://escher.github.io

Option 2 above is implemented!

the possibility to update the directionality of all reactions from the map based on the ones from the model, just like names and reaction rules

let me know if it's working for you