execute() runs the graph and returns a list with one entry per output node, in
registration order:
results = g.execute() # [output_1, output_2, ...]Execution runs only the steps that each output node depends on. Consequences:
- Shared results are computed once. If a node feeds more than one downstream, its result is reused rather than recomputed.
- Dead branches don't run. A node with no path to an output is never evaluated.
Gather and decision nodes follow the same rule but add their own repetition: running the tool once per item of a collection (:doc:`nodes/gather`) or repeatedly until a condition holds (:doc:`nodes/decision`).
When two incoming edges supply the same key, the later one overwrites the earlier. Two rules follow:
1. Input nodes override tool outputs. A value you set on an input node
overwrites any value an upstream tool produced under the same key. If you pass
input_pdb=... on an input node into a step that also receives a generated
pdb from upstream, your input-node value wins, so set a key only when you mean
to override.
2. Among tool edges, the last edge added wins. Edges are applied in the order they were wired with :func:`~biocomposer.Graph.add_edge`. If two upstream tools emit the same key, the edge added last wins, so when two producers collide on a key, add the edge you want to win last.
Each tool run saves its outputs under results/, so intermediate products are
preserved and inspectable even when they aren't the declared output.
An output declared type = "dir" is returned as the directory path rather than
as a list of the files within it.