The Seven Bridges Knowledge Center

The Seven Bridges Platform is a simple solution for doing bioinformatics at industrial scale. But sometimes, everyone needs a little help.

Get Started    What's new?

Edit a workflow

Workflows are chains of connected tools. You can edit any of the publicly available workflows hosted on the Seven Bridges Platform by changing the way that the tools in them are connected, and modifying the way that they run by setting their parameters.

This can all be carried out in the Seven Bridges Platform Workflow Editor. Additionally, you can use the Seven Bridges Platform Workflow Editor to build a workflow from scratch.

Expose tool parameters for configuration

Exposing a tool parameter makes it configurable when you run the workflow. You can expose parameters of tools in a workflow using the Workflow Editor.

If you are running a tool on its own, not in a workflow, you should expose its parameters by leaving these values empty in the Tool Editor description. For details, see the Seven Bridges Platform documentation on editing a tool.

To expose parameters of a tool in a workflow:

  1. Open your workflow in the Workflow Editor by selecting the workflow from the Apps panel of the project, and clicking Edit.

Copying a public workflow

If the workflow you want to edit is a public workflow, you should first copy it to your project.

The Workflow Editor is shown below:

  1. Click on a tool whose parameters you want to be able to edit with each execution.
  2. Select the panel marked PARAMS on the right hand side of the Workflow Editor.
  1. You will see a list of parameter names, with fields next to them. In the example above, the fields are nogroup, nano, kmers, format, and cassava.
    • By each parameter name is a lock icon . Click the lock icon to expose the parameter. This will make the parameter configurable from the Draft Task page.
    • There is also a slider next to each parameter name. Use the slider to add an input port for the parameter. This allows you to pipe in values for the parameter from another tool in the workflow.
    • To set the parameter value now, so that it cannot be altered at runtime, simply enter the value in the field, as shown.

You can set the value for the parameter using a check box, drop-down list, or free form, depending on what kind of value the parameter takes (a boolean value, a string, etc).

Set the order in which tool inputs are handled

The workflow editor lets you pipe multiple incoming data streams into the same port of a tool. For instance, in the example below the app 'my-app' has one port with ID 'input_1'.

There are two input nodes that feed data into this port: 'Input_1' and 'Input_1_1':

When you have multiple inputs to a single input port, the order in which the data is analyzed might be important. To set this order, click on the info icon for the node to see further information about it. Then click the tab labeled INPUTS.

Next to each input node's name, is an icon with three horizontal lines. Click this to drag and drop the names of the input nodes to match the order in which you want their inputs analyzed.

In the example below, inputs from input node 'Input_1' will be handled before those from 'Input_1_1'.

Order the inputs to a tool.

Order the inputs to a tool.

For the tool to work properly, please make sure that the schema for the tool inputs is set to "File" and not "Array".

Create one job per input using scatter

If you are inputting a list to a node, you can set the tool to iterate through the list and run one job per list element. This is known as "scattering".

Scatter is a "parallel map" or "for-each" construct, since only one input is iterated over while the rest remain fixed. It is the equivalent of "currying" the node with all other inputs, and running a parallel map over the input marked as scatter. Note that this input needs to be a list.

If you instruct a tool to scatter on an n element list, it will perform n jobs, and output an n-element array.

To instruct the tool to scatter over a list:

  1. Select your tool in the Workflow Editor.
  2. Click the info icon on the tool whose inputs you want to scatter. This will bring up an information box for the tool, as shown below.
  3. Select the tab marked Inputs, and you will see the names of the tool's input nodes.
  4. Check the box marked scatter next to a node that takes in lists in order to iterate though its items.

Example

For example, STAR has a single reference file and a single GTF file. However, it has multiple reads files. In this case, you should scatter only on reads, as shown below. Note that you must supply a list of input files on the reads port.

This creates a job for each file in the list of input files. Each output port of STAR becomes a list assembled from the outputs of individual jobs.

Scatter over reads.

Scatter over reads.

Edit a workflow