Feat alternative generation - #114
Draft
eladrion wants to merge 29 commits into
Draft
Conversation
Translates node status (Keep/Ban/Vary) and edge status (chain/break) into APE constraint objects and assembles the full synthesis config JSON including I/O EDAM tuples, tool taxonomy paths, and generation parameters.
…e initialization Handles CWL file upload via POST /alternatives/parse, builds the ReactFlow graph from the parsed DAG, and initialises all tool nodes to Keep status (§4.3 conservative strategy). Node clicks cycle through Keep/Vary/Ban; edge clicks toggle chain/break constraints.
… modal Shows active Keep/Ban/Chain/Break constraints, APE synthesis parameters (min/max length, timeout, solutions), a generate button with loading state, and a modal to inspect the generated APE config JSON.
…w, and synthesis Shows a drag-and-drop CWL upload zone before a file is loaded, then switches to a ReactFlow graph with a filename pill overlay. Builds the APE synthesis config from the current constraint state and navigates to /explore/results after successful synthesis.
…aStore Accepts a pre-built APE config object and an optional input tool sequence string. After synthesis, filters out any solution whose descriptive_name matches the input workflow's tool sequence to ensure all returned alternatives genuinely differ from the uploaded workflow.
Call GET /ape/alternatives/warm when GenerateAlternatives mounts. Show a full-page spinner while the backend loads the EDAM ontology; show an error state if loading fails. Upload zone renders only after warm-up completes.
EDAM loading is handled transparently by the backend on the first /parse request. No explicit frontend warm-up needed.
APE generates step names from a tool's label, but use_m/not_use_m/connected_op constraints must reference the taxonomy id, which differs for some tools (e.g. mzRecal -> mzrecal1, Sage -> Sage-proteomics, idconvert -> two ids). Add LABEL_TO_TOOL_IDS to map each label to its id(s); unknown labels fall back to the label itself.
Convert runSynthesisWithRawConfig to async/await, retry the synthesis call once on failure (1.5s delay), and include the response body in the error so transient backend issues surface clearly. Add ExploreDataStore tests for the post-filtering of identical tool sequences.
Two-line tool cards with a clipped accent bar for status; compact dashed data nodes for inputs/outputs. Dagre now uses separate dimensions per node type (tool 210x70, data 180x38) for correct automatic layout.
InfoTooltip renders configurable contextual help on the graph canvas, the active-constraints panel, and the APE-settings panel. The Show-JSON modal highlights the generated config without an external dependency. Canvas height now scales with the viewport.
… update the tests accordingly
Frontend functionality for generating workflow alternatives, currently restricted to proteomics
eladrion
marked this pull request as draft
July 3, 2026 10:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Changes
Testing
Checklist