Get raw CWL for an app

/apps/{app_id}/raw

This call returns information about the specified app, as raw CWL. The call differs from the call to GET details of an app by returning a JSON object that is the CWL.

The app should be one in a project that you can access; this could be an app that has been uploaded to the CGC by a project member, or a publicly available app that has been copied to the project.

https://cgc-api.sbgenomics.com/v2/apps/{app_id}/raw

👍

app_ids

Recall from the API Overview that the app_id has the form {project_owner}/{project}/{app_short_name}/{revision_number}

Note that if you omit revision_number, the API will return the latest app revision.

You can get the app_id for an app by making the call to list all apps available to you

Request

Example request

GET /v2/apps/RFranklin/my-project/bamtools-merge-2/raw HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl  -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X GET "https://cgc-api.sbgenomics.com/v2/apps/RFranklin/my-project/bamtools-merge-2/raw"

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CGC authentication token.

Path parameters

NameDescription
app_idThe ID for the app you are querying. It can be obtained by making the call to list all apps available to you

Query parameters

NameData typeDescription
fieldsstringSelector specifying a subset of fields to include in the response.

Response

See a list of CGC-specific response codes that may be contained in the body of the response.

Example response body

Note that this call returns the full CWL description of the app.

{
  "successCodes": [],
  "sbg:homepage": "https://github.com/pezmaster31/bamtools/wiki",
  "sbg:validationErrors": [],
  "sbg:sbgMaintained": false,
  "temporaryFailCodes": [],
  "requirements": [],
  "sbg:latestRevision": 0,
  "description": "BamTools Merge merges multiple BAM files into a single file.",
  "sbg:job": {
    "inputs": {
      "region": "chr1",
      "input_bam_files": [
        {
          "path": "1.bam"
        },
        {
          "path": "2.bam"
        }
      ]
    },
    "allocatedResources": {
      "cpu": 1,
      "mem": 1000
    }
  },
  "sbg:toolAuthor": "Derek Barnett, Erik Garrison, Gabor Marth, and Michael Stromberg",
  "hints": [
    {
      "dockerImageId": "f108163d4cd3",
      "class": "DockerRequirement",
      "dockerPull": "images.sbgenomics.com/markop/bamtools:2.0"
    },
    {
      "value": 1,
      "class": "sbg:CPURequirement"
    },
    {
      "value": 1000,
      "class": "sbg:MemRequirement"
    }
  ],
  "sbg:copyOf": "djordje_klisic/public-apps-by-seven-bridges/bamtools-merge-2/0",
  "sbg:createdOn": 1452181866,
  "arguments": [
    {
      "position": 1,
      "prefix": "-out",
      "separate": true,
      "valueFrom": "merged.bam"
    }
  ],
  "outputs": [
    {
      "sbg:fileTypes": "BAM",
      "id": "#output_bam_file",
      "outputBinding": {
        "glob": "merged.bam",
        "sbg:metadata": {},
        "sbg:inheritMetadataFrom": "#input_bams"
      },
      "description": "Output BAM file.",
      "type": [
        "File"
      ],
      "label": "Output BAM file"
    }
  ],
  "sbg:categories": [
    "SAM/BAM-Processing"
  ],
  "sbg:contributors": [
    "RFranklin"
  ],
  "sbg:links": [
    {
      "id": "https://github.com/pezmaster31/bamtools",
      "label": "Homepage"
    },
    {
      "id": "https://github.com/pezmaster31/bamtools/wiki",
      "label": "Wiki"
    }
  ],
  "stdout": "",
  "stdin": "",
  "sbg:project": "RFranklin/my-project",
  "inputs": [
    {
      "sbg:fileTypes": "BAM",
      "id": "#input_bam_files",
      "inputBinding": {
        "sbg:cmdInclude": true,
        "prefix": "-in",
        "separate": true,
        "itemSeparator": null,
        "position": 0
      },
      "description": "The input BAM files.",
      "label": "Input BAM files",
      "type": [
        {
          "type": "array",
          "items": "File"
        }
      ],
      "sbg:category": "Input & Output"
    },
    {
      "id": "#region",
      "inputBinding": {
        "sbg:cmdInclude": true,
        "position": 2,
        "separate": true,
        "prefix": "-region"
      },
      "description": "A region of interest (e.g. \"chr1:500..chr3:1500\"). See the documentation for more info.",
      "label": "Region of interest",
      "type": [
        "null",
        "string"
      ],
      "sbg:category": "Input & Output"
    }
  ],
  "label": "BamTools Merge",
  "sbg:createdBy": "RFranklin",
  "baseCommand": [
    "/opt/bamtools/bin/bamtools",
    "merge"
  ],
  "sbg:toolkitVersion": "2.4.0",
  "sbg:id": "RFranklin/my-project/bamtools-merge-2/0",
  "sbg:license": "The MIT License",
  "sbg:revision": 0,
  "sbg:cmdPreview": "/opt/bamtools/bin/bamtools merge -in 1.bam -in 2.bam -out merged.bam -region chr1",
  "sbg:modifiedOn": 1452181866,
  "id": "https://cgc-api.sbgenomics.com/RFranklin/my-project/bamtools-merge-2/0/raw/",
  "class": "CommandLineTool",
  "sbg:modifiedBy": "RFranklin",
  "sbg:revisionsInfo": [
    {
      "sbg:modifiedBy": "RFranklin",
      "sbg:modifiedOn": 1452181866,
      "sbg:revision": 0
    }
  ],
  "sbg:toolkit": "BamTools"
}
Language