{"_id":"56268b3cc2781f0d00364bc0","project":"55faf11ba62ba1170021a9a7","version":{"_id":"55faf11ba62ba1170021a9aa","project":"55faf11ba62ba1170021a9a7","__v":38,"createdAt":"2015-09-17T16:58:03.490Z","releaseDate":"2015-09-17T16:58:03.490Z","categories":["55faf11ca62ba1170021a9ab","55faf8f4d0e22017005b8272","55faf91aa62ba1170021a9b5","55faf929a8a7770d00c2c0bd","55faf932a8a7770d00c2c0bf","55faf94b17b9d00d00969f47","55faf958d0e22017005b8274","55faf95fa8a7770d00c2c0c0","55faf96917b9d00d00969f48","55faf970a8a7770d00c2c0c1","55faf98c825d5f19001fa3a6","55faf99aa62ba1170021a9b8","55faf99fa62ba1170021a9b9","55faf9aa17b9d00d00969f49","55faf9b6a8a7770d00c2c0c3","55faf9bda62ba1170021a9ba","5604570090ee490d00440551","5637e8b2fbe1c50d008cb078","5649bb624fa1460d00780add","5671974d1b6b730d008b4823","5671979d60c8e70d006c9760","568e8eef70ca1f0d0035808e","56d0a2081ecc471500f1795e","56d4a0adde40c70b00823ea3","56d96b03dd90610b00270849","56fbb83d8f21c817002af880","573c811bee2b3b2200422be1","576bc92afb62dd20001cda85","5771811e27a5c20e00030dcd","5785191af3a10c0e009b75b0","57bdf84d5d48411900cd8dc0","57ff5c5dc135231700aed806","5804caf792398f0f00e77521","58458b4fba4f1c0f009692bb","586d3c287c6b5b2300c05055","58ef66d88646742f009a0216","58f5d52d7891630f00fe4e77","59a555bccdbd85001bfb1442"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"5613e4f8fdd08f2b00437620","__v":26,"category":{"_id":"55faf958d0e22017005b8274","__v":8,"pages":["56268b3cc2781f0d00364bc0","5637bfa84dbdd919001b277d","5637e6fe97666c0d008656b6","5637e74acfaa870d00cdeb7a","5637e764f7e3990d007b2c52","5640baf604c3eb0d006fc43c","56cccb6894c8f00b00b83f24","56ddf68dba70f50e0033c6df"],"project":"55faf11ba62ba1170021a9a7","version":"55faf11ba62ba1170021a9aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-17T17:33:12.687Z","from_sync":false,"order":14,"slug":"bring-your-tools","title":"BRING YOUR TOOLS"},"parentDoc":null,"updates":["5649ed773242592b00338a01","56697ef607625117002c27da"],"next":{"pages":[],"description":""},"createdAt":"2015-10-20T18:43:08.748Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"You can put tools that you have developed yourself onto the CGC, for on demand access to elastic computational resources and large data repositories like TCGA. \n\nThe CGC Software Development Kit (SDK) is called Rabix. It allows you to wrap your tools so that they can be executed on the CGC. This is done in a way that renders the tools fully portable, by first installing them inside Docker containers and then describing their behavior in accordance with the Common Workflow Language.\n\nThis means that there is no need to reconfigure your existing command line tools to meet any proprietary format, or write a wrapper for them. Additionally, the tools remain runnable across a diverse range of infrastructures should you want to use them on different platforms.\n\n##DOCKER\nYou can use [Docker](doc:docker-basics) to build and run Docker containers containing your tools, along with their dependencies. Then, you can push snapshots of these containers, called images, to the [CGC Image Registry](doc:the-cgc-image-registry), which is housed on our computational platform, or to Docker hub – Docker's own image registry. The tools you have installed will be run inside the containers on the CGC.\n\n##The Tool Editor\nHaving uploaded a Docker image containing your tool to the image registry, you can specify its behavior, including its inputs and outputs, runtime requirements, and execution semantics. The specification is entered using the [Tool Editor](doc:the-tool-editor). It allows the tool to be used on the CGC to interface with other arbitrary tools.\n\n## The Common Workflow Language\nTool specifications entered using the [Tool Editor](doc:the-tool-editor) are automatically transcribed into the Common Workflow Language (CWL). This is a community developed, open specification for reproducible data analyses or workflows which, once described using CWL, can be executed locally or in high performance cloud or cluster environments with the help of CWL-conformant execution engines. Learn more about CWL from its [official website](http://www.commonwl.org/).\n\nTo [develop and test CWL apps locally on your desktop before deploying on the CGC](https://github.com/rabix/composer/wiki/Tutorial-on-editing-and-testing-platform-apps-locally), use the [Rabix tolkit](http://rabix.io/). Develop apps locally for faster results, as you do not have to acquire an available cloud instance each time you want to test the workflow.\n\nTo get your first hands-on experience with CWL, please read [A Gentle Introduction to the Common Workflow Language](http://www.commonwl.org/v1.0/UserGuide.html#A_Gentle_Introduction_to_the_Common_Workflow_Language) which will take you from writing your first simple tool using CWL, to creating a workflow that contains several different interconnected steps. By reading this guide, you should be able to understand how each of the CWL tasks is isolated and that there is an explicit definition of its inputs and outputs. It is the explicitness and isolation that allow tools and workflows described with CWL to be **flexible**, **portable** across different CWL implementations and CWL-compliant execution engines and **scalable** from simple local execution to large-scale complex execution environments.\n\n### CWL implementation on the CGC\nThe CGC supports the following two versions of CWL:\n* [sbg:draft-2](#section-sbg-draft-2)\n* [v1.0](#section-cwl-v1-0)\n\n### sbg:draft-2\n**sbg:draft-2** is the first implementation of CWL on the CGC. This is essentially the **Draft 2** version of the Common Workflow Language, with the addition of several extensions specific to the Seven Bridges execution environment. The extensions were implemented to add the required features that are were not natively supported in the **Draft 2** specification of CWL but do present a common use case in bioinformatics analyses.\n\nThe following optional features (extensions) were implemented in **sbg:draft-2**:\n* **Resource hints** - Define the minimum number of CPU cores and megabytes of RAM required for execution of an app.\n* **Stage input** - Make inputs available in the tool's working directory.\n* **File metadata** - Set metadata values for files produced as outputs of an app.\n\nAll currently available public apps on the CGC are described in accordance with the **sbg:draft-2** CWL specification. Also, all apps that are created using the Tool Editor on the CGC are described using the same CWL version. Such apps can be executed in **any execution environment that supports the Seven Bridges extensions**, such as those using the [Rabix Executor](http://rabix.io), but are not guaranteed to execute successfully otherwise.\n\n**Note that all your existing tools and workflows will continue to work on the CGC just as they did before and will continue to be supported in the future.**\n\n### CWL v1.0\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Heads up! We currently offer an alpha implementation of CWL v1.0 on the CGC as there is still some work being done on full v1.0 conformance and stability.\"\n}\n[/block]\n**CWL v1.0** is the latest version of CWL and is widely accepted by the CWL community. Since the **CWL v1.0** specification natively supports the custom extensions in the **sbg:draft-2** CWL version, **CWL v1.0** apps are also portable and executable in any other execution environment when using CWL v1.0-conformant executors such as the [Rabix Executor](http://www.rabix.io) from Seven Bridges.\n\nWhen compared to custom extensions in **sbg:draft-2** which are listed above, these extensions are dealt with in **CWL v1.0** in the following way:\n\n* **Resource hints** - Are an integral part of the **CWL v1.0** specification (http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement) and allow you to specify the basic hardware resource requirements. At the moment, supported requirements are number of CPU cores and megabytes of RAM required for execution of an app.\n* **Stage input**  - Implemented as [InitialWorkDirRequirement](http://www.commonwl.org/v1.0/CommandLineTool.html#InitialWorkDirRequirement). Solves the use case that used to be handled by the [Stage Input](doc:tool-input-ports#section-stage-input) extension in **sbg:draft-2**. The following example illustrates how the use of Stage Input in **sbg:draft-2** and **InitialWorkDirRequirement** in **CWL v1.0**.\n\n**sbg:draft-2**:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"id: input\\ntype:\\n  type: array\\n  items: File\\nsbg:stageInput: link\",\n      \"language\": \"yaml\"\n    }\n  ]\n}\n[/block]\n**CWL v1.0**:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"inputs:\\n  input:\\n    type:\\n      type: array\\n      items: File\\n\\nrequirements:\\n  - class: InlineJavascriptRequirement\\n  - class: InitialWorkDirRequirement:\\n    listing:\\n      - $(inputs.input)\",\n      \"language\": \"yaml\"\n    }\n  ]\n}\n[/block]\nThe CGC provides support for the execution of **CWL v1.0** apps. Apps described using this CWL version can be added to a project on the CGC through the API, [using raw CWL](doc:add-an-app-using-raw-cwl) or by using the [Rabix Composer](http://rabix.io). Here is an example on using the Seven Bridges Python library to [upload a CWL JSON app through the API](https://github.com/sbg/okAPI/blob/master/Recipes/SBPLAT/apps_installFromJSON.ipynb).\n\nOnce uploaded, the app appears within your project, and you can execute it like a **sbg:draft-2** app. However, editing of **CWL v1.0** apps is not currently available on the CGC. Full editing capabilities for both **CWL v1.0** and **sbg:draft-2** apps through the visual interface are implemented in the [Rabix Composer](http://www.rabix.io).\n\n### Before uploading a CWL v1.0 app to the CGC\nThere are several things to take into account before uploading your CWL v1.0 app to the CGC:\n* [Document preprocessing](http://www.commonwl.org/v1.0/CommandLineTool.html#Document_preprocessing) is not supported. Code from included external files will not be resolved within the supplied CWL document.\n* [Directories](http://www.commonwl.org/v1.0/CommandLineTool.html#Directory) are not available as an input type for an app.\n* Instance selection is done based on CPU and memory requirements. Storage space requirements are not taken into consideration when selecting computation instance(s) for a task.\n* File formats are not resolved based on ontology.\n\nTo upload and execute your app successfully, you may need to check and modify your CWL files in accordance with the items listed above.\n\n### Mixed CWL v1.0 and sbg:draft-2 apps\nThe CGC also supports the execution of workflows containing tools described using **CWL v1.0** and tools described using **sbg:draft-2**. Such workflows are either be **CWL v1.0** workflows that contain **sbg:draft-2** tool(s) or **sbg:draft-2** workflows that contain **CWL v1.0** tool(s). These workflows are currently not editable on the CGC, but can be executed. The [Rabix Composer](http://www.rabix.io) provides full editing capabilities for the combined workflow types mentioned above.\n\n### Key differences between sbg:draft-2 and CWL v1.0 on the CGC\nSee the table below for an overview of the currently available options for the two CWL versions on the CGC:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Option\",\n    \"h-1\": \"sbg:draft-2\",\n    \"h-2\": \"CWL v1.0\",\n    \"h-3\": \"Mixed sbg:draft-2 and CWL v1.0\",\n    \"0-0\": \"Can be executed on the CGC\",\n    \"1-0\": \"Editable on the CGC\",\n    \"2-0\": \"Fully portable to other execution environments\",\n    \"3-0\": \"Can be added to the CGC through the API\",\n    \"4-0\": \"Can be added to the CGC through the visual interface\",\n    \"5-0\": \"Can be added to the CGC via [Rabix Composer](http://www.rabix.io)\",\n    \"6-0\": \"Can be edited in [Rabix Composer](http://www.rabix.io)\",\n    \"1-2\": \"<img src=\\\"/img/emojis/no-entry-sign.png\\\" alt=\\\":no-entry-sign+:\\\" title=\\\":no-entry-sign:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"1-3\": \"<img src=\\\"/img/emojis/no-entry-sign.png\\\" alt=\\\":no-entry-sign+:\\\" title=\\\":no-entry-sign:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"2-1\": \"<img src=\\\"/img/emojis/no-entry-sign.png\\\" alt=\\\":no-entry-sign+:\\\" title=\\\":no-entry-sign:\\\" class=\\\"emoji\\\" align=\\\"middle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"2-3\": \"<img src=\\\"/img/emojis/no-entry-sign.png\\\" alt=\\\":no-entry-sign+:\\\" title=\\\":no-entry-sign:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"4-2\": \"<img src=\\\"/img/emojis/no-entry-sign.png\\\" alt=\\\":no-entry-sign+:\\\" title=\\\":no-entry-sign:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"4-3\": \"<img src=\\\"/img/emojis/no-entry-sign.png\\\" alt=\\\":no-entry-sign+:\\\" title=\\\":no-entry-sign:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"0-1\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"center\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"0-2\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"0-3\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"1-1\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"2-2\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"3-1\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"3-2\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"3-3\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"4-1\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"5-2\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"5-1\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"5-3\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"6-3\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"6-2\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\",\n    \"6-1\": \"<img src=\\\"/img/emojis/white-check-mark.png\\\" alt=\\\":white-check-mark+:\\\" title=\\\":white-check-mark:\\\" class=\\\"emoji\\\" align=\\\"absmiddle\\\" height=\\\"20\\\" width=\\\"20\\\" style=\\\"margin: auto 50%;\\\">\"\n  },\n  \"cols\": 4,\n  \"rows\": 7\n}\n[/block]","excerpt":"Wrap and run tools with Rabix","slug":"sdk-overview","type":"basic","title":"Rabix Overview"}

Rabix Overview

Wrap and run tools with Rabix

You can put tools that you have developed yourself onto the CGC, for on demand access to elastic computational resources and large data repositories like TCGA. The CGC Software Development Kit (SDK) is called Rabix. It allows you to wrap your tools so that they can be executed on the CGC. This is done in a way that renders the tools fully portable, by first installing them inside Docker containers and then describing their behavior in accordance with the Common Workflow Language. This means that there is no need to reconfigure your existing command line tools to meet any proprietary format, or write a wrapper for them. Additionally, the tools remain runnable across a diverse range of infrastructures should you want to use them on different platforms. ##DOCKER You can use [Docker](doc:docker-basics) to build and run Docker containers containing your tools, along with their dependencies. Then, you can push snapshots of these containers, called images, to the [CGC Image Registry](doc:the-cgc-image-registry), which is housed on our computational platform, or to Docker hub – Docker's own image registry. The tools you have installed will be run inside the containers on the CGC. ##The Tool Editor Having uploaded a Docker image containing your tool to the image registry, you can specify its behavior, including its inputs and outputs, runtime requirements, and execution semantics. The specification is entered using the [Tool Editor](doc:the-tool-editor). It allows the tool to be used on the CGC to interface with other arbitrary tools. ## The Common Workflow Language Tool specifications entered using the [Tool Editor](doc:the-tool-editor) are automatically transcribed into the Common Workflow Language (CWL). This is a community developed, open specification for reproducible data analyses or workflows which, once described using CWL, can be executed locally or in high performance cloud or cluster environments with the help of CWL-conformant execution engines. Learn more about CWL from its [official website](http://www.commonwl.org/). To [develop and test CWL apps locally on your desktop before deploying on the CGC](https://github.com/rabix/composer/wiki/Tutorial-on-editing-and-testing-platform-apps-locally), use the [Rabix tolkit](http://rabix.io/). Develop apps locally for faster results, as you do not have to acquire an available cloud instance each time you want to test the workflow. To get your first hands-on experience with CWL, please read [A Gentle Introduction to the Common Workflow Language](http://www.commonwl.org/v1.0/UserGuide.html#A_Gentle_Introduction_to_the_Common_Workflow_Language) which will take you from writing your first simple tool using CWL, to creating a workflow that contains several different interconnected steps. By reading this guide, you should be able to understand how each of the CWL tasks is isolated and that there is an explicit definition of its inputs and outputs. It is the explicitness and isolation that allow tools and workflows described with CWL to be **flexible**, **portable** across different CWL implementations and CWL-compliant execution engines and **scalable** from simple local execution to large-scale complex execution environments. ### CWL implementation on the CGC The CGC supports the following two versions of CWL: * [sbg:draft-2](#section-sbg-draft-2) * [v1.0](#section-cwl-v1-0) ### sbg:draft-2 **sbg:draft-2** is the first implementation of CWL on the CGC. This is essentially the **Draft 2** version of the Common Workflow Language, with the addition of several extensions specific to the Seven Bridges execution environment. The extensions were implemented to add the required features that are were not natively supported in the **Draft 2** specification of CWL but do present a common use case in bioinformatics analyses. The following optional features (extensions) were implemented in **sbg:draft-2**: * **Resource hints** - Define the minimum number of CPU cores and megabytes of RAM required for execution of an app. * **Stage input** - Make inputs available in the tool's working directory. * **File metadata** - Set metadata values for files produced as outputs of an app. All currently available public apps on the CGC are described in accordance with the **sbg:draft-2** CWL specification. Also, all apps that are created using the Tool Editor on the CGC are described using the same CWL version. Such apps can be executed in **any execution environment that supports the Seven Bridges extensions**, such as those using the [Rabix Executor](http://rabix.io), but are not guaranteed to execute successfully otherwise. **Note that all your existing tools and workflows will continue to work on the CGC just as they did before and will continue to be supported in the future.** ### CWL v1.0 [block:callout] { "type": "info", "body": "Heads up! We currently offer an alpha implementation of CWL v1.0 on the CGC as there is still some work being done on full v1.0 conformance and stability." } [/block] **CWL v1.0** is the latest version of CWL and is widely accepted by the CWL community. Since the **CWL v1.0** specification natively supports the custom extensions in the **sbg:draft-2** CWL version, **CWL v1.0** apps are also portable and executable in any other execution environment when using CWL v1.0-conformant executors such as the [Rabix Executor](http://www.rabix.io) from Seven Bridges. When compared to custom extensions in **sbg:draft-2** which are listed above, these extensions are dealt with in **CWL v1.0** in the following way: * **Resource hints** - Are an integral part of the **CWL v1.0** specification (http://www.commonwl.org/v1.0/CommandLineTool.html#ResourceRequirement) and allow you to specify the basic hardware resource requirements. At the moment, supported requirements are number of CPU cores and megabytes of RAM required for execution of an app. * **Stage input** - Implemented as [InitialWorkDirRequirement](http://www.commonwl.org/v1.0/CommandLineTool.html#InitialWorkDirRequirement). Solves the use case that used to be handled by the [Stage Input](doc:tool-input-ports#section-stage-input) extension in **sbg:draft-2**. The following example illustrates how the use of Stage Input in **sbg:draft-2** and **InitialWorkDirRequirement** in **CWL v1.0**. **sbg:draft-2**: [block:code] { "codes": [ { "code": "id: input\ntype:\n type: array\n items: File\nsbg:stageInput: link", "language": "yaml" } ] } [/block] **CWL v1.0**: [block:code] { "codes": [ { "code": "inputs:\n input:\n type:\n type: array\n items: File\n\nrequirements:\n - class: InlineJavascriptRequirement\n - class: InitialWorkDirRequirement:\n listing:\n - $(inputs.input)", "language": "yaml" } ] } [/block] The CGC provides support for the execution of **CWL v1.0** apps. Apps described using this CWL version can be added to a project on the CGC through the API, [using raw CWL](doc:add-an-app-using-raw-cwl) or by using the [Rabix Composer](http://rabix.io). Here is an example on using the Seven Bridges Python library to [upload a CWL JSON app through the API](https://github.com/sbg/okAPI/blob/master/Recipes/SBPLAT/apps_installFromJSON.ipynb). Once uploaded, the app appears within your project, and you can execute it like a **sbg:draft-2** app. However, editing of **CWL v1.0** apps is not currently available on the CGC. Full editing capabilities for both **CWL v1.0** and **sbg:draft-2** apps through the visual interface are implemented in the [Rabix Composer](http://www.rabix.io). ### Before uploading a CWL v1.0 app to the CGC There are several things to take into account before uploading your CWL v1.0 app to the CGC: * [Document preprocessing](http://www.commonwl.org/v1.0/CommandLineTool.html#Document_preprocessing) is not supported. Code from included external files will not be resolved within the supplied CWL document. * [Directories](http://www.commonwl.org/v1.0/CommandLineTool.html#Directory) are not available as an input type for an app. * Instance selection is done based on CPU and memory requirements. Storage space requirements are not taken into consideration when selecting computation instance(s) for a task. * File formats are not resolved based on ontology. To upload and execute your app successfully, you may need to check and modify your CWL files in accordance with the items listed above. ### Mixed CWL v1.0 and sbg:draft-2 apps The CGC also supports the execution of workflows containing tools described using **CWL v1.0** and tools described using **sbg:draft-2**. Such workflows are either be **CWL v1.0** workflows that contain **sbg:draft-2** tool(s) or **sbg:draft-2** workflows that contain **CWL v1.0** tool(s). These workflows are currently not editable on the CGC, but can be executed. The [Rabix Composer](http://www.rabix.io) provides full editing capabilities for the combined workflow types mentioned above. ### Key differences between sbg:draft-2 and CWL v1.0 on the CGC See the table below for an overview of the currently available options for the two CWL versions on the CGC: [block:parameters] { "data": { "h-0": "Option", "h-1": "sbg:draft-2", "h-2": "CWL v1.0", "h-3": "Mixed sbg:draft-2 and CWL v1.0", "0-0": "Can be executed on the CGC", "1-0": "Editable on the CGC", "2-0": "Fully portable to other execution environments", "3-0": "Can be added to the CGC through the API", "4-0": "Can be added to the CGC through the visual interface", "5-0": "Can be added to the CGC via [Rabix Composer](http://www.rabix.io)", "6-0": "Can be edited in [Rabix Composer](http://www.rabix.io)", "1-2": "<img src=\"/img/emojis/no-entry-sign.png\" alt=\":no-entry-sign+:\" title=\":no-entry-sign:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "1-3": "<img src=\"/img/emojis/no-entry-sign.png\" alt=\":no-entry-sign+:\" title=\":no-entry-sign:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "2-1": "<img src=\"/img/emojis/no-entry-sign.png\" alt=\":no-entry-sign+:\" title=\":no-entry-sign:\" class=\"emoji\" align=\"middle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "2-3": "<img src=\"/img/emojis/no-entry-sign.png\" alt=\":no-entry-sign+:\" title=\":no-entry-sign:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "4-2": "<img src=\"/img/emojis/no-entry-sign.png\" alt=\":no-entry-sign+:\" title=\":no-entry-sign:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "4-3": "<img src=\"/img/emojis/no-entry-sign.png\" alt=\":no-entry-sign+:\" title=\":no-entry-sign:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "0-1": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"center\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "0-2": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "0-3": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "1-1": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "2-2": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "3-1": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "3-2": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "3-3": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "4-1": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "5-2": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "5-1": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "5-3": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "6-3": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "6-2": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">", "6-1": "<img src=\"/img/emojis/white-check-mark.png\" alt=\":white-check-mark+:\" title=\":white-check-mark:\" class=\"emoji\" align=\"absmiddle\" height=\"20\" width=\"20\" style=\"margin: auto 50%;\">" }, "cols": 4, "rows": 7 } [/block]