To find the bug that made some metabolites weirdly placed, I refactored and simplified some of the code. I think the x positioning did some weird things when rehitting metabolites, but works now. It seems to also be an issue when there isn't flux between species. To simplify this, I moved some logic around in the get_x_pos function. I also moved the entire group of functions to its own file. I think if we keep d3flux together, escher (if we get back there), and alluvial plots all confined to their own files, it should be easy to navigate moving forward.
I didn't simplify the "color" function or y positioning. The logic is a little hard to follow, but seems to work as intended.
I also removed the flux files and syn model file, since they are not needed any longer.
To find the bug that made some metabolites weirdly placed, I refactored and simplified some of the code. I think the x positioning did some weird things when rehitting metabolites, but works now. It seems to also be an issue when there isn't flux between species. To simplify this, I moved some logic around in the get_x_pos function. I also moved the entire group of functions to its own file. I think if we keep d3flux together, escher (if we get back there), and alluvial plots all confined to their own files, it should be easy to navigate moving forward.
I didn't simplify the "color" function or y positioning. The logic is a little hard to follow, but seems to work as intended.
I also removed the flux files and syn model file, since they are not needed any longer.