Stacks and workflows
A tab is not one function. It is a stack: the function you opened is step 1, and any function can be added below it, on the same records and on what the steps above produced. A result is where the next question starts, not a dead end.
Add a step
At the foot of every tool is Add a step. It lists the functions that can run here, in the same words as the Start board: on the records the tab holds, and on what the steps above published. Pick one and it appears below, already bound, with its own parameters beside its heading and its own share link, recipe and figure. The command palette offers the same as "Add … as a step".
Each step's header says what it reads. Steps move up and down, collapse, and leave with their output; the step above never changes because of one below.
What a step can read
Some functions hand records to the steps below them, so the chain writes itself:
| Step | Publishes | |---|---| | Refit confidence | the called exposures of the sample, as an exposure table (COSMIC v3.2) | | Compare spectra | the focused pair's difference, A over B and B over A, as spectra | | Timing | the spectra before and after the gain | | Tally | attaches the spectra to the record itself, so every step sees them | | Liftover | adds the lifted VCF to the records |
So VCF → Tally → Spectrum → Refit confidence → Map to PCAWG → Explorer → Timing is one scrolling column, and Compare spectra → Refit confidence reads the difference between two tumors as signatures.
Save a stack as a workflow
Save as a workflow… keeps the stack under a name: the functions in order, nothing about your data. The Start board lists it under Workflows beside the built-in ones (Tumor at a glance; From a VCF to signatures; Topography and timing; Review a signature set; Cohort spectra). Running a workflow opens a new tab with every step bound to the selection, where it can be edited, extended and saved again. A saved workflow lives in your browser (sigscape.workflows.v1) and is never sent anywhere.
Sessions
A session keeps each tab's steps, so a reopened session is the same column of results, ready to add to.
For agents
sigscapeStudio.addStep("map-pcawg") adds a step; state().tabs[].steps lists them with what each reads; removeStep(id), saveWorkflow(name), workflows() and run("workflow:<id>") do the rest. In the DOM: [data-studio="stack"], [data-studio="step-frame"][data-step-index][data-tool], [data-studio="stack-add"], [data-studio="workflows"].