{"_id":"5cbf28f77a1ae4025cb3e450","project":"55faf11ba62ba1170021a9a7","version":{"_id":"55faf11ba62ba1170021a9aa","project":"55faf11ba62ba1170021a9a7","__v":45,"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","5a2a81f688574d001e9934f5","5b080c8d7833b20003ddbb6f","5c222bed4bc358002f21459a","5c22412594a2a5005cc9e919","5c41ae1c33592700190a291e","5c8a525e2ba7b2003f9b153c","5cbf14d58c79c700ef2b502e"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"5cbf14d58c79c700ef2b502e","project":"55faf11ba62ba1170021a9a7","version":"55faf11ba62ba1170021a9aa","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2019-04-23T13:36:21.375Z","from_sync":false,"order":33,"slug":"edit-an-app-1","title":"EDIT AN APP"},"user":"5767bc73bb15f40e00a28777","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-23T15:02:15.819Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"This tutorial will walk you through building **RNA-seq Alignment - STAR**, a workflow that aligns RNA-seq reads to a reference and outputs aligned reads, non-aligned reads, and the program log.\n\n## Objective\nOn this page we'll build a workflow using the CGC's publicly available tools via the [workflow editor](doc:about-the-workflow-editor). We will build RNA-seq Alignment - STAR, a workflow that aligns RNA-seq reads to a reference and outputs aligned reads, non-aligned reads, and the program log. We encourage you to consult the [manual for the STAR aligner](https://github.com/alexdobin/STAR) to see the required input files for each tool.\n\n## Prerequisites\nThe tools we will use to build the RNA-Seq Alignment STAR workflow are available as public apps on the CGC. The process of adding the tools to the workflow will be explained in this tutorial. If you are new to the workflow editor, you might want to read the [workflow editor basics](doc:about-the-workflow-editor) before starting to create your first workflow.\n\n## Procedure\nFirst, we'll select a project to contain our new workflow. Then, we will create a workflow and add the required tools. Lastly, we'll set app parameters and instance settings and then save the workflow.\n\n## Choose a project\n1. Click **Projects** in the top navigation bar.\n2. Click the project in which you wish to add the new workflow.\n\nThe project dashboard is displayed. The next step is to create the new workflow.\n\n## Create a new workflow\n1. Click the **Apps** tab in the project dashboard. The **Apps** page is displayed.\n2. Click **+Add app**. The window for adding an app is displayed.\n3. Click the **Create New App** tab.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0883697-build_a_workflow_tutorial_2.png\",\n        \"build_a_workflow_tutorial_2.png\",\n        559,\n        350,\n        \"#eff1f2\"\n      ]\n    }\n  ]\n}\n[/block]\n4. Click **Create a Workflow**. The window for naming your workflow is displayed.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7337a35-cgc_build_a_workflow_tutorial_3.png\",\n        \"cgc_build_a_workflow_tutorial_3.png\",\n        626,\n        581,\n        \"#e1e8e8\"\n      ]\n    }\n  ]\n}\n[/block]\n5. Name your workflow **RNA-seq Alignment - STAR**.\n6. In the** CWL version** dropdown select **v1.0**.\n7. Click **Create**. The workflow editor is displayed.\n\nThe next step is to add tools to the workflow.\n\n## Add tools to the workflow\nWe will now add two tools to the workflow. These are are **STAR** and **STAR Genome Generate** which creates genome files required by the STAR tool.\n\n1. Select the **Public Apps** tab in the pane on the left.\n2. Type **star** in the search box.\n3. Drag and drop the **STAR** tool onto the canvas.\n4. Now, repeat these steps to find and add the **STAR Genome Generate** tool.\n\nThe next step is to connect the two apps.\n\n## Connect the apps\nThe nodes that are displayed on the workflow canvas represent apps. Hovering over a node displays descriptions of all possible connections that an app can make. These are the app's input and output ports.\n\nThey are represented by small circles on the perimeter of the node. Circles on the left of the node represent **input ports** whereas the ones on the right indicate **output ports**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/dbee50c-workflow-editor-tutorial-5.png\",\n        \"workflow-editor-tutorial-5.png\",\n        395,\n        157,\n        \"#ebeeea\"\n      ]\n    }\n  ]\n}\n[/block]\nThe **Genome files** output port on the **STAR Genome Generate** node needs to be connected to the **Genome files** input port on the **STAR** node, since genome files produced by **STAR-GenomeGenerate** will be used by **STAR** to properly align the RNA-Seq reads.\n\n1. Hover over the** STAR-GenomeGenerate** tool to display all ports.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c1148ca-workflow-editor-tutorial-6.png\",\n        \"workflow-editor-tutorial-6.png\",\n        330,\n        134,\n        \"#e5eeee\"\n      ]\n    }\n  ]\n}\n[/block]\n2. Click the **Genome files** port of the **STAR Genome Generate** tool and drag the mouse cursor towards the **STAR** tool.\n3. Release the line at the **Genome files** port of the **STAR** tool. The tools are now connected. To undo a connection, click the line that connects the input ports and press Backspace on the keyboard.\nNotice that as you click and hold the **Genome files** port on **STAR Genome Generate**, all the compatible input ports on **STAR** become green. These are the ports that accept the filetype outputted by the **Genome files** port.\n\nBe aware that the workflow editor will allow you to connect to any of the green input ports. However, while the editor indicates connections between compatible ports, it cannot indicate whether a connection is one that the tool was designed to be used with.\n\nThe next step is to add input and output nodes.\n\n## Add input and output nodes\nNow that we have connected the tools properly, we need to add input nodes to take the data we wish to process.\n\n1. Double click the **STAR Genome Generate** tool in the editor.\n2. Under the **Inputs** tab on the right find the **Splice junction file** input port.\n3. Click the **Hide** button so that it changes it status to **Show**. The port is now visible on the **STAR Genome Generate** tool in the Visual Editor.\n4. Click the **Splice junction file** input port for the **STAR Genome Generate** tool, drag the mouse cursor to the left side of the canvas and release it anywhere in the blank space.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/99ddcc5-workflow-editor-tutorial-7.png\",\n        \"workflow-editor-tutorial-7.png\",\n        698,\n        367,\n        \"#e3efee\"\n      ]\n    }\n  ]\n}\n[/block]\nAn input node labelled **sjdbGTFfile** will be added to the canvas.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0254d9b-workflow-editor-tutorial-8.png\",\n        \"workflow-editor-tutorial-8.png\",\n        639,\n        318,\n        \"#ddecea\"\n      ]\n    }\n  ]\n}\n[/block]\n5. Next, double click the **STAR** tool in the Visual Editor.\n6. Under the **Inputs** tab on the right find the **Splice junction file** input port.\n7. Click the **Hide** button so that it changes it status to **Show**. The port is now visible on the **STAR** tool in the Visual Editor.\n8. Connect the **Splice junction file** input port of the **STAR** tool with the **sjdbGTFfile** input node.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4d8f6b1-workflow-editor-tutorial-9.png\",\n        \"workflow-editor-tutorial-9.png\",\n        675,\n        310,\n        \"#ddecea\"\n      ]\n    }\n  ]\n}\n[/block]\nIf several tools require the same input file, you can create one input node and connect it to more than one app.\n9. Drag the **Reference/Index files** port of the **STAR Genome Generate** tool to the left side of the canvas to add another input node, as shown below.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/5941034-workflow-editor-tutorial-10.png\",\n        \"workflow-editor-tutorial-10.png\",\n        719,\n        372,\n        \"#e3eeed\"\n      ]\n    }\n  ]\n}\n[/block]\nThe next step is to add the **FASTQ Quality Detector** tool.\n\n## Add the SBG FASTQ Quality Detector tool\nIn our workflow, **RNA-Seq Alignment STAR**, we first run the read sequences using the **SBG FASTQ Quality Detector** tool. This tool automatically detects the quality encoding scheme of the reads and writes this data in the appropriate metadata field. This enables downstream tools to recognize the quality of each base call.\n\nFor the **Read Sequence (required)** port on the **STAR** node, we will use a **Batch Input** node because the workflow can be executed in parallel for multiple groups of files inputted to it. Before we can add this input node, we have to first add the **SBG FASTQ Quality Detector** tool.\n\n1. Search for **SBG FASTQ Quality Detector** under the **Public Apps** tab on the left.\n2. Drag and drop the tool onto the canvas.\n3. Connect the **Read sequence** input port of **STAR** to the **Result** output port of the **SBG FASTQ Quality Detector** node.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/cd5965f-workflow-editor-tutorial-11.png\",\n        \"workflow-editor-tutorial-11.png\",\n        663,\n        482,\n        \"#e5efee\"\n      ]\n    }\n  ]\n}\n[/block]\nThen, drag the **Fastq** input port on the **SBG FASTQ Quality Detector** node to the left side of the canvas to add an input node.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/49785bb-workflow-editor-tutorial-12.png\",\n        \"workflow-editor-tutorial-12.png\",\n        655,\n        516,\n        \"#e6f0ef\"\n      ]\n    }\n  ]\n}\n[/block]\nThe next step is adding the **Picard SortSAM** tool to the workflow.\n\n## Add Picard SortSAM to the workflow\nBefore we can add output nodes to our workflow, we need to add the **Picard SortSAM** tool. This tool is needed in order to sort the generated BAM file by coordinates and allow faster random access to it.\n\n1. In the **Public Apps** tab on the left search for **Picard SortSAM**.\n2. Drag and drop the tool to the canvas.\n3. Connect the **Aligned SAM/BAM** output port on **STAR** to the **Input BAM** port on **Picard SortSAM**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c7ec726-workflow-editor-tutorial-13.png\",\n        \"workflow-editor-tutorial-13.png\",\n        406,\n        408,\n        \"#dfedec\"\n      ]\n    }\n  ]\n}\n[/block]\nThe next step is to add the output nodes.\n\n## Add output nodes\nJust as we added input nodes to input files, we need to add output nodes to collect the data returned by our analysis.\n\nYou can add output nodes to your workflow by clicking a tool's output port and dragging the connector to the right side of the canvas.\n\n1. Click the output node.\n2. Drag and drop to the right side of the canvas.\n3. Do these steps to add nodes for all nine remaining available output ports of the STAR tool: \n   * Wiggle files\n   * Unmapped reads\n   * Transcriptome alignments\n   * Splice junctions\n   * Reads per gene\n   * Log files\n   * Intermediate genome files\n   * Chimeric junctions\n   * Chimeric alignments\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/21db2b1-workflow-editor-tutorial-16.png\",\n        \"workflow-editor-tutorial-16.png\",\n        865,\n        742,\n        \"#f0f2f1\"\n      ]\n    }\n  ]\n}\n[/block]\nThe last step is adding an output node from **Picard SortSAM**'s output port. Since we added **Picard SortSAM** to the **Aligned SAM/BAM** output port on **STAR**, we'll need to collect its data.\n\nIt is possible to connect multiple output ports to a single output node. However, we prefer to create individual output nodes for each different output file type. This way, it is easier to discern individual output files visually on the canvas.\n\nNote that output files generated in an intermediate step can easily be connected to another node as an input file; we do not need to use an output node to pass an output file to a subsequent tool.\n\nHowever, inserting output nodes in the middle of a workflow lets us collect and save these intermediate files created as part of the workflow execution.\n\n## Set app parameters\nIn order for this workflow to run properly, certain app parameters need to be set to the appropriate values.\n\n1. Click on the **STAR** node.\n2. In the object inspector on the right scroll down to the **APP PARAMETERS** section.\n3. Take a look at the different parameters that you can change.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0ec6f53-workflow-editor-tutorial-17.png\",\n        \"workflow-editor-tutorial-17.png\",\n        1181,\n        861,\n        \"#f2f3f2\"\n      ]\n    }\n  ]\n}\n[/block]\nIf value next to the parameter name is set to **exposed**, you can [change the value of the parameter on the task page](doc:run-a-task#section-define-app-settings) before running the workflow. This gives you easy access to some parameters just before starting a new task, without needing to come back to the workflow editor.\n\n## Save the new workflow\n1. Click the **Save** icon in the upper right corner.\n2. Describe the changes you made (optional).\n3. Click **Save**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/dea756d-workflow-editor-tutorial-18.png\",\n        \"workflow-editor-tutorial-18.png\",\n        500,\n        164,\n        \"#f1f2f3\"\n      ]\n    }\n  ]\n}\n[/block]\nYour workflow is now saved. Notice that the **Revision** number next to your workflow name in the top right corner has increased by 1 (for instance, it originally reads **0** but has increased to **1** after you save your workflow for the first time).\n\nBy clicking on the revision icon, you can always choose to go back to an earlier saved version of your workflow from the drop-down menu, as shown below.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/220da10-workflow-editor-tutorial-19.png\",\n        \"workflow-editor-tutorial-19.png\",\n        396,\n        407,\n        \"#f7f7f7\"\n      ]\n    }\n  ]\n}\n[/block]\nAnd that's it! We've created an **RNA-seq Alignment - STAR** workflow from scratch in the workflow editor.","excerpt":"","slug":"workflow-editor-tutorial","type":"basic","title":"Workflow editor tutorial"}

Workflow editor tutorial


This tutorial will walk you through building **RNA-seq Alignment - STAR**, a workflow that aligns RNA-seq reads to a reference and outputs aligned reads, non-aligned reads, and the program log. ## Objective On this page we'll build a workflow using the CGC's publicly available tools via the [workflow editor](doc:about-the-workflow-editor). We will build RNA-seq Alignment - STAR, a workflow that aligns RNA-seq reads to a reference and outputs aligned reads, non-aligned reads, and the program log. We encourage you to consult the [manual for the STAR aligner](https://github.com/alexdobin/STAR) to see the required input files for each tool. ## Prerequisites The tools we will use to build the RNA-Seq Alignment STAR workflow are available as public apps on the CGC. The process of adding the tools to the workflow will be explained in this tutorial. If you are new to the workflow editor, you might want to read the [workflow editor basics](doc:about-the-workflow-editor) before starting to create your first workflow. ## Procedure First, we'll select a project to contain our new workflow. Then, we will create a workflow and add the required tools. Lastly, we'll set app parameters and instance settings and then save the workflow. ## Choose a project 1. Click **Projects** in the top navigation bar. 2. Click the project in which you wish to add the new workflow. The project dashboard is displayed. The next step is to create the new workflow. ## Create a new workflow 1. Click the **Apps** tab in the project dashboard. The **Apps** page is displayed. 2. Click **+Add app**. The window for adding an app is displayed. 3. Click the **Create New App** tab. [block:image] { "images": [ { "image": [ "https://files.readme.io/0883697-build_a_workflow_tutorial_2.png", "build_a_workflow_tutorial_2.png", 559, 350, "#eff1f2" ] } ] } [/block] 4. Click **Create a Workflow**. The window for naming your workflow is displayed. [block:image] { "images": [ { "image": [ "https://files.readme.io/7337a35-cgc_build_a_workflow_tutorial_3.png", "cgc_build_a_workflow_tutorial_3.png", 626, 581, "#e1e8e8" ] } ] } [/block] 5. Name your workflow **RNA-seq Alignment - STAR**. 6. In the** CWL version** dropdown select **v1.0**. 7. Click **Create**. The workflow editor is displayed. The next step is to add tools to the workflow. ## Add tools to the workflow We will now add two tools to the workflow. These are are **STAR** and **STAR Genome Generate** which creates genome files required by the STAR tool. 1. Select the **Public Apps** tab in the pane on the left. 2. Type **star** in the search box. 3. Drag and drop the **STAR** tool onto the canvas. 4. Now, repeat these steps to find and add the **STAR Genome Generate** tool. The next step is to connect the two apps. ## Connect the apps The nodes that are displayed on the workflow canvas represent apps. Hovering over a node displays descriptions of all possible connections that an app can make. These are the app's input and output ports. They are represented by small circles on the perimeter of the node. Circles on the left of the node represent **input ports** whereas the ones on the right indicate **output ports**. [block:image] { "images": [ { "image": [ "https://files.readme.io/dbee50c-workflow-editor-tutorial-5.png", "workflow-editor-tutorial-5.png", 395, 157, "#ebeeea" ] } ] } [/block] The **Genome files** output port on the **STAR Genome Generate** node needs to be connected to the **Genome files** input port on the **STAR** node, since genome files produced by **STAR-GenomeGenerate** will be used by **STAR** to properly align the RNA-Seq reads. 1. Hover over the** STAR-GenomeGenerate** tool to display all ports. [block:image] { "images": [ { "image": [ "https://files.readme.io/c1148ca-workflow-editor-tutorial-6.png", "workflow-editor-tutorial-6.png", 330, 134, "#e5eeee" ] } ] } [/block] 2. Click the **Genome files** port of the **STAR Genome Generate** tool and drag the mouse cursor towards the **STAR** tool. 3. Release the line at the **Genome files** port of the **STAR** tool. The tools are now connected. To undo a connection, click the line that connects the input ports and press Backspace on the keyboard. Notice that as you click and hold the **Genome files** port on **STAR Genome Generate**, all the compatible input ports on **STAR** become green. These are the ports that accept the filetype outputted by the **Genome files** port. Be aware that the workflow editor will allow you to connect to any of the green input ports. However, while the editor indicates connections between compatible ports, it cannot indicate whether a connection is one that the tool was designed to be used with. The next step is to add input and output nodes. ## Add input and output nodes Now that we have connected the tools properly, we need to add input nodes to take the data we wish to process. 1. Double click the **STAR Genome Generate** tool in the editor. 2. Under the **Inputs** tab on the right find the **Splice junction file** input port. 3. Click the **Hide** button so that it changes it status to **Show**. The port is now visible on the **STAR Genome Generate** tool in the Visual Editor. 4. Click the **Splice junction file** input port for the **STAR Genome Generate** tool, drag the mouse cursor to the left side of the canvas and release it anywhere in the blank space. [block:image] { "images": [ { "image": [ "https://files.readme.io/99ddcc5-workflow-editor-tutorial-7.png", "workflow-editor-tutorial-7.png", 698, 367, "#e3efee" ] } ] } [/block] An input node labelled **sjdbGTFfile** will be added to the canvas. [block:image] { "images": [ { "image": [ "https://files.readme.io/0254d9b-workflow-editor-tutorial-8.png", "workflow-editor-tutorial-8.png", 639, 318, "#ddecea" ] } ] } [/block] 5. Next, double click the **STAR** tool in the Visual Editor. 6. Under the **Inputs** tab on the right find the **Splice junction file** input port. 7. Click the **Hide** button so that it changes it status to **Show**. The port is now visible on the **STAR** tool in the Visual Editor. 8. Connect the **Splice junction file** input port of the **STAR** tool with the **sjdbGTFfile** input node. [block:image] { "images": [ { "image": [ "https://files.readme.io/4d8f6b1-workflow-editor-tutorial-9.png", "workflow-editor-tutorial-9.png", 675, 310, "#ddecea" ] } ] } [/block] If several tools require the same input file, you can create one input node and connect it to more than one app. 9. Drag the **Reference/Index files** port of the **STAR Genome Generate** tool to the left side of the canvas to add another input node, as shown below. [block:image] { "images": [ { "image": [ "https://files.readme.io/5941034-workflow-editor-tutorial-10.png", "workflow-editor-tutorial-10.png", 719, 372, "#e3eeed" ] } ] } [/block] The next step is to add the **FASTQ Quality Detector** tool. ## Add the SBG FASTQ Quality Detector tool In our workflow, **RNA-Seq Alignment STAR**, we first run the read sequences using the **SBG FASTQ Quality Detector** tool. This tool automatically detects the quality encoding scheme of the reads and writes this data in the appropriate metadata field. This enables downstream tools to recognize the quality of each base call. For the **Read Sequence (required)** port on the **STAR** node, we will use a **Batch Input** node because the workflow can be executed in parallel for multiple groups of files inputted to it. Before we can add this input node, we have to first add the **SBG FASTQ Quality Detector** tool. 1. Search for **SBG FASTQ Quality Detector** under the **Public Apps** tab on the left. 2. Drag and drop the tool onto the canvas. 3. Connect the **Read sequence** input port of **STAR** to the **Result** output port of the **SBG FASTQ Quality Detector** node. [block:image] { "images": [ { "image": [ "https://files.readme.io/cd5965f-workflow-editor-tutorial-11.png", "workflow-editor-tutorial-11.png", 663, 482, "#e5efee" ] } ] } [/block] Then, drag the **Fastq** input port on the **SBG FASTQ Quality Detector** node to the left side of the canvas to add an input node. [block:image] { "images": [ { "image": [ "https://files.readme.io/49785bb-workflow-editor-tutorial-12.png", "workflow-editor-tutorial-12.png", 655, 516, "#e6f0ef" ] } ] } [/block] The next step is adding the **Picard SortSAM** tool to the workflow. ## Add Picard SortSAM to the workflow Before we can add output nodes to our workflow, we need to add the **Picard SortSAM** tool. This tool is needed in order to sort the generated BAM file by coordinates and allow faster random access to it. 1. In the **Public Apps** tab on the left search for **Picard SortSAM**. 2. Drag and drop the tool to the canvas. 3. Connect the **Aligned SAM/BAM** output port on **STAR** to the **Input BAM** port on **Picard SortSAM**. [block:image] { "images": [ { "image": [ "https://files.readme.io/c7ec726-workflow-editor-tutorial-13.png", "workflow-editor-tutorial-13.png", 406, 408, "#dfedec" ] } ] } [/block] The next step is to add the output nodes. ## Add output nodes Just as we added input nodes to input files, we need to add output nodes to collect the data returned by our analysis. You can add output nodes to your workflow by clicking a tool's output port and dragging the connector to the right side of the canvas. 1. Click the output node. 2. Drag and drop to the right side of the canvas. 3. Do these steps to add nodes for all nine remaining available output ports of the STAR tool: * Wiggle files * Unmapped reads * Transcriptome alignments * Splice junctions * Reads per gene * Log files * Intermediate genome files * Chimeric junctions * Chimeric alignments [block:image] { "images": [ { "image": [ "https://files.readme.io/21db2b1-workflow-editor-tutorial-16.png", "workflow-editor-tutorial-16.png", 865, 742, "#f0f2f1" ] } ] } [/block] The last step is adding an output node from **Picard SortSAM**'s output port. Since we added **Picard SortSAM** to the **Aligned SAM/BAM** output port on **STAR**, we'll need to collect its data. It is possible to connect multiple output ports to a single output node. However, we prefer to create individual output nodes for each different output file type. This way, it is easier to discern individual output files visually on the canvas. Note that output files generated in an intermediate step can easily be connected to another node as an input file; we do not need to use an output node to pass an output file to a subsequent tool. However, inserting output nodes in the middle of a workflow lets us collect and save these intermediate files created as part of the workflow execution. ## Set app parameters In order for this workflow to run properly, certain app parameters need to be set to the appropriate values. 1. Click on the **STAR** node. 2. In the object inspector on the right scroll down to the **APP PARAMETERS** section. 3. Take a look at the different parameters that you can change. [block:image] { "images": [ { "image": [ "https://files.readme.io/0ec6f53-workflow-editor-tutorial-17.png", "workflow-editor-tutorial-17.png", 1181, 861, "#f2f3f2" ] } ] } [/block] If value next to the parameter name is set to **exposed**, you can [change the value of the parameter on the task page](doc:run-a-task#section-define-app-settings) before running the workflow. This gives you easy access to some parameters just before starting a new task, without needing to come back to the workflow editor. ## Save the new workflow 1. Click the **Save** icon in the upper right corner. 2. Describe the changes you made (optional). 3. Click **Save**. [block:image] { "images": [ { "image": [ "https://files.readme.io/dea756d-workflow-editor-tutorial-18.png", "workflow-editor-tutorial-18.png", 500, 164, "#f1f2f3" ] } ] } [/block] Your workflow is now saved. Notice that the **Revision** number next to your workflow name in the top right corner has increased by 1 (for instance, it originally reads **0** but has increased to **1** after you save your workflow for the first time). By clicking on the revision icon, you can always choose to go back to an earlier saved version of your workflow from the drop-down menu, as shown below. [block:image] { "images": [ { "image": [ "https://files.readme.io/220da10-workflow-editor-tutorial-19.png", "workflow-editor-tutorial-19.png", 396, 407, "#f7f7f7" ] } ] } [/block] And that's it! We've created an **RNA-seq Alignment - STAR** workflow from scratch in the workflow editor.