Skip to content

Add BNGL network visualization for rule-based biomodels#76

Merged
androemeda merged 3 commits into
mainfrom
feat/bngl-visualization
Jul 15, 2026
Merged

Add BNGL network visualization for rule-based biomodels#76
androemeda merged 3 commits into
mainfrom
feat/bngl-visualization

Conversation

@androemeda

Copy link
Copy Markdown
Collaborator

Summary

Adds a BNGL (BioNetGen Language) network diagram to the biomodel detail page for rule-based models.

  • Backend: new GET /biomodel/{id}/biomodel.bngl endpoint. Fetches the BNGL file with retry logic
    (mirroring the existing VCML/SBML endpoints), and returns empty data when there's nothing meaningful
    to visualize — model isn't rule-based (404), content is empty/minimal, or the molecule types block
    is missing or empty. Genuine upstream failures now surface as a 500, consistent with sibling endpoints.
  • Frontend: new BnglVisualizerSection component, rendered in the Overview tab of the biomodel
    detail page (/search/[bmid]). Fetches the BNGL data and renders it via a bundled visualization
    toolkit (public/bnglviz/) inside a sandboxed iframe. The section stays hidden for models with no meaningful bngl content — no visual change on models without one.

@jcschaff jcschaff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, but please adjust the retry logic for vcell api to only retry once upon failure.

@androemeda
androemeda merged commit ee42309 into main Jul 15, 2026
1 check passed
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 this pull request may close these issues.

2 participants