{"_id":"5912eb36c0935b270003a9bc","user":"5767bc73bb15f40e00a28777","category":{"_id":"55faf96917b9d00d00969f48","pages":["5626a5d644c87f0d00fe6396","5626a5e4e2ce610d004e3dd8","5626a89ce2ce610d004e3dde","56429a87f49bfa0d002f54e0"],"project":"55faf11ba62ba1170021a9a7","__v":4,"version":"55faf11ba62ba1170021a9aa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-17T17:33:29.016Z","from_sync":false,"order":18,"slug":"run-an-analysis","title":"RUN AN ANALYSIS"},"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"},"__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-05-10T10:28:06.581Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"This page will explain how you can use the CGC to run an app that is available on Dockstore. Dockstore is an open platform for sharing Docker-based apps described with the [Common Workflow Language](http://www.commonwl.org), which enables bioinformaticians to share analytical tools that can be executed in a CWL-compliant execution environment, such as the CGC or the [Rabix Executor](http://www.rabix.io).\n\n### Procedure:\n* [ 1 ] Download the CWL description of the app from Dockstore.\n* [ 2 ] Upload the CWL to the CGC via the API.\n* [ 3 ] Execute the app on the CGC.\n\n## [ 1 ] Download the CWL description from Dockstore\n1. Find the app you want to run on [Dockstore](http://www.dockstore.org).\n2. Get the app URL from Dockstore:\n    a. For tools, on the **Tool Details** page open the **Info** tab.\n    b. Navigate to **Run locally with cwltool**.\n    c. Copy the API endpoint part of the command. This is the string that is left when you omit the initial `$ cwltool --non-strict` part and the final `Dockstore.json` part, for example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://www.dockstore.org:8443/api/ga4gh/v1/tools/quay.io%2Fopengenomics%2Fsamtools_pileup/versions/latest/plain-CWL/descriptor\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nIn case of workflows, you can extract the API endpoint from the last part of the **Launch With** section under the **Info** tab.\n\n3. Download the CWL description of the app by running the following command in the terminal:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl API_ENDPOINT > APP_NAME.cwl.yaml\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nMake sure to replace `API_ENDPOINT` with the actual URL you have copied in the previous step. Also, replace `APP_NAME` with a suitable file name.\n\n## [ 2 ] Upload the app to the CGC through the API\nUse the API to [add the CWL app to the CGC](http://docs.cancergenomicscloud.org/docs/add-an-app-using-raw-cwl).\n\n## [ 3 ] Execute the app on the CGC.\n1. Access the project on the CGC that contains the uploaded app.\n2. Click the **Apps** tab.\n3. Click <img src=\"https://files.readme.io/2UcmBmwQa6PM3OOkIXsg_Screen%20Shot%202016-03-09%20at%205.34.22%20PM.png\"\nheight=\"20px\" width=\"auto\" align=\"inline\" style=\"margin:1px\"/> next to the uploaded app.\nThis creates a draft task.\n4. Select the input files for the task.\n5. Click **Run**.\nThe task starts running. Once it has been completed, you will see the output files on the task page.","excerpt":"","slug":"run-dockstore-apps-on-the-cgc","type":"basic","title":"Run Dockstore apps on the CGC"}

Run Dockstore apps on the CGC


This page will explain how you can use the CGC to run an app that is available on Dockstore. Dockstore is an open platform for sharing Docker-based apps described with the [Common Workflow Language](http://www.commonwl.org), which enables bioinformaticians to share analytical tools that can be executed in a CWL-compliant execution environment, such as the CGC or the [Rabix Executor](http://www.rabix.io). ### Procedure: * [ 1 ] Download the CWL description of the app from Dockstore. * [ 2 ] Upload the CWL to the CGC via the API. * [ 3 ] Execute the app on the CGC. ## [ 1 ] Download the CWL description from Dockstore 1. Find the app you want to run on [Dockstore](http://www.dockstore.org). 2. Get the app URL from Dockstore: a. For tools, on the **Tool Details** page open the **Info** tab. b. Navigate to **Run locally with cwltool**. c. Copy the API endpoint part of the command. This is the string that is left when you omit the initial `$ cwltool --non-strict` part and the final `Dockstore.json` part, for example: [block:code] { "codes": [ { "code": "https://www.dockstore.org:8443/api/ga4gh/v1/tools/quay.io%2Fopengenomics%2Fsamtools_pileup/versions/latest/plain-CWL/descriptor", "language": "text" } ] } [/block] In case of workflows, you can extract the API endpoint from the last part of the **Launch With** section under the **Info** tab. 3. Download the CWL description of the app by running the following command in the terminal: [block:code] { "codes": [ { "code": "curl API_ENDPOINT > APP_NAME.cwl.yaml", "language": "text" } ] } [/block] Make sure to replace `API_ENDPOINT` with the actual URL you have copied in the previous step. Also, replace `APP_NAME` with a suitable file name. ## [ 2 ] Upload the app to the CGC through the API Use the API to [add the CWL app to the CGC](http://docs.cancergenomicscloud.org/docs/add-an-app-using-raw-cwl). ## [ 3 ] Execute the app on the CGC. 1. Access the project on the CGC that contains the uploaded app. 2. Click the **Apps** tab. 3. Click <img src="https://files.readme.io/2UcmBmwQa6PM3OOkIXsg_Screen%20Shot%202016-03-09%20at%205.34.22%20PM.png" height="20px" width="auto" align="inline" style="margin:1px"/> next to the uploaded app. This creates a draft task. 4. Select the input files for the task. 5. Click **Run**. The task starts running. Once it has been completed, you will see the output files on the task page.