Making Computational Workflows FAIR

Recipe Overview
Reading Time
15 minutes
Executable Code
Making Computational Workflows FAIR
FAIRPlus logo
Recipe Type
Maturity Level & Indicator
hover me Tooltip text

Main Objectives

The main purpose of this recipe is:

Provide guidance on resources available to help developers and data scientists make the various workflows used for daily tasks (for extract-load-transform, quality control, deployment or analytical workflow) available in open format and reusable.

Provide guidance for regulatory submissions for nucleic acid sequence analysis using the BioCompute Object (BCO) specification.

Remind the active nature of the field and the fast evolving environment and platforms developed for these tasks.

Provide an example using the Apache Airflow framework to illustrate the process.

Graphical Overview

FAIRification Objectives, Inputs and Outputs





Common Workflow Language (CWL)


text annotation


annotated text

Table of Data Standards

Data Formats





Biocompute Object - IEEE 2791-2020





Apache Airflow

workflow engine


workflow engine


workflow engine

BioCompute Platform

workflow engine

SevenBridges BioCompute App

workflow engine



Main Content

Workflows are ubiquitous in the data science ecosystem. The ability to automate repetitive tasks to build complex pipelines, schedule and distribute tasks to cloud infrastructures have popularized the use of workflow engine and somehow contributing to reducing the risk of errors associated with human operator fatigue. Workflow engines such as Galaxy 2, Snakemake5, Cromwell7, Knime3, Apache Airflow1, and Toil 6 to name a few offerings, have popularized the use of workflows in the field of life science computational applications. This however be can also become a source of difficulty when buying-in in a particular platform and then trying to exchange information with other platforms or migration away from the initial choice. Hence, a community of experts has dedicated efforts to define open specifications for the description of workflows as well as supporting tools, such as converters.

Using an example based on Next Generation Sequencing (NGS) application, the present content will show the reader how to
make workflow more interoperable and reusable thanks to the use of existing, off-the-shelf tools.

1. CWL: Common Workflow Language - A brief overview

  • CWL, short for Common Workflow Language, is an open standard developed by a consortium of experts, including workflow engine developers, data scientists, data analysts and bioinformaticians.

  • CWL specifications are available from:

  • CWL use YAML syntax to describe workflow steps, tools, input, output and parameters.

  • CWL is meant to provide for platform-independent workflow description, meaning that people should ideally describe workflows once to be able to execute them on CWL aware workflow engines.

  • CWL is currently implemented by an increasing number of platforms, which are listed here

  • CWL user guide is available here:

2. Conditional Workflow and the CWL when keyword:

When describing a protocol, it is often desirable to what to do if a specific situation arises. Computational workflows are no different, and it is in fact quite frequent to have the need to define specific sets of steps if a threshold or condition is met. Therefore, the Common Workflow Language contains a dedicated keyword when to represent such situations. The following block shows how it can be used with a example:

class: Workflow
cwlVersion: v1.2
  val: int


      in1: val
      a_new_var: val
    run: foo.cwl
    when: $(inputs.in1 < 1)
    out: [out1]

      in1: val
      a_new_var: val
    run: foo.cwl
    when: $(inputs.a_new_var > 2)
    out: [out1]

    type: string
      - step1/out1
      - step2/out1
    pickValue: first_non_null

  InlineJavascriptRequirement: {}
  MultipleInputFeatureRequirement: {}

3. Semantic Markup of CWL workflows

CWL documents can be annotated with or EDAM vocabulary elements to support findability.

The blocks of code below shows how this is done with 2 examples.

#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool

label: An example tool demonstrating metadata.
doc: Note that this is an example and the metadata is not necessarily consistent.

    coresMin: 4

    type: File
    label: Aligned sequences in BAM format
    format: edam:format_2572
      position: 1

baseCommand: [ wc, -l ]

stdout: output.txt

    type: stdout
    format: edam:format_1964
    label: A text file that contains a line count

  - class: s:Person
    s:name: Denis Yuen

  - class: s:Person
    s:name: Brian O'Connor

s:dateCreated: "2016-12-13"

s:keywords: edam:topic_0091 , edam:topic_0622
s:programmingLanguage: C



4. Publishing Workflows as CWL in

  • Workflows are digital objects which can and should be preserved.

  • A number of repositories exist and may be used to deposit workflows.

  • One may use a generic repository such as Zenodo to do so (see recipe Depositing to generic repositories - Zenodo use case).

  • Preferably, one should use a specialized repository such as, which is presented below.

5. Tools: Apache AIRflow playing with CWL

Apache Airflow is a platform created by the community to programmatically author, schedule and monitor workflows , to quote the project’s site. It has established itself in industry settings and has broad uptake.

Apache Airflow represents workflows as Directed Acyclic Graph (or DAGs) and Airflow allows the serialization of these as JSON documents.

The main thing about Apache Airflow is that code is used to generate the workflows. For more information, refer to this tutorial:

A tool developed by Michael Kotliar, Andrey V Kartashov, Artem Barski brings CWL support to the Apache Airflow framework, meaning that CWL expressed workflow can now be executed on the platform 4.

A key step in this linkage is the conversion of a CWL expressed workflow into an Apache Airflow DAG, which can then be subsequently executed.

With this example, we aim to bring awareness about the value of having platform independent expression of workflows.

6. Biocompute Object format, an IEEE specification suited for use in regulatory applications.

If computational analyses on sequence data are performed in the context of clinical trials, for instance to demonstrate the transcriptomics response to a drug or to show to safety of a compound in populations of distinct genetic background using genotyping information, it is a regulatory requirements of the US FDA to submit the computational workflows if seeking approval. The availability of such information in this context is a prerequisite for FDA auditors to examine the data.

The IEEE 2791-2020 specifications, also known as BCO for BioCompute Object is a specification to do this.

This has been made possible thanks to the fast-track submission of a new data format specifically tailored to ensure reproducibility and unambiguous description of workflow key descriptors.

What are the main features of a BioCompute Object?

  • a BioCompute Object is serialized as a JSON document. A typical BCO looks like this:


  • a BioCompute Object can be packaged as an RO-Crate.


  • a BioCompute Object can be integrated with HL7 FHIR as a Provenance Resource.

  "resourceType": "Provenance",
  "id": "example-biocompute-object",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"\">\n\t\t\t<p>\n\t\t\t\t<b>Generated Narrative with Details</b>\n\t\t\t</p><p>\n\t\t\t\t<b>id</b>: example-biocompute-object</p><p>\n\t\t\t\t<b>target</b>: <a href=\"\">MolecularSequence/example</a>\n\t\t\t</p><p>\n\t\t\t\t<b>period</b>: 2017-6-6 --&gt; (ongoing)</p><p>\n\t\t\t\t<b>recorded</b>: 2016-6-9 8:12:14</p><p>\n\t\t\t\t<b>reason</b>: antiviral resistance detection (Details: [not stated] code null = 'null', stated as\n         'antiviral resistance detection')</p>\n\t\t\t<h3>Agents</h3>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>-</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<b>Role</b>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<b>Who</b>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>*</td>\n\t\t\t\t\t<td>Author (Details: code author = 'Author',\n             stated as 'null')</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<a href=\"\">Practitioner/example</a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<h3>Entities</h3>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>-</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<b>Role</b>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<b>Reference</b>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>*</td>\n\t\t\t\t\t<td>source</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<a href=\"\">Biocompute example</a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>"
  "target": [
      "reference": "MolecularSequence/example"
  "occurredPeriod": {
    "start": "2017-06-06"
  "recorded": "2016-06-09T08:12:14+10:00",
  "activity": {
    "text": "antiviral resistance detection"
  "agent": [
      "type": {
        "coding": [
            "system": "",
            "code": "AUT"
      "who": {
        "reference": "Practitioner/example"
  "entity": [
      "role": "source",
      "what": {
        "identifier": {
          "type": {
            "coding": [
                "system": "",
                "code": "biocompute",
                "display": "obj.1001"
          "value": ""
  • a BioCompute Object may allow referencing a CWL expressed workflow thus increasing interoperability.

Several tools currently support the BCO format:


This recipe focused on highlighting important considerations to bear in mind when dealing with workflows as these digital objects have become essential information carriers to assist data science tasks.

While there is no shortage of tools and frameworks for building, saving, executing workflows, making sure these can be found, interpreted by machine without human intervention and executed are essential aspects of reusability and interoperability.

Data Scientists and Information managers should therefore tap into a number of standardization efforts capable of ensure appropriate provenance tracking and information preservation.

This knowledge could be harnessed to decide whether to trust the results of an analysis or a transformation process, or to decide whether to perform new ones.