Reaction rules can only be built in the graphics editor: no textual route, and the BNGL column is read-only for rules

Aperta
#2,068 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java
Ambito
frontend

Direzione di ricerca

Start at BioModelEditorReactionTableModel.isCellEditable, where the COLUMN_EQUATION branch is gated on process instanceof ReactionStep, and read the commented-out alternative sitting directly below it. Then inspect ReactionRuleEditorPropertiesPanel and its anonymous ReactionRuleEditorPropertiesPanel$1 component to see how patterns are painted and how reactant/product consistency is enforced today. Note the issue explicitly asks for a design pass before code — autocomplete-backed BNGL entry, a structured text editor, or a round-tripping form — so 'done' first means a decided approach plus a reference to how Molecules/Species/Observables already expose writable BNGL columns and the 7.7 tutorial text describing them.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Java-based To Discuss To Refine Type: enhancement User Interface

The problem

A rule-based model cannot be built in VCell without the graphics editor. That makes rule-based modelling the one part of the client that is unreachable from a script, from a test, or from anyone who would rather type than draw — and it is not a small gap, since reaction rules are the whole point of a rule-based model.

Two separate things close the door, and both are worth stating because either one alone would be enough:

1. The BioNetGen definition column is read-only for rules. BioModelEditorReactionTableModel.isCellEditable allows the equation/BNGL column only when the row is a ReactionStep:

if (column == COLUMN_EQUATION) {
    if(process instanceof ReactionStep) {
        return true;
    } else {
        return false;
    }
}

A ReactionRule is not a ReactionStep, so the cell is never editable — not even on first specification, which is the rule for every other table. Directly below this method sits a commented-out version that was reaching for exactly this: it would have allowed the edit while the rule's molecules had no components. So the idea has been here before.

2. The rule editor exposes nothing to address. Its entire reactant/product pattern area is a single anonymous component:

ReactionRuleEditorPropertiesPanel$1   777x200 px   children = 0

Every molecule, site, state and bond is painted onto that one component. The only real Swing controls in the panel are Add Reactant, Add Product, Reversible and three display toggles — so pressing New Rule gives you an empty rule and no way to fill it in except by right-clicking painted pixels.

Notably, Molecules, Species and Observables do not have this problem. Their BioNetGen definition columns are writable, and the 7.7 tutorial says so itself: "Every table has a column BioNetGen definition… It is useful if you have separate BNGL code you want to paste, but do not want to import for some reason." Setting one cell to EGFR(ecd,tmd,Y1~u~p,Y2~u~p) replaces about a dozen right-click gestures. Only rules are missing.

What this blocks today

While scripting the two rule-based tutorials (#2067) both models had to be built by writing BNGL to a file and using File > Import, because there is no other way in. That works — both reproduce their public reference models exactly — but it means:

  • the tutorials cannot be scripted the way they are taught;
  • there is no way to make a small edit to one rule without the graphics editor;
  • rule-based models are effectively untestable through the UI.

The obvious fix, and why it is not sufficient on its own

Making the BioNetGen definition column writable for ReactionRule is a small change and would unblock all of the above. But raw BNGL is a poor primary interface for the people this feature is for:

  • it needs autocomplete over the molecule patterns actually available in the model, or the user is typing identifiers from memory;
  • site states, bonds, and bound / unbound / "bound to anything" (!+, !?, unbound) have to be applied consistently across reactant and product patterns — the editor currently enforces that by construction, and greys out combinations that are impossible;
  • an expert can get it right, but the syntax is technical and unintuitive for a new user, which is precisely who the graphics editor serves well.

So this should not land as "make the cell editable" and stop there. That would create a second way to build a rule that is easy to get subtly wrong and hard to diagnose.

What is actually wanted

A more accessible textual (or hybrid) route to specifying a rule, with the consistency the graphics editor currently guarantees. There are a few plausible shapes for it and picking between them deserves a proper design pass rather than a first guess — autocomplete-backed BNGL entry, a structured non-graphical editor, a text form that round-trips against the existing editor, or some combination.

Out of scope for #2067; opening this to record the finding and the constraints.

/cc for design discussion — this one needs a plan before any code.

Lingua principale
Java
Stelle
140
Fork
35
Merge medio
22h 6m
PR unite (30g)
14

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di virtualcell/vcell

Tutte le issue di virtualcell/vcell

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.