biosustain / shu

Multi-dimensional, trans-omics metabolic maps.
https://biosustain.github.io/shu
Apache License 2.0
41 stars 1 forks source link

Grammar graphics Python API #1

Closed carrascomj closed 1 year ago

carrascomj commented 1 year ago

As in the schema in the README:

(
# reaction and metabolite aes correspond to their identifiers
ggmap(df, map_file, aes(metabolite="metabolite", reaction="reaction", size="flux", x="kcat")) +
    geom_arrow() +  # will use size and reaction
    geom_metabolite(aes(size="concentration")) +  # will use size and metabolite
    geom_box() +  # will use reaction and kcat, boxplot at one right of reactions
    geom_kde(aes(x="km"), side="left") +  # will use reaction and kms, plotted on the other side
    scale_color_continuous(min="blue", max="red") +
    scale_circle_size(min=10., max=45.)
)

As a initial step (if librification of bevy app + pyo3 turns out too complicated), generating an input file as accepted by ReactionData and MetaboliteData should be OK.

carrascomj commented 1 year ago

Implemented in 342c8cd.

Closing this but I'd also like to include an API for Maud (infd format) data.