Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple export of results in JSON (orig: Should we have a function that exports fluxes in a dict for visualization in Escher?) #397

Closed
stelmo opened this issue Jul 27, 2021 · 4 comments · May be fixed by JuliaIO/JSON.jl#326

Comments

@stelmo
Copy link
Collaborator

stelmo commented Jul 27, 2021

I think Escher is used a lot for quickly visualizing a metabolic network (? is this true, in my experience yes, but who knows in general...). Should we export a convenience function that replaces this:

using JSON

open("fluxes.json", "w") do io
    JSON.print(op, sol)
end

with this:

write_fluxes(sol, "fluxes.json")

?

@stelmo stelmo added the feature New feature/functionality label Jul 27, 2021
@exaexa
Copy link
Collaborator

exaexa commented Jul 27, 2021

What should the output look like? If it's complicated, the solution should be in a separate package, if not (looks like a oneliner) there's no point in wrapping it.

@stelmo
Copy link
Collaborator Author

stelmo commented Jul 27, 2021

the output is literally a dictionary that looks like this:

{"PACOAT":4.6450163980355336e-12,"Zn2tex":0.00017049999996743281,"GUI1":0.0,"DXYLK":-0.0,"FE3DCITtonex":2.3365114205877606e-11,"METSOXR1":1.4097176498459716e-12,"FACOAL180t2pp":2.6335029857180776e-11,"CBL1tonex":-0.0,...

This would literally just be a convenience thing, since I often write out those 3 lines of code :)

@exaexa
Copy link
Collaborator

exaexa commented Jul 27, 2021

This is better implemented in JSON package, they should have printfile. Can you add it there?

@exaexa exaexa changed the title Should we have a function that exports fluxes in a dict for visualization in Escher? Simple export of results in JSON (orig: Should we have a function that exports fluxes in a dict for visualization in Escher?) Jul 28, 2021
@exaexa exaexa removed the feature New feature/functionality label Aug 2, 2021
@exaexa
Copy link
Collaborator

exaexa commented Aug 4, 2021

This is gonna get fixed elsewhere, closing for now.

@exaexa exaexa closed this as completed Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants