stelmo / Escher.jl

Visualization of metabolic models in Makie.
MIT License
20 stars 1 forks source link

Reaction directionality #3

Closed jchitpin closed 2 years ago

jchitpin commented 2 years ago

Is it possible to preserve reaction directionality when plotting metabolic models with escherplot!() using arrows! instead of lines!?

stelmo commented 2 years ago

Hi there,

Yes, that is a good idea! I will implement that this weekend :)

stelmo commented 2 years ago

I just added arrows to the plot. Could you test it out and let me know what you think (v0.5.0)? Note, the arrows are not drawn at the tips of the reaction edges, but slightly further down, I think this looks better (and was substantially easier to implement). If the updated package doesn't work, lmk, Makie just released a new version as well, so there is a small chance that things could go wrong...

jchitpin commented 2 years ago

Thanks! I'm new to COBREXA so it will take me a bit to figure out where reaction directionality is stored in the model JSON file. Then I'll close off this issue.

jchitpin commented 2 years ago

I forgot to update to (v0.5.0) at first but can confirm the reaction arrows work and look great trailing behind the metabolite nodes. Manually specifying reversibility with reaction_directions also worked as expected. Thanks again!