{
  "$namespaces": {
    "sbg": "https://sevenbridges.com"
  },
  "hints": [
    {
      "class": "sbg:AWSInstanceType",
      "value": "c4.2xlarge;ebs-gp2;160"
    },
    {
      "class": "sbg:GoogleInstanceType",
      "value": "n1-standard-8;pd-ssd;160"
    },
    {
      "class": "sbg:OpenStackInstanceHint",
      "value": "c4.2xlarge;storage;160"
    },
    {
      "class": "sbg:AlibabaCloudInstanceType",
      "value": "ecs.c5.2xlarge;cloud_ssd;160"
    }
  ],
  "outputs": [
    {
      "source": [
        "#SnpEff.annotated"
      ],
      "sbg:x": 3374.565630664563,
      "sbg:fileTypes": "VCF, TXT, GATK, BED, BEDANN",
      "label": "SnpEff Annotated VCF",
      "required": false,
      "id": "#annotated",
      "sbg:includeInPorts": true,
      "type": [
        "null",
        "File"
      ],
      "sbg:y": 419.2949661566702
    },
    {
      "source": [
        "#GATK_CollectAlignmentSummaryMetrics.summary_metrics"
      ],
      "sbg:x": 1452.9683194545223,
      "sbg:fileTypes": "TXT",
      "label": "Alignment Summary Metrics",
      "required": true,
      "id": "#summary_metrics",
      "sbg:includeInPorts": true,
      "type": [
        "File"
      ],
      "sbg:y": -361.7214598280106
    },
    {
      "source": [
        "#GATK_MergeVcfs.output"
      ],
      "sbg:x": 2176.446981402047,
      "sbg:fileTypes": "VCF",
      "label": "Raw VCF",
      "required": false,
      "id": "#raw_vcf",
      "sbg:includeInPorts": true,
      "type": [
        "null",
        "File"
      ],
      "sbg:y": 584.3873356308401
    },
    {
      "source": [
        "#FastQC.report_html"
      ],
      "sbg:x": 492.33342430326985,
      "sbg:fileTypes": "HTML, B64HTML",
      "label": "FastQC report",
      "required": false,
      "id": "#b64html",
      "sbg:includeInPorts": true,
      "type": [
        "null",
        "File"
      ],
      "sbg:y": 420.00009813573973
    },
    {
      "source": [
        "#SnpEff.summary"
      ],
      "sbg:x": 3313.833806077601,
      "sbg:fileTypes": "HTML, CSV",
      "label": "SnpEff summary",
      "required": false,
      "id": "#b64html_1",
      "sbg:includeInPorts": true,
      "type": [
        "null",
        "File"
      ],
      "sbg:y": 222.16667213042462
    },
    {
      "source": [
        "#GATK_MergeVcfs_1.output"
      ],
      "sbg:x": 1857.9685866276025,
      "sbg:fileTypes": "VCF",
      "label": "gVCF",
      "required": false,
      "id": "#gvcf",
      "sbg:includeInPorts": true,
      "type": [
        "null",
        "File"
      ],
      "sbg:y": 441.6121204267674
    },
    {
      "source": [
        "#SAMtools_Depth.coverage"
      ],
      "sbg:x": 1447.6925506140449,
      "label": "coverage",
      "required": false,
      "type": [
        "null",
        "string"
      ],
      "sbg:includeInPorts": true,
      "id": "#coverage",
      "sbg:y": -512.3077108112308
    },
    {
      "source": [
        "#SAMtools_Depth.percentage_coverage_larger_than_limit"
      ],
      "sbg:x": 1452.3078681787822,
      "label": "percentage_coverage_larger_than_20",
      "required": false,
      "type": [
        "null",
        "float"
      ],
      "sbg:includeInPorts": true,
      "id": "#percentage_coverage_larger_than_20",
      "sbg:y": -655.3846382897277
    },
    {
      "source": [
        "#Sambamba_Merge.merged_bam"
      ],
      "sbg:x": 1555.2566554546452,
      "sbg:fileTypes": "BAM",
      "label": "Aligned Reads Bwa mem",
      "required": false,
      "id": "#aligned_reads_bwa_mem",
      "sbg:includeInPorts": true,
      "type": [
        "null",
        "File"
      ],
      "sbg:y": -132.30771636962982
    },
    {
      "source": [
        "#GATK_CollectHsMetrics.output"
      ],
      "sbg:x": 1456.0000813802087,
      "sbg:fileTypes": "TXT",
      "label": "HS Metrics",
      "required": false,
      "id": "#hs_metrics",
      "sbg:includeInPorts": true,
      "type": [
        "null",
        "File"
      ],
      "sbg:y": -846.666687011719
    }
  ],
  "sbg:batchBy": {
    "type": "criteria",
    "criteria": [
      "metadata.sample_id"
    ]
  },
  "sbg:projectName": "SBG Public Data",
  "sbg:canvas_x": 13,
  "sbg:license": "Open source BSD (3-clause) license",
  "sbg:revisionsInfo": [
    {
      "sbg:revision": 0,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554705,
      "sbg:revisionNotes": "Take GATK CollectAlignmentSummaryMetrics from GATK 4.0 Demo project"
    },
    {
      "sbg:revision": 1,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554705,
      "sbg:revisionNotes": "wes name"
    },
    {
      "sbg:revision": 2,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554705,
      "sbg:revisionNotes": "Update Untar FASTA"
    },
    {
      "sbg:revision": 3,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554705,
      "sbg:revisionNotes": "Description updated. Unnecessary outputs removed."
    },
    {
      "sbg:revision": 4,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554705,
      "sbg:revisionNotes": "description title removed"
    },
    {
      "sbg:revision": 5,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554705,
      "sbg:revisionNotes": "Update descriptions for GATK tools"
    },
    {
      "sbg:revision": 6,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554705,
      "sbg:revisionNotes": "Update GATK tools to new 4.beta.2 image"
    },
    {
      "sbg:revision": 7,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554706,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/78"
    },
    {
      "sbg:revision": 8,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554706,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/80"
    },
    {
      "sbg:revision": 9,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554706,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/102"
    },
    {
      "sbg:revision": 10,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554706,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/106"
    },
    {
      "sbg:revision": 11,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554706,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/107"
    },
    {
      "sbg:revision": 12,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554707,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/110"
    },
    {
      "sbg:revision": 13,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554707,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/113"
    },
    {
      "sbg:revision": 14,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554707,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/117"
    },
    {
      "sbg:revision": 15,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554707,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/121"
    },
    {
      "sbg:revision": 16,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1509554708,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/122"
    },
    {
      "sbg:revision": 17,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1517583113,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/127"
    },
    {
      "sbg:revision": 18,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1517583114,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/128"
    },
    {
      "sbg:revision": 19,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1517583114,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/133"
    },
    {
      "sbg:revision": 20,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1517583115,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/145"
    },
    {
      "sbg:revision": 21,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1519745465,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/147"
    },
    {
      "sbg:revision": 22,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1519745466,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/149"
    },
    {
      "sbg:revision": 23,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1519853729,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/150"
    },
    {
      "sbg:revision": 24,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1521478772,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/153"
    },
    {
      "sbg:revision": 25,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1521478772,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/155"
    },
    {
      "sbg:revision": 26,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1521737847,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/156"
    },
    {
      "sbg:revision": 27,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1528984442,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/157"
    },
    {
      "sbg:revision": 28,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1529424682,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/158"
    },
    {
      "sbg:revision": 29,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1530629817,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/159"
    },
    {
      "sbg:revision": 30,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1531304265,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/160"
    },
    {
      "sbg:revision": 31,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1532539346,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/161"
    },
    {
      "sbg:revision": 32,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1532539347,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/162"
    },
    {
      "sbg:revision": 33,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1539595318,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/163"
    },
    {
      "sbg:revision": 34,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1543403148,
      "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/whole-exome-pipeline-bwa-gatk-4-0-with-metrics/166"
    },
    {
      "sbg:revision": 35,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1545145121,
      "sbg:revisionNotes": "Ali instance type"
    },
    {
      "sbg:revision": 36,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1548264343,
      "sbg:revisionNotes": "pair fastqs by metadata updated fix"
    },
    {
      "sbg:revision": 37,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1550069806,
      "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0"
    },
    {
      "sbg:revision": 38,
      "sbg:modifiedBy": "admin",
      "sbg:modifiedOn": 1551696933,
      "sbg:revisionNotes": "revision in description 4.1.0.0"
    }
  ],
  "sbg:canvas_y": 252,
  "sbg:image_url": "https://igor.sbgenomics.com/ns/brood/images/admin/sbg-public-data/whole-exome-sequencing-bwa-gatk-4-0/38.png",
  "sbg:expand_workflow": false,
  "inputs": [
    {
      "sbg:x": -237.3809733195281,
      "sbg:fileTypes": "FASTQ, FQ, FASTQ.GZ, FQ.GZ, BAM, SAM",
      "label": "FASTQ",
      "id": "#fastq",
      "batchType": [
        "metadata.sample_id"
      ],
      "sbg:includeInPorts": true,
      "type": [
        {
          "items": "File",
          "type": "array"
        }
      ],
      "sbg:y": 212.7619826084788,
      "description": "FASTQ reads Illumina paired-end reads from the sequencer."
    },
    {
      "sbg:x": 493.33349747128557,
      "sbg:suggestedValue": {
        "path": "578cf947507c17681a3117ce",
        "name": "1000G_phase1.indels.b37.vcf",
        "class": "File"
      },
      "label": "1000g phase1 indels",
      "id": "#indels_1000g_phase1",
      "sbg:includeInPorts": true,
      "type": [
        "File"
      ],
      "sbg:y": 784.4874569371318,
      "description": "Known indels 1000g for BQSR"
    },
    {
      "sbg:x": 2847.91709198551,
      "sbg:fileTypes": "ZIP",
      "sbg:suggestedValue": {
        "path": "5a0f25eb4f0cdc2228b7e854",
        "name": "snpEff_v4_3_GRCh37.75.zip",
        "class": "File"
      },
      "label": "SnpEff Database",
      "id": "#database",
      "sbg:includeInPorts": true,
      "type": [
        "File"
      ],
      "sbg:y": 476.01190258491454,
      "description": "SnpEff database archive used for variant annotation (ZIP)"
    },
    {
      "sbg:x": -235.00006026692077,
      "sbg:fileTypes": "TAR,FA,FASTA,FA.GZ,FASTA.GZ",
      "sbg:suggestedValue": {
        "path": "5772b6d9507c1752674486e7",
        "name": "human_g1k_v37_decoy.fasta.tar",
        "class": "File"
      },
      "label": "Reference or TAR with BWA reference indices",
      "id": "#reference",
      "sbg:includeInPorts": true,
      "type": [
        "File"
      ],
      "sbg:y": 64.99434392959608,
      "description": "Reference or TAR with BWA reference indices"
    },
    {
      "sbg:x": 497.69248452113357,
      "sbg:suggestedValue": {
        "path": "5772b6c9507c1752674486d4",
        "name": "Mills_and_1000G_gold_standard.indels.b37.sites.vcf",
        "class": "File"
      },
      "label": "Mills",
      "id": "#mills",
      "sbg:includeInPorts": true,
      "type": [
        "File"
      ],
      "sbg:y": 959.6157861927989,
      "description": "Mills indel database used for BQSR (VCF)"
    },
    {
      "sbg:x": 501.4478761867981,
      "sbg:fileTypes": "VCF,BED",
      "sbg:suggestedValue": {
        "path": "5772b6cd507c1752674486d8",
        "name": "dbsnp_137.b37.vcf",
        "class": "File"
      },
      "label": "dbsnp",
      "id": "#dbsnp",
      "sbg:includeInPorts": true,
      "type": [
        "File"
      ],
      "sbg:y": 1125.5502524576098,
      "description": "Database with known variants from the population for BQSR"
    },
    {
      "sbg:x": 483.0086106992533,
      "sbg:fileTypes": "BED",
      "sbg:suggestedValue": {
        "path": "589b4e30507c177ca71a6361",
        "name": "exome_targets.b37.sorted.bed",
        "class": "File"
      },
      "label": "Target BED",
      "id": "#intervals_file",
      "sbg:includeInPorts": true,
      "type": [
        "File"
      ],
      "sbg:y": 622.1183731735439,
      "description": "Chromosomal intervals of this BED are used for base recalibration and variant calling"
    },
    {
      "sbg:suggestedValue": "GRCh37.75",
      "label": "Assembly (genome version)",
      "sbg:category": "Inputs",
      "id": "#assembly",
      "required": true,
      "type": [
        "string"
      ],
      "description": "Genome version matching the SnpEff database used (for example GRCh37.75 or GRCh38.86)."
    }
  ],
  "label": "Whole Exome Sequencing - BWA + GATK 4.0 (with Metrics)",
  "steps": [
    {
      "sbg:x": 108.33339318964445,
      "inputs": [
        {
          "source": [
            "#reference"
          ],
          "id": "#SBG_Untar_fasta.input_tar_with_reference"
        }
      ],
      "outputs": [
        {
          "id": "#SBG_Untar_fasta.output_fasta"
        }
      ],
      "run": {
        "sbg:cmdPreview": "echo Passing input file",
        "x": 108.33339318964445,
        "sbg:createdBy": "bix-demo",
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/markop/sbg-decompressor:1.0",
            "dockerImageId": "58b79c627f95"
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": 1000
          }
        ],
        "outputs": [
          {
            "id": "#output_fasta",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input_tar_with_reference",
              "glob": "{*.fasta,*.fa,*.fa.gz,*.fasta.gz}"
            },
            "type": [
              "File"
            ],
            "description": "Unpacked fasta file from the input archive.",
            "label": "Unpacked fasta file"
          }
        ],
        "label": "SBG Untar fasta",
        "sbg:latestRevision": 11,
        "sbg:homepage": "https://igor.sbgenomics.com/",
        "id": "bix-demo/sbgtools-demo/sbg-untar-fasta/11",
        "y": -130.5728811650625,
        "sbg:createdOn": 1466002722,
        "successCodes": [],
        "sbg:validationErrors": [],
        "class": "CommandLineTool",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 1000
          },
          "inputs": {
            "input_tar_with_reference": {
              "path": "input_file.fasta",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            }
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:license": "Apache License 2.0",
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1466002722,
            "sbg:revisionNotes": null,
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1466003214,
            "sbg:revisionNotes": null,
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1466004710,
            "sbg:revisionNotes": null,
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1466004986,
            "sbg:revisionNotes": null,
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1466005081,
            "sbg:revisionNotes": null,
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1466005599,
            "sbg:revisionNotes": null,
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1466007588,
            "sbg:revisionNotes": null,
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1466077480,
            "sbg:revisionNotes": null,
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1500468272,
            "sbg:revisionNotes": "Description updated.",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1500468316,
            "sbg:revisionNotes": "description",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1500472209,
            "sbg:revisionNotes": "Important with bold",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1500472520,
            "sbg:revisionNotes": "description - bold important",
            "sbg:revision": 11
          }
        ],
        "sbg:image_url": null,
        "stdin": "",
        "sbg:toolAuthor": "Vladimir Kovacevic, Seven Bridges Genomics",
        "sbg:contributors": [
          "bix-demo",
          "vladimirk"
        ],
        "inputs": [
          {
            "sbg:fileTypes": "TAR,FA,FASTA,FA.GZ,FASTA.GZ",
            "label": "Input archive file with fasta",
            "required": true,
            "type": [
              "File"
            ],
            "id": "#input_tar_with_reference",
            "description": "The input archive file to be unpacked.",
            "sbg:stageInput": "link"
          }
        ],
        "sbg:project": "bix-demo/sbgtools-demo",
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "arguments": [],
        "stdout": "",
        "baseCommand": [
          {
            "class": "Expression",
            "script": "{\n  reference_file = $job.inputs.input_tar_with_reference.path.split('/')[$job.inputs.input_tar_with_reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar'){\n    return 'tar -xf ' + reference_file    \n  }\n  else{\n    return 'echo Passing input file '\n  }\n}",
            "engine": "#cwl-js-engine"
          }
        ],
        "description": "SBG Untar fasta is primarily used for extracting FASTA file from TAR with more different files. For example, extracting FASTA from BWA-MEM's index TAR.\n\n**Inputs**\n\nTAR (containing FASTA).\n\n**Outputs**\n\nFA/FASTA/FA.GZ/FASTA.GZ from TAR.\n\n\n\n**Important: TAR.GZ format is not supported. \nIf only decompress operation is required use SBG Decompressor tool.**",
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkit": "SBGTools",
        "sbg:projectName": "SBGTools - Demo New",
        "sbg:toolkitVersion": "v1.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:revision": 11,
        "sbg:categories": [
          "Other"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1500472520,
        "sbg:id": "admin/sbg-public-data/sbg-untar-fasta/12",
        "temporaryFailCodes": [],
        "sbg:revisionNotes": "description - bold important"
      },
      "id": "#SBG_Untar_fasta",
      "sbg:y": -130.5728811650625
    },
    {
      "sbg:x": 632.4362270437216,
      "inputs": [
        {
          "id": "#Sambamba_Merge.reserved_threads",
          "default": 1
        },
        {
          "id": "#Sambamba_Merge.num_of_threads",
          "default": 4
        },
        {
          "id": "#Sambamba_Merge.mem_mb"
        },
        {
          "id": "#Sambamba_Merge.compression_level"
        },
        {
          "source": [
            "#BWA_MEM_Bundle.aligned_reads"
          ],
          "id": "#Sambamba_Merge.bams"
        }
      ],
      "outputs": [
        {
          "id": "#Sambamba_Merge.merged_bam"
        }
      ],
      "run": {
        "sbg:cmdPreview": "/opt/sambamba_0.5.9/sambamba_v0.5.9 merge  -t 6  /path/to/uuu_bams.bam  /path/to/uyyy_bams.bam  testmeta__bams.merged.bam",
        "x": 632.4362270437216,
        "sbg:createdBy": "nevenam.sudo",
        "class": "CommandLineTool",
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if ($job.inputs.reserved_threads) {\n    \n    return $job.inputs.reserved_threads\n    \n  } else if ($job.inputs.num_of_threads) {\n    \n    return $job.inputs.num_of_threads\n    \n  } else {\n    \n    return 1\n  }\n  \n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if ($job.inputs.mem_mb) {\n    \n    return $job.inputs.mem_mb\n    \n  } else {\n    \n    return 1024\n    \n  }\n  \n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/mladenlsbg/sambamba:0.5.9",
            "dockerImageId": ""
          }
        ],
        "label": "Sambamba Merge",
        "sbg:latestRevision": 18,
        "id": "bix-demo/sambamba-0-5-9-demo/sambamba-merge-0-5-9/18",
        "y": 11.538349064137936,
        "sbg:createdOn": 1458920412,
        "successCodes": [],
        "sbg:validationErrors": [],
        "sbg:contributors": [
          "nevenam",
          "nevenam.sudo",
          "vladimirk",
          "ognjenm"
        ],
        "sbg:job": {
          "allocatedResources": {
            "cpu": 2,
            "mem": 2
          },
          "inputs": {
            "bams": [
              {
                "path": "/path/to/uuu_bams.bam",
                "class": "File",
                "size": 0,
                "secondaryFiles": [],
                "metadata": {
                  "sample_id": "testmeta"
                }
              },
              {
                "path": "/path/to/uyyy_bams.bam",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "mem_mb": 2,
            "num_of_threads": 6,
            "reserved_threads": 2,
            "compression_level": null
          }
        },
        "sbg:links": [
          {
            "id": "http://lomereiter.github.io/sambamba/docs/sambamba-view.html",
            "label": "Homepage"
          },
          {
            "id": "https://github.com/lomereiter/sambamba",
            "label": "Source code"
          },
          {
            "id": "https://github.com/lomereiter/sambamba/wiki",
            "label": "Wiki"
          },
          {
            "id": "https://github.com/lomereiter/sambamba/releases/tag/v0.5.9",
            "label": "Download"
          },
          {
            "id": "http://lomereiter.github.io/sambamba/docs/sambamba-view.html",
            "label": "Publication"
          }
        ],
        "sbg:sbgMaintained": false,
        "outputs": [
          {
            "sbg:fileTypes": "BAM",
            "label": "Merged bam",
            "id": "#merged_bam",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#bams",
              "glob": "*.bam",
              "secondaryFiles": [
                ".bai",
                "^.bai"
              ]
            },
            "type": [
              "null",
              "File"
            ],
            "description": "Merged bam."
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "nevenam.sudo",
            "sbg:modifiedOn": 1458920412,
            "sbg:revisionNotes": null,
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "nevenam.sudo",
            "sbg:modifiedOn": 1458920459,
            "sbg:revisionNotes": null,
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "nevenam",
            "sbg:modifiedOn": 1462963630,
            "sbg:revisionNotes": null,
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "nevenam",
            "sbg:modifiedOn": 1462963660,
            "sbg:revisionNotes": null,
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1468849940,
            "sbg:revisionNotes": null,
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1470679574,
            "sbg:revisionNotes": "Changed to common name",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1470752287,
            "sbg:revisionNotes": "Smart naming introduced",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1470753233,
            "sbg:revisionNotes": "Corrected single file case",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1470753950,
            "sbg:revisionNotes": "Changed glob",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1470756561,
            "sbg:revisionNotes": "Updated sample id tag",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1470757408,
            "sbg:revisionNotes": "Added inherit metadata",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1472994215,
            "sbg:revisionNotes": "Added support for receiving bams as list inside list.",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1473000652,
            "sbg:revisionNotes": "Glob returns *.bam",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1473071971,
            "sbg:revisionNotes": "Added support for input.bams received as list of one-element-lists.",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1473257751,
            "sbg:revisionNotes": "Added protection from null (10)",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1473424164,
            "sbg:revisionNotes": "Returned revision that accepts list of one-element lists.",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1475064412,
            "sbg:revisionNotes": "Added resource parameters",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "ognjenm",
            "sbg:modifiedOn": 1475064631,
            "sbg:revisionNotes": "Changed mem error",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1476706820,
            "sbg:revisionNotes": "Added reserved number of threads.",
            "sbg:revision": 18
          }
        ],
        "sbg:license": "GNU General Public License v2.0 only",
        "sbg:image_url": null,
        "stdin": "",
        "sbg:toolAuthor": "Artem Tarasov",
        "sbg:project": "bix-demo/sambamba-0-5-9-demo",
        "inputs": [
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Number of threads reserved on the instance",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "1",
            "id": "#reserved_threads",
            "description": "Number of threads reserved on the instance passed to the scheduler (number of jobs)."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#num_of_threads",
            "description": "Number of threads to use for compression/decompression.",
            "label": "Number of threads to use",
            "sbg:category": "Merge"
          },
          {
            "id": "#mem_mb",
            "label": "Memory in MB",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "1024",
            "type": [
              "null",
              "int"
            ],
            "description": "Memory in MB.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#compression_level",
            "description": "Level of compression for merged BAM file, number from 0 to 9.",
            "label": "Compression level",
            "sbg:category": "Merge"
          },
          {
            "sbg:fileTypes": "BAM",
            "label": "BAM files",
            "sbg:category": "Merge",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "position": 5,
              "sbg:cmdInclude": true
            },
            "id": "#bams",
            "required": true,
            "type": [
              {
                "name": "bams",
                "items": "File",
                "type": "array"
              }
            ],
            "description": "Input BAM files."
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  if ($job.inputs.bams instanceof Array) { // VK\n    if ($job.inputs.bams[0] instanceof Array) {\n      \n      // Support for input received as list of one-element-lists \n      in_var = []\n      for (i=0;i<$job.inputs.bams.length;i++) \n  \t\tin_var = in_var.concat($job.inputs.bams[i]);\n      \n    } else {\n      in_var = [].concat($job.inputs.bams)\n    }\n  \n  \n  } else {\n    in_var = [].concat($job.inputs.bams)\n  }\n  \n  comm=''\n  if(in_var.length==1)\n  {\n  \tcomm+='. '\n  \n  \tif(in_var[0].secondaryFiles!=undefined && in_var[0].secondaryFiles.length>0)\n  \t{\n    \t comm+='| cp '\n    \t comm+=in_var[0].secondaryFiles[0].path\n    \t comm+=' . '\n  \t}\n  }\n  return comm\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 10
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n\n  function common_end(strs) {\n  \n  \t// Find minimum length of file name\n  \n  \tls = [];\n    whole = [];\n\tfor (i=0;i<strs.length;i++){\n  \t\tls = ls.concat(strs[i].path.split('/').pop().length);\n        whole = whole.concat(strs[i].path.length);\n  \t}\n \tl = Math.min.apply(Math,ls);\n  \n  \t// Loop from the end through characters and check if they are the same for all\n  \n \tind = 0;\n \tflag = 0;\n \tfor (i=1;i<=l;i++){\n    \tfor (j=1;j<strs.length;j++){\n      \t\tif (strs[0].path[whole[0]-i]!=strs[j].path[whole[j]-i]){\n        \tflag = 1;\n        \tbreak\n      \t\t}\n   \t\t}\n   \t \tif (flag == 1){\n   \t \t  \tbreak\n   \t    } else {\n      \t\tind = ind + 1;\n        }\n  \t }\n  \n  // Assign and return longest ending common substring\n  if (ind>0) {\n  \tcomstr = strs[0].path.slice(-ind);\n  } else {\n    comstr = 'different_extensions'\n  }\n  \n  return comstr\n  \n  }\n  \n  if ($job.inputs.bams instanceof Array) { // VK\n    if ($job.inputs.bams[0] instanceof Array) {\n      \n      // Support for input received as list of one-element-lists \n      in_var = []\n      for (i=0;i<$job.inputs.bams.length;i++) \n  \t\tin_var = in_var.concat($job.inputs.bams[i]);\n      \n    } else {\n      in_var = [].concat($job.inputs.bams)\n    }\n  \n  \n  } else {\n    in_var = [].concat($job.inputs.bams)\n  }\n  \n  prefix=''\n  \n  if(in_var.length==1) { \n    return '' // Input will be just passed to output\n  }else if (in_var[0].metadata){\n \t   if (\"sample_id\" in in_var[0].metadata){   \n  \t\t prefix = in_var[0].metadata[\"sample_id\"];      \n   \t    } else {\n   \t\t  prefix = 'sample_unknown';\n        }\n   \n  }else {\n    prefix = 'sample_unknown';   \n  }\n  \n  // Create joint name and add the merged suffix\n  joint_name = prefix + '_' + common_end(in_var);\n  name = joint_name.split('.').slice(0,-1).join('.') + '.merged.bam'\n  \n  \n  \n  return name\n  \n}\n\n\n",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 5
          }
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "temporaryFailCodes": [],
        "baseCommand": [
          {
            "class": "Expression",
            "script": "{\n  if ($job.inputs.bams instanceof Array) { // VK\n    if ($job.inputs.bams[0] instanceof Array) {\n      \n      // Support for input received as list of one-element-lists \n      in_var = []\n      for (i=0;i<$job.inputs.bams.length;i++) \n  \t\tin_var = in_var.concat($job.inputs.bams[i]);\n      \n    } else {\n      in_var = [].concat($job.inputs.bams)\n    }\n  \n  \n  } else {\n    in_var = [].concat($job.inputs.bams)\n  }\n  comm=''\n  if(in_var instanceof Array) // Always true\n  {\n    if(in_var.length==1)\n    {\n      comm+='cp '\n      \n    }\n  \telse if(in_var.length>1)\n  \t{\n    \n    \tcomm+='/opt/sambamba_0.5.9/sambamba_v0.5.9 merge '\n    \tif($job.inputs.num_of_threads)\n  \t\t{\n    \t\tcomm+=' -t '\n    \t\tcomm+=$job.inputs.num_of_threads\n  \t\t}\n  \t\tif($job.inputs.compression_level)\n  \t\t{\n   \t\t\tcomm+=' -l '\n    \t\tcomm+=$job.inputs.compression_level\n  \t\t}\n   \t\t\n    }\n  \n  \t\n\n  }\n  return comm\n}",
            "engine": "#cwl-js-engine"
          }
        ],
        "description": "Sambamba Merge is used for merging several sorted BAM files into one. The sorting order of all the files must be the same, and it is maintained in the output file.",
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkit": "Sambamba",
        "sbg:projectName": "Sambamba 0.5.9 - Demo",
        "sbg:toolkitVersion": "0.5.9",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:revision": 18,
        "sbg:categories": [
          "SAM/BAM-Processing"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1476706820,
        "sbg:id": "admin/sbg-public-data/sambamba-merge-0-5-9/18",
        "stdout": "",
        "sbg:revisionNotes": "Added reserved number of threads."
      },
      "id": "#Sambamba_Merge",
      "sbg:y": 11.538349064137936
    },
    {
      "sbg:x": 1243.0769230769238,
      "inputs": [
        {
          "id": "#SAMtools_Depth.truncate_depth"
        },
        {
          "id": "#SAMtools_Depth.total_memory_GB"
        },
        {
          "id": "#SAMtools_Depth.output_all_positions"
        },
        {
          "id": "#SAMtools_Depth.output_absolutely_all_positions"
        },
        {
          "id": "#SAMtools_Depth.mapping_quality_min"
        },
        {
          "id": "#SAMtools_Depth.ignore_short_reads"
        },
        {
          "id": "#SAMtools_Depth.coverage_limit",
          "default": 20
        },
        {
          "source": [
            "#intervals_file"
          ],
          "id": "#SAMtools_Depth.bed"
        },
        {
          "id": "#SAMtools_Depth.base_quality_min"
        },
        {
          "source": [
            "#Sambamba_Merge.merged_bam"
          ],
          "id": "#SAMtools_Depth.alignment_input_file"
        }
      ],
      "outputs": [
        {
          "id": "#SAMtools_Depth.percentage_coverage_larger_than_limit"
        },
        {
          "id": "#SAMtools_Depth.coverage_per_position"
        },
        {
          "id": "#SAMtools_Depth.coverage"
        }
      ],
      "run": {
        "y": -580.0000000000002,
        "x": 1243.0769230769238,
        "sbg:createdBy": "vladimirk",
        "class": "CommandLineTool",
        "outputs": [
          {
            "id": "#percentage_coverage_larger_than_limit",
            "outputBinding": {
              "outputEval": {
                "class": "Expression",
                "script": "{ \n  return $self[0].contents.split(' ')[1]\n}",
                "engine": "#cwl-js-engine"
              },
              "loadContents": true,
              "glob": "coverage.txt"
            },
            "type": [
              "null",
              "float"
            ],
            "description": "Percentage of coverage larger than limit.",
            "label": "Percentage of coverage larger than limit"
          },
          {
            "sbg:fileTypes": "DEPTH",
            "label": "Coverage per position",
            "id": "#coverage_per_position",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#alignment_input_file",
              "glob": "*.depth"
            },
            "type": [
              "null",
              "File"
            ],
            "description": "Coverage per position."
          },
          {
            "id": "#coverage",
            "outputBinding": {
              "outputEval": {
                "class": "Expression",
                "script": "{ \n  return $self[0].contents.split(' ')[0]\n}",
                "engine": "#cwl-js-engine"
              },
              "loadContents": true,
              "glob": "coverage.txt"
            },
            "type": [
              "null",
              "string"
            ],
            "description": "Calculated average coverage per position.",
            "label": "Average coverage"
          }
        ],
        "label": "SAMtools Depth",
        "sbg:latestRevision": 8,
        "id": "marouf/samtools-1-3-demo/samtools-depth-1-3/8",
        "sbg:sbgMaintained": false,
        "sbg:createdOn": 1503418357,
        "successCodes": [],
        "sbg:validationErrors": [],
        "sbg:project": "marouf/samtools-1-3-demo",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 1024
          },
          "inputs": {
            "alignment_input_file": {
              "path": "/path/to/the/input.bam",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "coverage_limit": 4,
            "bed": {
              "path": "/path/to/regions.bed",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "total_memory_GB": 1
          }
        },
        "sbg:links": [
          {
            "id": "http://www.htslib.org",
            "label": "Homepage"
          },
          {
            "id": "https://github.com/samtools/",
            "label": "Source Code"
          },
          {
            "id": "https://sourceforge.net/projects/samtools/files/samtools/",
            "label": "Download"
          },
          {
            "id": "http://www.ncbi.nlm.nih.gov/pubmed/19505943",
            "label": "Publication"
          },
          {
            "id": "http://www.htslib.org/doc/samtools-1.3.html",
            "label": "Wiki"
          }
        ],
        "baseCommand": [
          "/opt/samtools-1.3/samtools",
          "depth"
        ],
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  \n  if($job.inputs.total_memory_GB)\n  {\n   total_memory_MB = 1024 * $job.inputs.total_memory_GB\n  }\n  else\n  {\n    total_memory_MB = 1024 * 1\n  }\n  \n  return(total_memory_MB)\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/marouf/samtools:1.3",
            "dockerImageId": ""
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1503418357,
            "sbg:revisionNotes": "Copy of marouf/samtools-1-3-demo/samtools-flagstat-1-3/7",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1503419034,
            "sbg:revisionNotes": "init",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1503478232,
            "sbg:revisionNotes": "added self.contents",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1503479638,
            "sbg:revisionNotes": "load contents selected",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1503489092,
            "sbg:revisionNotes": "Added calculation of percentage read larger than limit",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "vladimir_obucina",
            "sbg:modifiedOn": 1505487492,
            "sbg:revisionNotes": null,
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "vladimir_obucina",
            "sbg:modifiedOn": 1505489234,
            "sbg:revisionNotes": "Added coverage_limit label",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "vladimir_obucina",
            "sbg:modifiedOn": 1505494007,
            "sbg:revisionNotes": "Removed list of files as option",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "vladimir_obucina",
            "sbg:modifiedOn": 1505731255,
            "sbg:revisionNotes": "Changed some descriptions after CWL validation(capital letter, dots...), but the code is the same.",
            "sbg:revision": 8
          }
        ],
        "sbg:license": "BSD License, MIT License",
        "sbg:image_url": null,
        "stdin": "",
        "sbg:toolAuthor": "Heng Li/Sanger Institute,  Bob Handsaker/Broad Institute, James Bonfield/Sanger Institute,",
        "sbg:contributors": [
          "vladimir_obucina",
          "vladimirk"
        ],
        "inputs": [
          {
            "id": "#truncate_depth",
            "label": "Truncate reported depth",
            "sbg:category": "configuration",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-m"
            },
            "sbg:toolDefaultValue": "8000",
            "type": [
              "null",
              "int"
            ],
            "description": "Truncate reported depth at a maximum of INT reads.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#total_memory_GB",
            "description": "In GB, default 1.",
            "label": "Total memory",
            "sbg:category": "Configuration"
          },
          {
            "label": "Output all positions",
            "sbg:category": "configuration",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-a"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#output_all_positions",
            "description": "Output all positions (including those with zero depth)."
          },
          {
            "label": "Output absolutely all positions",
            "sbg:category": "configuration",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-aa"
            },
            "id": "#output_absolutely_all_positions",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Output absolutely all positions, including unused reference sequences. Note that when used in conjunction with a BED file the -a option may sometimes operate as if -aa was specified if the reference sequence has coverage outside of the region specified in the BED file.",
            "sbg:stageInput": null
          },
          {
            "label": "Mapping quality minimum",
            "sbg:category": "configuration",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-Q"
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#mapping_quality_min",
            "description": "Only count reads with mapping quality greater than value."
          },
          {
            "label": "Ignore short reads",
            "sbg:category": "configuration",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-l"
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#ignore_short_reads",
            "description": "Ignore reads shorter than INT."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Set limit coverage",
            "sbg:category": "Configuration",
            "sbg:toolDefaultValue": "20",
            "id": "#coverage_limit",
            "description": "Used with calculation of percentage of coverage larger than this value."
          },
          {
            "sbg:fileTypes": "BED",
            "label": "BED file",
            "sbg:category": "Configuration",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-b"
            },
            "id": "#bed",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Compute depth at list of positions or regions in specified BED FILE."
          },
          {
            "label": "Base quality minimum",
            "sbg:category": "configuration",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-q"
            },
            "id": "#base_quality_min",
            "type": [
              "null",
              "int"
            ],
            "description": "Only count reads with base quality greater than value.",
            "sbg:stageInput": null
          },
          {
            "sbg:fileTypes": "BAM,CRAM,SAM",
            "label": "Alignment input file",
            "sbg:category": "Input Files",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n $job.inputs.alignment_input_file.path\n path = $job.inputs.alignment_input_file.path\n len = path.split('/').length\n path = path.split('/')[len-1]\n return path\n \n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 7
            },
            "required": true,
            "id": "#alignment_input_file",
            "type": [
              "File"
            ],
            "description": "Alignment input file.",
            "sbg:stageInput": "link"
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n\n filepath = [].concat($job.inputs.alignment_input_file)[0].path\n filename = filepath.split(\"/\").pop()\n file_dot_sep = filename.split(\".\")\n file_ext = file_dot_sep[file_dot_sep.length-1]\n\n filename = filename + '.depth'\n cmd = ' > ' + filename\n \n if($job.inputs.coverage_limit)\n   cov_limit = $job.inputs.coverage_limit\n else\n   cov_limit = 20\n   \n cmd2 = 'awk \\'BEGIN {FS = \\\"\\\\t\\\"; } ; {sum+=$3;cnt+=1;if($3 > ' + cov_limit + ') perc+=1} END {printf(\\\"%.0f %.2f%% \\\", sum / cnt ,perc / cnt * 100)}\\' ' + filename\n \n return cmd + ';' + cmd2 + ' > coverage.txt'\n\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 1000
          }
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "sbg:publisher": "sbg",
        "description": "**SAMtools depth** computes the depth at each position or region.",
        "sbg:cmdPreview": "/opt/samtools-1.3/samtools depth  input.bam   > input.bam.depth;awk 'BEGIN {FS = \"\\t\"; } ; {sum+=$3;cnt+=1;if($3 > 4) perc+=1} END {printf(\"%.0f %.2f%% \", sum / cnt ,perc / cnt * 100)}' input.bam.depth > coverage.txt",
        "sbg:modifiedBy": "vladimir_obucina",
        "sbg:toolkit": "SAMtools",
        "sbg:projectName": "SAMtools 1.3 Demo",
        "sbg:toolkitVersion": "v1.3",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:revision": 8,
        "sbg:categories": [
          "SAM/BAM-Processing"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1505731255,
        "sbg:id": "admin/sbg-public-data/samtools-depth-1-3/8",
        "temporaryFailCodes": [],
        "sbg:revisionNotes": "Changed some descriptions after CWL validation(capital letter, dots...), but the code is the same."
      },
      "id": "#SAMtools_Depth",
      "sbg:y": -580.0000000000002
    },
    {
      "sbg:x": 1080.0004099210255,
      "inputs": [
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.verbosity"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.validation_stringency"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.stop_after"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#GATK_CollectAlignmentSummaryMetrics.reference"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.quiet"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.metric_accumulation_level"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.memory_per_job"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.max_records_in_ram"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.max_insert_size"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.is_bisulfite_sequenced"
        },
        {
          "source": [
            "#Sambamba_Merge.merged_bam"
          ],
          "id": "#GATK_CollectAlignmentSummaryMetrics.input_bam"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.gcs_max_retries"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.compression_level"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.assume_sorted"
        },
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.adapter_sequence"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_CollectAlignmentSummaryMetrics.summary_metrics"
        }
      ],
      "run": {
        "sbg:sbgMaintained": false,
        "x": 1080.0004099210255,
        "sbg:createdBy": "teodora.aleksic",
        "class": "CommandLineTool",
        "outputs": [
          {
            "sbg:fileTypes": "TXT",
            "label": "Summary metrics",
            "id": "#summary_metrics",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input_bam",
              "glob": "*.summary_metrics.txt",
              "secondaryFiles": [],
              "sbg:metadata": {}
            },
            "type": [
              "File"
            ],
            "description": "File to which the output will be written."
          }
        ],
        "label": "GATK CollectAlignmentSummaryMetrics",
        "sbg:latestRevision": 7,
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-collectalignmentsummarymetrics/7",
        "sbg:copyOf": "vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/14",
        "sbg:createdOn": 1500373187,
        "successCodes": [],
        "sbg:validationErrors": [],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "verbosity": "INFO",
            "max_insert_size": null,
            "validation_stringency": null,
            "assume_sorted": true,
            "metric_accumulation_level": null,
            "input_bam": {
              "path": "/root/folder/example.bam"
            },
            "gcs_max_retries": 7,
            "adapter_sequence": null,
            "is_bisulfite_sequenced": 5.480351658898888,
            "quiet": true,
            "reference": {
              "path": "/root/directory/example.fasta"
            },
            "memory_per_job": 2048,
            "compression_level": null,
            "stop_after": null,
            "max_records_in_ram": null
          }
        },
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/index.php",
            "label": "Homepage"
          },
          {
            "id": "https://github.com/broadinstitute/gatk",
            "label": "Source Code"
          },
          {
            "id": "https://gatkforums.broadinstitute.org/gatk/discussion/9881/howto-get-started-with-gatk4-beta",
            "label": "Download"
          }
        ],
        "baseCommand": [
          "/opt/gatk-launch",
          "--javaOptions",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "CollectAlignmentSummaryMetrics"
        ],
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/teodora_aleksic/gatk:4.beta.2",
            "dockerImageId": "eab0e70b6629"
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn $job.inputs.memory_per_job\n  }\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500373187,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/7",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640338,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/8",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887421,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/9",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718034,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/10",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405173,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/11",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105710,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/12",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504272977,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/13",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275149,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/14",
            "sbg:revision": 7
          }
        ],
        "sbg:modifiedBy": "teodora.aleksic",
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:image_url": null,
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  if ($job.inputs.input_bam)\n  {\n    filename = [].concat($job.inputs.input_bam)[0].path\n    filebase = filename.split('.').slice(0, -1)\n\n    return filebase.concat(\"summary_metrics.txt\").join(\".\").replace(/^.*[\\\\\\/]/, '')\n  }\n}\n",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output",
            "position": 3
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:contributors": [
          "teodora.aleksic"
        ],
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 6
            },
            "id": "#verbosity",
            "label": "Verbosity",
            "sbg:category": "Options",
            "sbg:altPrefix": "-verbosity",
            "sbg:toolDefaultValue": "INFO",
            "type": [
              "null",
              {
                "name": "verbosity",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. This option can be set to 'null' to clear the default value. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "id": "#validation_stringency",
            "label": "Validation stringency",
            "sbg:category": "Options",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n  if ($job.inputs.validation_stringency)\n  {\n    return $job.inputs.validation_stringency\n  }\n  else\n  {\n    return \"SILENT\"\n  }\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VALIDATION_STRINGENCY",
              "position": 4
            },
            "sbg:toolDefaultValue": "SILENT",
            "type": [
              "null",
              {
                "name": "validation_stringency",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. This option can be set to 'null' to clear the default value. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "id": "#stop_after",
            "label": "Stop after",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--STOP_AFTER",
              "position": 9
            },
            "sbg:toolDefaultValue": "0",
            "type": [
              "null",
              "int"
            ],
            "description": "Stop after processing N reads, mainly for debugging. Default value: 0. This option can be set to 'null' to clear the default value."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--reference",
              "position": 3
            },
            "sbg:fileTypes": "FASTA",
            "label": "Reference sequence",
            "sbg:category": "File inputs",
            "sbg:altPrefix": "-R",
            "id": "#reference",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence file. Note that while this argument is not required, without it only a small subset of the metrics will be calculated. If reference sequence file is used, sequence index and dictionary are required. This tool requires the exact same FASTA file as the one to which raw reads were aligned. Default value: null."
          },
          {
            "id": "#quiet",
            "label": "Quiet",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--QUIET",
              "position": 4
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "This parameter indicates whether to suppress job-summary info on System.err. Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "--METRIC_ACCUMULATION_LEVEL",
              "position": 8,
              "sbg:cmdInclude": true
            },
            "id": "#metric_accumulation_level",
            "label": "Metric accumulation level",
            "sbg:category": "Options",
            "sbg:altPrefix": "-LEVEL",
            "sbg:toolDefaultValue": "ALL_READS",
            "type": [
              "null",
              {
                "items": {
                  "name": "metric_accumulation_level",
                  "symbols": [
                    "ALL_READS",
                    "SAMPLE",
                    "LIBRARY",
                    "READ_GROUP"
                  ],
                  "type": "enum"
                },
                "type": "array"
              }
            ],
            "description": "This parameter indicates the level(s) at which to accumulate metrics. Default value: [ALL_READS]. This option can be set to 'null' to clear the default value. Possible values: {ALL_READS, SAMPLE, LIBRARY, READ_GROUP}. This option may be specified 0 or more times. This option can be set to 'null' to clear the default list."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Memory per job",
            "sbg:category": "Execution options",
            "sbg:toolDefaultValue": "2048",
            "id": "#memory_per_job",
            "description": "Amount of RAM memory to be used per job. Defaults to 2048 MB for single threaded jobs."
          },
          {
            "id": "#max_records_in_ram",
            "label": "Max records in RAM",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MAX_RECORDS_IN_RAM",
              "position": 4
            },
            "sbg:toolDefaultValue": "500000",
            "type": [
              "null",
              "int"
            ],
            "description": "When writing SAM files that need to be sorted, this parameter will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort a SAM file, and increases the amount of RAM needed. Default value: 500000. This option can be set to 'null' to clear the default value."
          },
          {
            "id": "#max_insert_size",
            "label": "Max insert size",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MAX_INSERT_SIZE",
              "position": 9
            },
            "sbg:toolDefaultValue": "100000",
            "type": [
              "null",
              "int"
            ],
            "description": "Paired end reads above this insert size will be considered chimeric along with inter-chromosomal pairs. Default value: 100000. This option can be set to 'null' to clear the default value."
          },
          {
            "sbg:altPrefix": "-BS",
            "id": "#is_bisulfite_sequenced",
            "label": "Is bisulfite sequenced",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--IS_BISULFITE_SEQUENCED",
              "position": 8
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "float"
            ],
            "description": "This parameter indicates whether the SAM or BAM file consists of bisulfite sequenced reads. Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--input",
              "position": 0
            },
            "sbg:fileTypes": "BAM, SAM",
            "label": "Input file",
            "sbg:category": "File inputs",
            "sbg:altPrefix": "-I",
            "id": "#input_bam",
            "required": true,
            "type": [
              "File"
            ],
            "description": "Input SAM or BAM file.  Required. Note: Sort order should be coordinate based."
          },
          {
            "sbg:altPrefix": "-gcs_retries",
            "id": "#gcs_max_retries",
            "label": "GCS Max Retries",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--gcs_max_retries"
            },
            "sbg:toolDefaultValue": "20",
            "type": [
              "null",
              "int"
            ],
            "description": "If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection.",
            "sbg:stageInput": null
          },
          {
            "id": "#compression_level",
            "label": "Compression level",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--COMPRESSION_LEVEL",
              "position": 4
            },
            "sbg:toolDefaultValue": "5",
            "type": [
              "null",
              "int"
            ],
            "description": "Compression level for all compressed files created (e.g. BAM and GELI). Default value: 5. This option can be set to 'null' to clear the default value."
          },
          {
            "sbg:altPrefix": "-AS",
            "id": "#assume_sorted",
            "label": "Assume sorted",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ASSUME_SORTED"
            },
            "sbg:toolDefaultValue": "true",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If this parameter is set to true, the sort order in the header file will be ignored. Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "id": "#adapter_sequence",
            "label": "Adapter sequence",
            "sbg:category": "Options",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "--ADAPTER_SEQUENCE",
              "position": 8,
              "sbg:cmdInclude": true
            },
            "sbg:toolDefaultValue": "AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT",
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "description": "List of adapter sequences to use when processing the alignment metrics. Default value: [AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG]. This option can be set to 'null' to clear the default value. This option may be specified 0 or more times. This option can be set to 'null' to clear the default list."
          }
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "sbg:publisher": "sbg",
        "description": "Produces from a SAM/BAM/CRAM file containing summary alignment metrics.\n\n###**Overview**  \n\nCollectAlignmentSummaryMetrics assesses the quality of alignment by analyzing a SAM or BAM file. It compares it with the reference file (FASTA) and provides alignment statistics, such as the number of input reads and the percent of reads that are mapped. It produces a file which contains summary alignment metrics from a SAM or BAM file.\n\nNote: This tool requires the exact same FASTA file as the one to which raw reads were aligned.\n\n###**Inputs**  \nA BAM or SAM file.\n\n###**Outputs**  \nAn alignment summary file. \n\n###**Usage example**\n\n    java -Xmx4g -jar gatk.jar \\  \n         CollectAlignmentSummaryMetrics \\  \n         --reference reference.fasta \\\n         --input input.bam \\\n         --output summary_metrics.txt\n\n###**Common issues**\n\n1) BAM file - Sort order should be coordinate based.\n2) Reference sequence file - Note that while this argument is not required, without it only a small subset of the metrics will be calculated. If reference sequence file is used, sequence index and dictionary are required. This tool requires the exact same FASTA file as the one to which raw reads were aligned.\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:cmdPreview": "/opt/gatk-launch --javaOptions \"-Xmx2048M\" CollectAlignmentSummaryMetrics --input /root/folder/example.bam --output example.summary_metrics.txt",
        "stdin": "",
        "sbg:toolkit": "GATK 4.0",
        "sbg:projectName": "GATK 4.0 - Demo",
        "sbg:toolkitVersion": "Beta 2",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:revision": 7,
        "sbg:categories": [
          "SAM/BAM-Processing",
          "Quality-Control",
          "Quantification",
          "GATK-4.0"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1504275149,
        "sbg:id": "admin/sbg-public-data/gatk-4-0-collectalignmentsummarymetrics/7",
        "temporaryFailCodes": [],
        "y": -361.6667013830619,
        "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/Picard_CollectAlignmentSummaryMetrics/14"
      },
      "id": "#GATK_CollectAlignmentSummaryMetrics",
      "sbg:y": -361.6667013830619
    },
    {
      "sbg:x": 41.66666196452224,
      "inputs": [
        {
          "id": "#SBG_FASTQ_Quality_Adjuster.used_quality_scale"
        },
        {
          "id": "#SBG_FASTQ_Quality_Adjuster.total_memory"
        },
        {
          "source": [
            "#fastq"
          ],
          "id": "#SBG_FASTQ_Quality_Adjuster.fastq"
        }
      ],
      "outputs": [
        {
          "id": "#SBG_FASTQ_Quality_Adjuster.result"
        }
      ],
      "scatter": "#SBG_FASTQ_Quality_Adjuster.fastq",
      "run": {
        "sbg:cmdPreview": "python sbg_fastq_quality_scale_adjuster.py  --fastq /path/to/test.1.fastq",
        "x": 41.66666196452224,
        "sbg:createdBy": "vladimirk",
        "outputs": [
          {
            "sbg:fileTypes": "FASTQ",
            "label": "Result",
            "id": "#result",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#fastq",
              "glob": {
                "class": "Expression",
                "script": "{\n\n  qscale = \"to be detected\"\n  \n  if ($job.inputs.fastq.metadata)\n      if ($job.inputs.fastq.metadata[\"quality_scale\"])\n      qscale = $job.inputs.fastq.metadata[\"quality_scale\"]  \n  \n  if ($job.inputs.used_quality_scale)\n    if ($job.inputs.used_quality_scale != null) \n      qscale = $job.inputs.used_quality_scale\n  \n      \n  if (qscale == \"sanger\" || qscale == \"illumina18\" ) \n  {\n    return $job.inputs.fastq.path.replace(/^.*[\\\\\\/]/, '')\n  }\n  else\n  {\n\tfile = $job.inputs.fastq.path\n\tfile_split = file.split('.')\n\tbasename = file_split\n  \tif (basename.length > 1)\n    {\n      l_ext = basename.splice(basename.length-1)\n      if (l_ext == 'gz')\n      {\n        basename = basename.slice(0, basename.length-1)\n      }\n    }\n \tretval = basename.concat('std.fastq')\n\treturn retval.join('.').replace(/^.*[\\\\\\/]/, '') + \"*\"\n  }\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:metadata": {
                "Quality scale": "sanger"
              }
            },
            "type": [
              "null",
              "File"
            ],
            "description": "Resulting file in FASTQ format."
          }
        ],
        "label": "SBG FASTQ Quality Adjuster",
        "sbg:latestRevision": 15,
        "id": "bix-demo/sbgtools-demo/sbg-fastq-quality-adjuster/15",
        "y": 213.33336724175462,
        "sbg:createdOn": 1470927070,
        "successCodes": [],
        "sbg:validationErrors": [],
        "class": "CommandLineTool",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 9216
          },
          "inputs": {
            "used_quality_scale": null,
            "total_memory": 9,
            "fastq": {
              "path": "/path/to/test.1.fastq",
              "class": "File",
              "size": 0,
              "secondaryFiles": [],
              "metadata": {
                "Quality scale": "sanger"
              }
            }
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:license": "Apache License 2.0",
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1470927070,
            "sbg:revisionNotes": "Copy of bogdang/fastq-quality-converter/sbg-fastq-quality-adjuster/23",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1472559664,
            "sbg:revisionNotes": "Copy of bogdang/fastq-quality-converter/sbg-fastq-quality-adjuster/24",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1474546255,
            "sbg:revisionNotes": "Copy of bogdang/fastq-quality-converter/sbg-fastq-quality-adjuster/25",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1475084132,
            "sbg:revisionNotes": "'sanger': (33, 74) instead 'sanger': (33, 126)",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1475231421,
            "sbg:revisionNotes": "sanger 33:92",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1475234050,
            "sbg:revisionNotes": "seqtk for converting from illumina13-15",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1478274820,
            "sbg:revisionNotes": "fix for seqtk conversion from .gz files",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1478277013,
            "sbg:revisionNotes": "Without seqtk",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1478300733,
            "sbg:revisionNotes": "fix seqtk for .gz files",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1481123041,
            "sbg:revisionNotes": "Support for files named filename.fq.fastq",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1481290093,
            "sbg:revisionNotes": "No conversion if sanger or illumina18 quality scale set in metadata",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1481448894,
            "sbg:revisionNotes": "fix",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1495706394,
            "sbg:revisionNotes": "Added detection mode and switched to python3",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1497438325,
            "sbg:revisionNotes": "Revert to rev 11",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1511876154,
            "sbg:revisionNotes": "Link instead of copy. Output string with detected quality scale.",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1511876318,
            "sbg:revisionNotes": "No change",
            "sbg:revision": 15
          }
        ],
        "sbg:modifiedBy": "bogdang",
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.total_memory){\n    return $job.inputs.total_memory * 1024\n  } else {\n    return 1000\n  }\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/bogdang/sbg_quality_scale_adjuster:1.0",
            "dockerImageId": ""
          }
        ],
        "stdin": "",
        "sbg:toolAuthor": "Seven Bridges Genomics",
        "sbg:contributors": [
          "vladimirk",
          "bogdang"
        ],
        "inputs": [
          {
            "type": [
              "null",
              {
                "name": "used_quality_scale",
                "symbols": [
                  "sanger",
                  "illumina18",
                  "illumina13",
                  "illumina15",
                  "solexa"
                ],
                "type": "enum"
              }
            ],
            "id": "#used_quality_scale",
            "description": "Used quality scale of FASTQ reads.",
            "label": "Used quality scale",
            "sbg:category": "Input"
          },
          {
            "id": "#total_memory",
            "label": "Total memory [GB]",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "1",
            "type": [
              "null",
              "int"
            ],
            "description": "Total memory in GB.",
            "sbg:stageInput": null
          },
          {
            "sbg:fileTypes": "FASTQ,FASTQ.GZ,FQ,FQ.GZ",
            "label": "Fastq file",
            "sbg:category": "Input",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n  qscale = \"to be detected\"\n  \n  if ($job.inputs.fastq.metadata)\n      if ($job.inputs.fastq.metadata[\"quality_scale\"])\n      qscale = $job.inputs.fastq.metadata[\"quality_scale\"]  \n  \n  if ($job.inputs.used_quality_scale)\n    if ($job.inputs.used_quality_scale != null) \n      qscale = $job.inputs.used_quality_scale\n  \n      \n  if (qscale == \"sanger\" || qscale == \"illumina18\" )   {\n    return \"\"\n  }\n  else\n  {\n    return \"--fastq \" + $job.inputs.fastq.path\n  }\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 1
            },
            "required": true,
            "id": "#fastq",
            "type": [
              "File"
            ],
            "description": "Input FASTQ file.",
            "sbg:stageInput": "link"
          }
        ],
        "sbg:project": "bix-demo/sbgtools-demo",
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "arguments": [],
        "stdout": "",
        "sbg:publisher": "sbg",
        "description": "This app detects quality score format used in input FASTQ file. FASTQ quality score is then converted to standard Sanger quality score if conversion is required. It is basically a compact merged version of \"SBG Fastq Quality Detector\" and \"SBG Fastq Quality Converter\", created to speed up the execution of pipelines. Supported source formats are: Solexa, Illumina 1.3, Illumina 1.5 and Illumina 1.8.",
        "baseCommand": [
          {
            "class": "Expression",
            "script": "{\n  qscale = \"to be detected\"\n  \n  if ($job.inputs.fastq.metadata)\n      if ($job.inputs.fastq.metadata[\"quality_scale\"])\n      qscale = $job.inputs.fastq.metadata[\"quality_scale\"]  \n  \n  if ($job.inputs.used_quality_scale)\n    if ($job.inputs.used_quality_scale != null) \n      qscale = $job.inputs.used_quality_scale\n  \n  \n  if (qscale == \"sanger\" || qscale == \"illumina18\" ) \n  {// no conversion\n\treturn \"echo No conversion\"\n  }\n  else\n  {\n    return \"python sbg_fastq_quality_scale_adjuster.py\"\n  }\n}",
            "engine": "#cwl-js-engine"
          }
        ],
        "sbg:toolkit": "SBGTools",
        "sbg:projectName": "SBGTools - Demo New",
        "sbg:image_url": null,
        "requirements": [
          {
            "class": "CreateFileRequirement",
            "fileDef": [
              {
                "fileContent": "\"\"\"\nUsage:\n    sbg_fastq_quality_scale_adjuster.py --fastq FILE\n\nOptions:\n    -h, --help          Show this message.\n\n    -f, --fastq FILE    Input FASTQ file.\n\n\"\"\"\n\nfrom docopt import docopt\nimport os\nimport gzip\nimport itertools as it\nimport shutil\nimport sys\nfrom math import log10\nfrom subprocess import Popen\n\n\n\nargs = docopt(__doc__, version='1.0')\n\ninput_file = args['--fastq'] \n\nbase_name = input_file[input_file.rfind('/')+1:input_file.rfind('.') if input_file.rfind('.') != -1 else None]\nr_ext = input_file[input_file.rfind('.')+1:] if input_file.rfind('.') else \"\"\nl_ext = base_name.split('.')[-1].lower()\nif l_ext == 'fastq' or l_ext == 'fq':\n    if not r_ext == 'fastq' and not r_ext == 'fq':\n        base_name = base_name[:base_name.rfind('.')]\noutput_file = base_name + '.std.fastq'\n\n\n\"\"\"input and output names defined above\"\"\"\n\nclass myGzipFile(gzip.GzipFile):\n    def __enter__(self, *args, **kwargs):\n        if self.fileobj is None:\n            raise ValueError(\"I/O operation on closed GzipFile object\")\n        return self\n\n    def __exit__(self, *args, **kwargs):\n        self.close()\n\n\ndef extremes(a, b):\n    if a is False:\n        return b, b\n    return min(a[0], b), max(a[1], b)\n\n\ndef walk_qualities(f, sample_size=1000):\n    for i in xrange(sample_size * 4):\n        try:\n            line = f.next()\n        except StopIteration:\n            return\n        if i % 4 == 3:\n            yield line.rstrip(\"\\n\\r\")\n\n\ndef sniff(path):\n    with open(path, 'rb') as f:\n        gz = f.read(2) == '\\x1f\\x8b'\n    opn = myGzipFile if gz else open\n    with opn(path) as f:\n        return get_scale(*map(ord, reduce(extremes, it.chain(*walk_qualities(f)), False)))\n\n\ndef get_scale(ord_min, ord_max):\n    options = {\n        'illumina13': (64, 105),\n        'illumina15': (66, 105),\n        'sanger': (33, 126),\n        'solexa': (59, 105),\n    }\n    fits = [(k, v) for k, v in options.iteritems() if v[0] <= ord_min and v[1] >= ord_max]\n    if not fits:\n        message = 'Quality scale for range (%s, %s) not found.' % (ord_min, ord_max)\n        raise Exception(message)\n        # Return narrowest range\n    return reduce(lambda a, b: a if a[1][1] - a[1][0] < b[1][1] - b[1][0] else b, fits)[0]\n\ndef qsolexa(x):\n    return chr(int(round(10 * log10(10.0**((ord(x)-64)/10.0)+1))) + 33)\n\n\ndef qillumina13(x):\n    return chr(ord(x) - 31)\n\n\ndef qillumina15(x):\n    return chr(ord(x) - 31) if ord(x)-64 > 2 else chr(33)\n\n\ndef qillumina18(x):\n    return x\n\n\n\"\"\"detect quality scale format\"\"\"\n\nmeta_qual = sniff(input_file)\n\n\n\"\"\"adjust quality scale if needed\"\"\"\n\nif meta_qual == 'illumina13':\n    proc = qillumina13\nelif meta_qual == 'illumina15':\n    proc = qillumina15\nelif meta_qual == 'solexa':\n    proc = qsolexa\nelse:\n    proc = None\n\nif proc == qsolexa: \n    with open(input_file, 'rb') as f:\n        gz = f.read(2) == '\\x1f\\x8b'\n    open_gz = myGzipFile if gz else open\n    with open(output_file, 'w') as out:\n        for i, line in enumerate(open_gz(input_file)):\n            if i % 4 == 3:\n                line = line.strip()\n                converted = ''.join(map(proc, line))\n                out.write(converted + '\\n')\n            else:\n                out.write(line)\n    contents = \"Original fastq quality scale format was \" + meta_qual + \", and is converted to illumina18.\\n\"\nelif proc is not None: #seqtk converter from illumina13-15\n    with open(input_file, 'rb') as f:\n        gz = f.read(2) == '\\x1f\\x8b'\n    f.close()\n    if gz:#gunzip file to temp.fastq\n        temp_file = 'temp.fastq'\n        \n        inF = gzip.GzipFile(input_file, 'rb')\n        outF = file(temp_file, 'wb')\n        \n        newline = ''\n        for lines in inF:\n            outF.write(newline + lines.rstrip('\\n'))\n            newline = '\\n'\n            \n        inF.close()\n        outF.close()\n\n    else:\n        temp_file = input_file\n\n    cmd = ['seqtk','seq','-Q64','-V',temp_file,'>',output_file]\n    with open(output_file, 'w') as out:\n        p = Popen(cmd, stdout = out)\n        p.communicate()\n    contents = \"Original fastq quality scale format was \" + meta_qual + \", and is converted to illumina18.\\n\"\nelse:\n    if input_file.rfind(\".gz\") == len(input_file) - 3:\n        output_file = output_file + \".gz\"\n    #shutil.copyfile(input_file, output_file)\n    #os.symlink(input_file, output_file)\n    os.rename(input_file, output_file)\n    contents = \"Original fastq quality scale format was illumina18. No conversion performed.\\n\"\n\nsys.stderr.write(contents) #Write conversion to error log",
                "filename": "sbg_fastq_quality_scale_adjuster.py"
              }
            ]
          },
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:revision": 15,
        "sbg:categories": [
          "Converters",
          "FASTQ-Processing"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1511876318,
        "sbg:id": "admin/sbg-public-data/sbg-fastq-quality-adjuster/15",
        "temporaryFailCodes": [],
        "sbg:revisionNotes": "No change"
      },
      "id": "#SBG_FASTQ_Quality_Adjuster",
      "sbg:y": 213.33336724175462
    },
    {
      "sbg:x": 1256.6667480468755,
      "inputs": [
        {
          "id": "#GATK_CollectHsMetrics.verbosity"
        },
        {
          "id": "#GATK_CollectHsMetrics.validation_stringency"
        },
        {
          "id": "#GATK_CollectHsMetrics.use_jdk_inflater"
        },
        {
          "id": "#GATK_CollectHsMetrics.use_jdk_deflater"
        },
        {
          "source": [
            "#GATK_BedToIntervalList.output"
          ],
          "id": "#GATK_CollectHsMetrics.target_intervals"
        },
        {
          "id": "#GATK_CollectHsMetrics.sample_size"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#GATK_CollectHsMetrics.reference_sequence"
        },
        {
          "id": "#GATK_CollectHsMetrics.quiet"
        },
        {
          "id": "#GATK_CollectHsMetrics.per_target_coverage"
        },
        {
          "id": "#GATK_CollectHsMetrics.per_base_coverage"
        },
        {
          "id": "#GATK_CollectHsMetrics.near_distance"
        },
        {
          "id": "#GATK_CollectHsMetrics.minimum_mapping_quality"
        },
        {
          "id": "#GATK_CollectHsMetrics.minimum_base_quality"
        },
        {
          "id": "#GATK_CollectHsMetrics.metric_accumulation_level"
        },
        {
          "id": "#GATK_CollectHsMetrics.memory_per_job",
          "default": 4096
        },
        {
          "id": "#GATK_CollectHsMetrics.memory_overhead_per_job"
        },
        {
          "id": "#GATK_CollectHsMetrics.max_records_in_ram"
        },
        {
          "source": [
            "#Sambamba_Merge.merged_bam"
          ],
          "id": "#GATK_CollectHsMetrics.input"
        },
        {
          "id": "#GATK_CollectHsMetrics.ga4_gh_client_secrets"
        },
        {
          "id": "#GATK_CollectHsMetrics.create_md5_file"
        },
        {
          "id": "#GATK_CollectHsMetrics.create_index"
        },
        {
          "id": "#GATK_CollectHsMetrics.coverage_cap"
        },
        {
          "id": "#GATK_CollectHsMetrics.compression_level"
        },
        {
          "id": "#GATK_CollectHsMetrics.clip_overlapping_reads"
        },
        {
          "id": "#GATK_CollectHsMetrics.bait_set_name"
        },
        {
          "source": [
            "#GATK_BedToIntervalList.output"
          ],
          "id": "#GATK_CollectHsMetrics.bait_intervals"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_CollectHsMetrics.output"
        }
      ],
      "run": {
        "x": 1256.6667480468755,
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/teodora_aleksic/gatk:4.0.2.0",
            "dockerImageId": ""
          }
        ],
        "sbg:latestRevision": 8,
        "sbg:cmdPreview": "/opt/gatk --java-options \"-Xmx3M\" CollectHsMetrics --BAIT_INTERVALS /path/to/bait.ext --INPUT /path/to/input.ext --TARGET_INTERVALS /path/to/target.ext --OUTPUT input.txt",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 11
          },
          "inputs": {
            "target_intervals": {
              "path": "/path/to/target.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "TARGET_INTERVALS": {
              "path": "/path/to/target_intervals.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "USE_JDK_DEFLATER": false,
            "memory_per_job": 3,
            "memory_overhead_per_job": 8,
            "input": {
              "path": "/path/to/input.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "QUIET": false,
            "CREATE_MD5_FILE": false,
            "CLIP_OVERLAPPING_READS": false,
            "INPUT": {
              "path": "/path/to/input.bam",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".bai"
                }
              ]
            },
            "BAIT_INTERVALS": {
              "path": "/path/to/bait_intervals.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "USE_JDK_INFLATER": false,
            "CREATE_INDEX": false,
            "bait_intervals": {
              "path": "/path/to/bait.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            }
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513597832,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/8",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513599323,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/9",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786593,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/10",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513788187,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/11",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1514458047,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/12",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587907,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/13",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517403805,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/15",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517405241,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/16",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946147,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/17",
            "sbg:revision": 8
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  read_name = [].concat($job.inputs.input)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  read_namebase = read_name.slice(0, read_name.length-1).join('.')\n  return read_namebase + '.txt'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--OUTPUT"
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VERBOSITY",
              "position": 0
            },
            "id": "#verbosity",
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "INFO",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VALIDATION_STRINGENCY",
              "position": 0
            },
            "id": "#validation_stringency",
            "label": "Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "STRICT",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "sbg:altPrefix": "",
            "id": "#use_jdk_inflater",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_INFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use the JDK Inflater instead of the Intel Inflater for reading compressed input Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "id": "#use_jdk_deflater",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_DEFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use the JDK Deflater instead of the Intel Deflater for writing compressed output Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--TARGET_INTERVALS",
              "position": 0
            },
            "sbg:fileTypes": "INTERVAL_LIST",
            "label": "Target Intervals",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#target_intervals",
            "required": true,
            "type": [
              "File"
            ],
            "description": "An interval list file that contains the locations of the targets. This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--SAMPLE_SIZE",
              "position": 0
            },
            "id": "#sample_size",
            "label": "Sample Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "10000",
            "type": [
              "null",
              "int"
            ],
            "description": "Sample Size used for Theoretical Het Sensitivity sampling. Default is 10000. Default value: 10000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "position": 0,
              "prefix": "--REFERENCE_SEQUENCE"
            },
            "sbg:fileTypes": "FASTA, FA",
            "label": "Reference Sequence",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#reference_sequence",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence file. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "id": "#quiet",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--QUIET",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--PER_TARGET_COVERAGE",
              "position": 0
            },
            "id": "#per_target_coverage",
            "label": "Per Target Coverage",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "null",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "An optional file to output per target coverage information to. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--PER_BASE_COVERAGE",
              "position": 0
            },
            "id": "#per_base_coverage",
            "label": "Per Base Coverage",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "null",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "An optional file to output per base coverage information to. The per-base file contains one line per target base and can grow very large. It is not recommended for use with large target sets. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--NEAR_DISTANCE",
              "position": 0
            },
            "id": "#near_distance",
            "label": "Near Distance",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "250",
            "type": [
              "null",
              "int"
            ],
            "description": "The maximum distance between a read and the nearest probe/bait/amplicon for the read to be considered 'near probe' and included in percent selected. Default value: 250."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MINIMUM_MAPPING_QUALITY",
              "position": 0
            },
            "id": "#minimum_mapping_quality",
            "label": "Minimum Mapping Quality",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "20",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum mapping quality for a read to contribute coverage. Default value: 20."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MINIMUM_BASE_QUALITY",
              "position": 0
            },
            "id": "#minimum_base_quality",
            "label": "Minimum Base Quality",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "20",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum base quality for a base to contribute coverage. Default value: 20."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--METRIC_ACCUMULATION_LEVEL",
              "position": 0
            },
            "id": "#metric_accumulation_level",
            "label": "Metric Accumulation Level",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "[ALL_READS]",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ALL_READS",
                  "SAMPLE",
                  "LIBRARY",
                  "READ_GROUP"
                ],
                "type": "enum"
              }
            ],
            "description": "The level(s) at which to accumulate metrics. This argument may be specified 0 or more times. Default value: [ALL_READS]. Possible values: {ALL_READS, SAMPLE, LIBRARY, READ_GROUP}."
          },
          {
            "label": "Memory Per Job",
            "sbg:category": "Execution",
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "description": "Memory Per Job",
            "sbg:stageInput": null
          },
          {
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution",
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "description": "Memory Overhead Per Job",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MAX_RECORDS_IN_RAM",
              "position": 0
            },
            "id": "#max_records_in_ram",
            "label": "Max Records In Ram",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "500000",
            "type": [
              "null",
              "int"
            ],
            "description": "When writing SAM files that need to be sorted, this will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort a SAM file, and increases the amount of RAM needed. Default value: 500000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".bai"
              ],
              "position": 0,
              "prefix": "--INPUT"
            },
            "sbg:fileTypes": "BAM",
            "label": "Input",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#input",
            "required": true,
            "type": [
              "File"
            ],
            "description": "An aligned SAM or BAM file. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--GA4GH_CLIENT_SECRETS",
              "position": 0
            },
            "id": "#ga4_gh_client_secrets",
            "label": "Ga4 Gh Client Secrets",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "client_secrets",
            "type": [
              "null",
              "string"
            ],
            "description": "Google Genomics API client_secrets.json file path. Default value: client_secrets.json."
          },
          {
            "sbg:altPrefix": "",
            "id": "#create_md5_file",
            "label": "Create Md5 File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_MD5_FILE",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to create an MD5 digest for any BAM or FASTQ files created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "id": "#create_index",
            "label": "Create Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_INDEX",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to create a BAM index when writing a coordinate-sorted BAM file. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--COVERAGE_CAP",
              "position": 0
            },
            "id": "#coverage_cap",
            "label": "Coverage Cap",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "200",
            "type": [
              "null",
              "int"
            ],
            "description": "To set a max coverage limit for Theoretical Sensitivity calculations. Default is 200. Default value: 200."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--COMPRESSION_LEVEL",
              "position": 0
            },
            "id": "#compression_level",
            "label": "Compression Level",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "5",
            "type": [
              "null",
              "int"
            ],
            "description": "Compression level for all compressed files created (e.g. BAM and GELI). Default value: 5."
          },
          {
            "sbg:altPrefix": "",
            "id": "#clip_overlapping_reads",
            "label": "Clip Overlapping Reads",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CLIP_OVERLAPPING_READS",
              "position": 0
            },
            "sbg:toolDefaultValue": "true",
            "type": [
              "null",
              "boolean"
            ],
            "description": "True if we are to clip overlapping reads, false otherwise. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--BAIT_SET_NAME",
              "position": 0
            },
            "id": "#bait_set_name",
            "label": "Bait Set Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "null",
            "type": [
              "null",
              "string"
            ],
            "description": "Bait set name. If not provided it is inferred from the filename of the bait intervals. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--BAIT_INTERVALS",
              "position": 0
            },
            "sbg:fileTypes": "INTERVAL_LIST",
            "label": "Bait Intervals",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#bait_intervals",
            "required": true,
            "type": [
              "File"
            ],
            "description": "An interval list file that contains the locations of the baits used. This argument must be specified at least once. Required."
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "teodora.aleksic",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/opt/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "CollectHsMetrics"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "TXT",
            "label": "Output metrics",
            "id": "#output",
            "outputBinding": {
              "glob": "*.txt"
            },
            "type": [
              "null",
              "File"
            ],
            "description": "Hybrid-selection (HS) metrics file."
          }
        ],
        "sbg:revision": 8,
        "sbg:copyOf": "vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/17",
        "sbg:createdOn": 1513597832,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": -845.9739379882814,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-collecthsmetrics/8",
        "description": "Collects hybrid-selection (HS) metrics for a SAM or BAM file.\n\n###**Overview**  \n\nCollects hybrid-selection (HS) metrics for a SAM or BAM file.  This tool takes a SAM/BAM file input and collects metrics that are specific for sequence datasets generated through hybrid-selection. Hybrid-selection (HS) is the most commonly used technique to capture exon-specific sequences for targeted sequencing experiments such as exome sequencing; for more information, please see the corresponding [GATK Dictionary entry](http://www.broadinstitute.org/gatk/guide/article?id=6331).\n\nThis tool requires an aligned SAM or BAM file as well as bait and target interval files in Picard interval list format. You should use the bait and interval files that correspond to the capture kit that was used to generate the capture libraries for sequencing, which can generally be obtained from the kit manufacturer. If the baits and target intervals are provided in BED format, you can convert them to the Picard interval list format using Picard's [BedToInterval tool](http://broadinstitute.github.io/picard/command-line-overview.html#BedToIntervalList). If a reference sequence is provided, this program will calculate both AT_DROPOUT and GC_DROPOUT metrics. Dropout metrics are an attempt to measure the reduced representation of reads, in regions that deviate from 50% G/C content. This reduction in the number of aligned reads is due to the increased numbers of errors associated with sequencing regions with excessive or deficient numbers of G/C bases, ultimately leading to poor mapping efficiencies and lowcoverage in the affected regions. If you are interested in getting G/C content and mean sequence depth information for every target interval, use the PER_TARGET_COVERAGE option.\n\nNote: Metrics labeled as percentages are actually expressed as fractions!\n\nPlease see [CollectHsMetrics](http://broadinstitute.github.io/picard/picard-metric-definitions.html#HsMetrics) for detailed descriptions of the output metrics produced by this tool.\n\n###**Input**  \n\nAn aligned SAM or BAM file.\nAn interval list file that contains the locations of the baits used.\n\n###**Output**  \n\nA metrics file.\n\n###**Usage examples**   \n\n    ./gatk-launch CollectHsMetrics \\\n     \t -I=input.bam \\\n     \t -O=hs_metrics.txt \\\n     \t -R=reference_sequence.fasta \\\n     \t -BAIT_INTERVALS=bait.interval_list \\\n     \t -TARGET_INTERVALS=target.interval_list\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-collecthsmetrics/17",
        "label": "GATK CollectHsMetrics",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1520946147,
        "sbg:id": "admin/sbg-public-data/gatk-collecthsmetrics/8",
        "temporaryFailCodes": [],
        "sbg:wrapperAuthor": "teodora.aleksic"
      },
      "id": "#GATK_CollectHsMetrics",
      "sbg:y": -845.9739379882814
    },
    {
      "sbg:x": 793.0001627604171,
      "inputs": [
        {
          "id": "#GATK_BedToIntervalList.verbosity"
        },
        {
          "id": "#GATK_BedToIntervalList.validation_stringency"
        },
        {
          "id": "#GATK_BedToIntervalList.use_jdk_inflater"
        },
        {
          "id": "#GATK_BedToIntervalList.use_jdk_deflater"
        },
        {
          "id": "#GATK_BedToIntervalList.unique"
        },
        {
          "id": "#GATK_BedToIntervalList.sort"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#GATK_BedToIntervalList.reference_sequence"
        },
        {
          "id": "#GATK_BedToIntervalList.quiet"
        },
        {
          "id": "#GATK_BedToIntervalList.max_records_in_ram"
        },
        {
          "source": [
            "#intervals_file"
          ],
          "id": "#GATK_BedToIntervalList.input"
        },
        {
          "id": "#GATK_BedToIntervalList.ga4_gh_client_secrets"
        },
        {
          "id": "#GATK_BedToIntervalList.create_md5_file"
        },
        {
          "id": "#GATK_BedToIntervalList.create_index"
        },
        {
          "id": "#GATK_BedToIntervalList.compression_level"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_BedToIntervalList.output"
        }
      ],
      "run": {
        "x": 793.0001627604171,
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/teodora_aleksic/gatk:4.0.2.0",
            "dockerImageId": ""
          }
        ],
        "sbg:latestRevision": 4,
        "sbg:cmdPreview": "/opt/gatk --java-options \"-Xmx2048M\" BedToIntervalList --INPUT /path/to/input.bed --REFERENCE_SEQUENCE /path/to/reference.fa --OUTPUT input.interval_list --SEQUENCE_DICTIONARY /path/to/reference.dict",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "reference_sequence": {
              "path": "/path/to/reference.fa",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "CREATE_MD5_FILE": false,
            "SORT": false,
            "UNIQUE": false,
            "INPUT": {
              "path": "/path/to/intervals.bed",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "USE_JDK_INFLATER": false,
            "USE_JDK_DEFLATER": false,
            "input": {
              "path": "/path/to/input.bed",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "REFERENCE_SEQUENCE": {
              "path": "/path/to/reference.fasta",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "CREATE_INDEX": false,
            "QUIET": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513597828,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-bedtointervallist/5",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587891,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-bedtointervallist/6",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517403798,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-bedtointervallist/8",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517405244,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-bedtointervallist/9",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946161,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-bedtointervallist/10",
            "sbg:revision": 4
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  read_name = [].concat($job.inputs.input)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  read_namebase = read_name.slice(0, read_name.length-1).join('.')\n  return read_namebase + '.interval_list'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--OUTPUT"
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n\treference_path = $job.inputs.reference_sequence.path\n    dict_path = reference_path.split('.').slice(0, -1).join('.') + '.dict'\n    return dict_path\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--SEQUENCE_DICTIONARY"
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VERBOSITY",
              "position": 0
            },
            "id": "#verbosity",
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "INFO",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VALIDATION_STRINGENCY",
              "position": 0
            },
            "id": "#validation_stringency",
            "label": "Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "STRICT",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "sbg:altPrefix": "",
            "id": "#use_jdk_inflater",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_INFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use the JDK Inflater instead of the Intel Inflater for reading compressed input Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "id": "#use_jdk_deflater",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_DEFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use the JDK Deflater instead of the Intel Deflater for writing compressed output Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "id": "#unique",
            "label": "Unique",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--UNIQUE",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, unique the output interval list by merging overlapping regions, before writing it (implies sort=true). Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "id": "#sort",
            "label": "Sort",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--SORT",
              "position": 0
            },
            "sbg:toolDefaultValue": "true",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, sort the output interval list before writing it. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                "^.dict"
              ],
              "position": 0,
              "prefix": "--REFERENCE_SEQUENCE"
            },
            "sbg:fileTypes": "FASTA, FA",
            "label": "Reference Sequence",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": null,
            "id": "#reference_sequence",
            "required": true,
            "type": [
              "File"
            ],
            "description": "Reference sequence file. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "id": "#quiet",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--QUIET",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MAX_RECORDS_IN_RAM",
              "position": 0
            },
            "id": "#max_records_in_ram",
            "label": "Max Records In Ram",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "500000",
            "type": [
              "null",
              "int"
            ],
            "description": "When writing SAM files that need to be sorted, this will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort a SAM file, and increases the amount of RAM needed. Default value: 500000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--INPUT",
              "position": 0
            },
            "sbg:fileTypes": "BED",
            "label": "Input",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#input",
            "required": true,
            "type": [
              "File"
            ],
            "description": "The input BED file Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--GA4GH_CLIENT_SECRETS",
              "position": 0
            },
            "id": "#ga4_gh_client_secrets",
            "label": "Ga4 Gh Client Secrets",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "client_secrets",
            "type": [
              "null",
              "string"
            ],
            "description": "Google Genomics API client_secrets.json file path. Default value: client_secrets.json."
          },
          {
            "sbg:altPrefix": "",
            "id": "#create_md5_file",
            "label": "Create Md5 File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_MD5_FILE",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to create an MD5 digest for any BAM or FASTQ files created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "id": "#create_index",
            "label": "Create Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_INDEX",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to create a BAM index when writing a coordinate-sorted BAM file. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--COMPRESSION_LEVEL",
              "position": 0
            },
            "id": "#compression_level",
            "label": "Compression Level",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "5",
            "type": [
              "null",
              "int"
            ],
            "description": "Compression level for all compressed files created (e.g. BAM and GELI). Default value: 5."
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "teodora.aleksic",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/opt/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "BedToIntervalList"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "INTERVAL_LIST",
            "label": "Interval List",
            "id": "#output",
            "outputBinding": {
              "glob": "*.interval_list"
            },
            "type": [
              "null",
              "File"
            ],
            "description": "The output Picard Interval List"
          }
        ],
        "sbg:revision": 4,
        "sbg:copyOf": "vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-bedtointervallist/10",
        "sbg:createdOn": 1513597828,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": -841.6406962076826,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-bedtointervallist/4",
        "description": "Converts a BED file to a Picard Interval List.\n\n###**Overview**  \n\nThis tool provides easy conversion from BED to the Picard interval_list format which is required by many Picard processing tools. Note that the coordinate system of BED files is such that the first base or position in a sequence is numbered \"0\", while in interval list files it is numbered \"1\". BED files contain sequence data displayed in a flexible format that includes nine optional fields, in addition to three required fields within the annotation tracks. The required fields of a BED file include:\n\n- chrom - The name of the chromosome (e.g. chr20) or scaffold (e.g. scaffold10671)\n- chromStart - The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered \"0\"\n- chromEnd - The ending position of the feature in the chromosome or scaffold.  The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99\n\nIn each annotation track, the number of fields per line must be consistent throughout a data set. For additional information regarding BED files and the annotation field options, please see: [FAQformat](http://genome.ucsc.edu/FAQ/FAQformat.html#format1). Interval list files contain sequence data distributed into intervals. The interval list file format is relatively simple and reflects the SAM alignment format to a degree. A SAM style header must be present in the file that lists the sequence records against which the intervals are described. After the header, the file then contains records, one per line in plain text format with the following values tab-separated:\n\n- Sequence name (SN) - The name of the sequence in the file for identification purposes, can be chromosome number e.g. chr20\n- Start position - Interval start position (starts at +1)\n- End position - Interval end position (1-based, end inclusive)\n- Strand - Indicates +/- strand for the interval (either + or -)\n- Interval name - (Each interval should have a unique name)\n\nThis tool requires a sequence dictionary, provided with the SEQUENCE_DICTIONARY or SD argument. The value given to this argument can be any of the following:\n\n- A file with .dict extension generated using Picard's CreateSequenceDictionaryTool\n- A reference.fa or reference.fasta file with a reference.dict in the same directory\n- Another IntervalList with @SQ lines in the header from which to generate a dictionary\n- A VCF that contains #contig lines from which to generate a sequence dictionary\n- A SAM or BAM file with @SQ lines in the header from which to generate a dictionary\n\n###**Input**  \n\nThe input BED file.\nThe sequence dictionary, or BAM/VCF/IntervalList from which a dictionary can be extracted.\n\n###**Output**  \n\nThe output Picard Interval List.\n\n###**Usage examples**   \n\n    ./gatk-launch BedToIntervalList \\\n    \t-I=input.bed \\\n    \t-O=list.interval_list \\\n    \t-SD=reference_sequence.dict\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-bedtointervallist/10",
        "label": "GATK BedToIntervalList",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1520946161,
        "sbg:id": "h-46fd41d6/h-bdf0459e/h-7e89785d/0",
        "temporaryFailCodes": [],
        "sbg:wrapperAuthor": "teodora.aleksic"
      },
      "id": "#GATK_BedToIntervalList",
      "sbg:y": -841.6406962076826
    },
    {
      "sbg:x": 2422.262809827153,
      "inputs": [
        {
          "id": "#SNP_GATK_VariantFiltration.verbosity"
        },
        {
          "source": [
            "#SNP_GATK_SelectVariants.select_variants_vcf"
          ],
          "id": "#SNP_GATK_VariantFiltration.variant"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.use_jdk_inflater"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.use_jdk_deflater"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.split_filter_expressions"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.set_filtered_gt_to_nocall"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.seconds_between_progress_updates"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.sample"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#SNP_GATK_VariantFiltration.reference"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.read_validation_stringency"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.read_name"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.read_index"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.read_filter"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.quiet"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.pl_filter_name"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.missing_values_in_expressions_should_evaluate_as_failing"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.minimum_mapping_quality"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.min_read_length"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.memory_per_job",
          "default": 2048
        },
        {
          "id": "#SNP_GATK_VariantFiltration.memory_overhead_per_job"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.maximum_mapping_quality"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.max_read_length"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.max_fragment_length"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.mask_name"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.mask_extension"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.mask"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.library"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.lenient"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.keep_reverse"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.keep_read_group"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.invert_genotype_filter_expression"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.invert_filter_expression"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.invalidate_previous_filters"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.intervals_string"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.intervals_file"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.interval_set_rule"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.interval_padding"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.interval_merging_rule"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.interval_exclusion_padding"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.input"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.genotype_filter_name"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.genotype_filter_expression"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.gcs_max_retries"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.filter_too_short"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.filter_not_in_mask"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.filter_name",
          "default": "GATKBestPracticeSNPFilter"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.filter_expression",
          "default": [
            "QD < 2.0",
            "MQ < 40.0",
            "FS > 60.0",
            "MQRankSum < -12.5",
            "ReadPosRankSum < -8.0",
            "SOR > 3.0"
          ]
        },
        {
          "id": "#SNP_GATK_VariantFiltration.exclude_intervals_string"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.exclude_intervals_file"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.disable_tool_default_read_filters"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.disable_sequence_dictionary_validation"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.disable_read_filter"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.disable_bam_index_caching"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.create_output_variant_md5"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.create_output_variant_index"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.create_output_bam_md5"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.create_output_bam_index"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.cluster_window_size"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.cluster_size"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.cloud_prefetch_buffer"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.cloud_index_prefetch_buffer"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.black_listed_lanes"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.black_list"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.ambig_filter_frac"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.ambig_filter_bases"
        },
        {
          "id": "#SNP_GATK_VariantFiltration.add_output_sam_program_record"
        }
      ],
      "outputs": [
        {
          "id": "#SNP_GATK_VariantFiltration.filtered_vcf"
        }
      ],
      "run": {
        "x": 2422.262809827153,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/teodora_aleksic/gatk:4.0.2.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 21,
        "sbg:cmdPreview": "/opt/gatk --java-options \"-Xmx2048M\" VariantFiltration --variant /path/to/variant.ext --reference /path/to/reference.ext  --filter-name \"qd,rank\" --filter-expression \"qd<2 || rank>10\"   --output variant.vcf",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "genotypeFilterName": "",
            "bqsr": {
              "path": "/path/to/bqsr.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "genotype_filter_expression": [],
            "memory_overhead_per_job": 0,
            "exclude_intervals_string": "",
            "genotype_filter_name": "",
            "ambigFilterBases": null,
            "secondsBetweenProgressUpdates": null,
            "filterName": "",
            "QUIET": false,
            "variant": {
              "path": "/path/to/variant.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".idx"
                }
              ]
            },
            "lenient": false,
            "setFilteredGtToNocall": false,
            "memory_per_job": 2048,
            "variants": [
              {
                "path": "varaint.vcf"
              }
            ],
            "createOutputBamMD5": false,
            "validation_strictness": null,
            "clusterWindowSize": 35,
            "excludeIntervals": [
              {
                "path": "/path/to/excludeIntervals-1.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/excludeIntervals-2.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "disableToolDefaultReadFilters": false,
            "addOutputSAMProgramRecord": false,
            "filterNotInMask": false,
            "invertFilterExpression": false,
            "invalidatePreviousFilters": false,
            "filterExpression": [
              "V1 != 1.0",
              "V2 == 2.0",
              "V3 > 3",
              "V4 >= 4",
              "V5 < 5",
              "V6 <= 6"
            ],
            "keepReverse": false,
            "disableBamIndexCaching": false,
            "clusterSize": 3,
            "use_jdk_inflater": false,
            "createOutputVariantIndex": false,
            "splitFilterExpressions": true,
            "unsafe": null,
            "filter_name": [
              "qd",
              "rank"
            ],
            "pedigree": {
              "path": "/path/to/pedigree.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "gcs_max_retries": null,
            "genotypeFilterExpression": null,
            "disableSequenceDictionaryValidation": false,
            "filter_not_in_mask": false,
            "invertGenotypeFilterExpression": false,
            "createOutputBamIndex": false,
            "use_jdk_deflater": false,
            "createOutputVariantMD5": false,
            "filter_expression": [
              "qd<2",
              "rank>10"
            ],
            "invert_criteria": true,
            "invert_selection": true,
            "no_cmdline_in_header": true,
            "no_call": true,
            "intervals_string": "",
            "intervals": "intervals-string-value",
            "reference": {
              "path": "/path/to/reference.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "dontRequireSoftClipsBothEnds": false,
            "missingValuesInExpressionsShouldEvaluateAsFailing": false,
            "interval_merging_rule": null
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296584,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/17",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887439,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/18",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718056,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/19",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405206,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/22",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105746,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/23",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1505747526,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/25",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508243030,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/26",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508247186,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/27",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508251764,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/28",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488847,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/29",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1509714113,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/34",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1509721571,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/35",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522938,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/36",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786633,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/37",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515588129,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/46",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590613,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/48",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599033,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/50",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516622352,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/51",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516625354,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/52",
            "sbg:revision": 18
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517403818,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/54",
            "sbg:revision": 19
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648209,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/55",
            "sbg:revision": 20
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946077,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/56",
            "sbg:revision": 21
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  read_name = [].concat($job.inputs.variant)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  read_namebase = read_name.slice(0, read_name.length-1).join('.')\n  return read_namebase + '.vcf'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output",
            "position": 1
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{ \n    /** Extracts filter name from expression */\n    function getVariableName(filterExpression){\n        var expressions = ['!=', '==', '>=', '<=', '>', '<']\n\n        for (var i = 0; i < expressions.length; i++) {\n            var indexOf = filterExpression.indexOf(expressions[i])\n\n            if (indexOf >= 0)\n                return filterExpression.slice(0, indexOf).trim()\n        }\n\n        return ''\n    }\n\n    /** Combines multiple filters into a new filter name */\n    function getFilterName(filterExpressions){\n        var newFilterName = ''\n\n        for (var i = 0; i < filterExpressions.length; i++) {\n            var variableName = getVariableName(filterExpressions[i])\n\n            newFilterName = newFilterName ? (newFilterName + '-' + variableName) : variableName\n        }\n\n        return newFilterName\n    }\n\n    filterName = $job.inputs.filter_name\n    filterExpressions = $job.inputs.filter_expression\n    splitFilterExpressions = $job.inputs.split_filter_expressions\n    \n    // Adds filter expressions to the command line\n    if (filterExpressions && filterExpressions.length > 0) \n    {  \n        if (splitFilterExpressions) // Adds each expression as a separate filter\n        {\n            cmd = []\n\n            for (i = 0; i < filterExpressions.length; i++) \n            {\n                var variableName = getVariableName(filterExpressions[i])\n\n                cmd.push('--filter-name')\n                cmd.push('\"' + variableName + '\"')\n                cmd.push('--filter-expression')\n                cmd.push('\"' + filterExpressions[i] + '\"')\n            }\n\n            return cmd.join(' ')\n        }\n        else // Adds all expressions as a single filter\n        { \n            filterName = filterName ? filterName : getFilterName(filterExpressions)\n\n            var expressions = []\n\n            for (var i = 0; i < filterExpressions.length; i++) \n            {\n                expressions.push(filterExpressions[i])\n\n                if (i < filterExpressions.length - 1)\n                expressions.push('||')\n            }\n\n            expressions = expressions.join(' ').trim()\n            expressions = '\"' + expressions + '\"'\n\n            return(['--filter-name', \n                    '\"' +  filterName + '\"', \n                    '--filter-expression', \n                    expressions].join(' ').trim())   \n        }\n    }\n    else\n        return ''\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{ \n    /** Extracts filter name from expression */\n    function getVariableName(filterExpression){\n        var expressions = ['!=', '==', '>=', '<=', '>', '<']\n\n        for (var i = 0; i < expressions.length; i++) {\n            var indexOf = filterExpression.indexOf(expressions[i])\n\n            if (indexOf >= 0)\n                return filterExpression.slice(0, indexOf).trim()\n        }\n\n        return ''\n    }\n\n    /** Combines multiple filters into a new filter name */\n    function getFilterName(filterExpressions){\n        var newFilterName = ''\n\n        for (var i = 0; i < filterExpressions.length; i++) {\n            var variableName = getVariableName(filterExpressions[i])\n\n            newFilterName = newFilterName ? (newFilterName + '-' + variableName) : variableName\n        }\n\n        return newFilterName\n    }\n\n    filterName = $job.inputs.genotype_filter_name\n    filterExpressions = $job.inputs.genotype_filter_expression\n    splitFilterExpressions = $job.inputs.split_filter_expressions\n    \n    // Adds filter expressions to the command line\n    if (filterExpressions && filterExpressions.length > 0) \n    {  \n        if (splitFilterExpressions) // Adds each expression as a separate filter\n        {\n            cmd = []\n\n            for (i = 0; i < filterExpressions.length; i++) \n            {\n                var variableName = getVariableName(filterExpressions[i])\n\n                cmd.push('--genotype-filter-name')\n                cmd.push('\"' + variableName + '\"')\n                cmd.push('--genotype-filter-expression')\n                cmd.push('\"' + filterExpressions[i] + '\"')\n            }\n\n            return cmd.join(' ')\n        }\n        else // Adds all expressions as a single filter\n        { \n            filterName = filterName ? filterName : getFilterName(filterExpressions)\n\n            var expressions = []\n\n            for (var i = 0; i < filterExpressions.length; i++) \n            {\n                expressions.push(filterExpressions[i])\n\n                if (i < filterExpressions.length - 1)\n                expressions.push('||')\n            }\n\n            expressions = expressions.join(' ').trim()\n            expressions = '\"' + expressions + '\"'\n\n            return(['--genotype-filter-name', \n                    '\"' +  filterName + '\"', \n                    '--genotype-filter-expression', \n                    expressions].join(' ').trim())   \n        }\n    }\n    else\n        return ''\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#verbosity",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--variant",
              "position": 0
            },
            "sbg:fileTypes": "VCF,VCF.GZ",
            "label": "Variant",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#variant",
            "required": true,
            "type": [
              "File"
            ],
            "description": "A VCF file containing variants Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "id": "#use_jdk_inflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "id": "#use_jdk_deflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Split Filter Expressions",
            "sbg:category": "Optional Arguments",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#split_filter_expressions",
            "description": "Split filter expressions into separate tool arguments",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Set Filtered Gt To Nocall",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--set-filtered-gt-to-nocall",
              "position": 0
            },
            "id": "#set_filtered_gt_to_nocall",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Set filtered genotypes to no-call Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#seconds_between_progress_updates",
            "type": [
              "null",
              "float"
            ],
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#sample",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "position": 0,
              "prefix": "--reference"
            },
            "sbg:fileTypes": "FASTA,FA",
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "FASTA,FA",
            "id": "#reference",
            "required": true,
            "type": [
              "File"
            ],
            "description": "Reference sequence Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_validation_stringency",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#read_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep only reads with this read name Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_index",
            "type": [
              "null",
              "string"
            ],
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "id": "#quiet",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pl-filter-name",
              "position": 0
            },
            "label": "Pl Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#pl_filter_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with RG:PL attribute containing this string This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Missing Values In Expressions Should Evaluate As Failing",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--missing-values-in-expressions-should-evaluate-as-failing",
              "position": 0
            },
            "id": "#missing_values_in_expressions_should_evaluate_as_failing",
            "type": [
              "null",
              "boolean"
            ],
            "description": "When evaluating the JEXL expressions, missing values should be considered failing the expression Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#minimum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum mapping quality to keep (inclusive) Default value: 10."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#min_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at least equal to the specified value Default value: 1."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "description": "Memory per job",
            "label": "Memory Per Job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "description": "Memory overhead per job",
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#maximum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum mapping quality to keep (inclusive) Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at most equal to the specified value Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_fragment_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mask-name",
              "position": 0
            },
            "label": "Mask Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mask_name",
            "type": [
              "null",
              "string"
            ],
            "description": "The text to put in the FILTER field if a 'mask' is provided and overlaps with a variant call Default value: Mask."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mask-extension",
              "position": 0
            },
            "label": "Mask Extension",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mask_extension",
            "type": [
              "null",
              "int"
            ],
            "description": "How many bases beyond records from a provided 'mask' should variants be filtered Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mask",
              "position": 0
            },
            "label": "Mask",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mask",
            "type": [
              "null",
              "string"
            ],
            "description": "Input mask Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#library",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the library to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "id": "#lenient",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "id": "#keep_reverse",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#keep_read_group",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the read group to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Genotype Filter Expression",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-genotype-filter-expression",
              "position": 0
            },
            "id": "#invert_genotype_filter_expression",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Invert the selection criteria for --genotypeFilterExpression Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Filter Expression",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-filter-expression",
              "position": 0
            },
            "id": "#invert_filter_expression",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Invert the selection criteria for --filterExpression Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Invalidate Previous Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invalidate-previous-filters",
              "position": 0
            },
            "id": "#invalidate_previous_filters",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Remove previous filters applied to the VCF Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "id": "#intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#intervals_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-set-rule",
              "position": 0
            },
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_set_rule",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "UNION",
                  "INTERSECTION"
                ],
                "type": "enum"
              }
            ],
            "description": "Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-padding",
              "position": 0
            },
            "label": "Interval Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are including. Default value: 0."
          },
          {
            "sbg:altPrefix": "",
            "id": "#interval_merging_rule",
            "label": "Interval Merging Rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-merging-rule"
            },
            "sbg:toolDefaultValue": "ALL",
            "type": [
              "null",
              {
                "name": "interval_merging_rule",
                "symbols": [
                  "ALL",
                  "OVERLAPPING_ONLY"
                ],
                "type": "enum"
              }
            ],
            "description": "Interval merging rule for abutting intervals.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_exclusion_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0."
          },
          {
            "sbg:fileTypes": "BAM,SAM,CRAM",
            "label": "Input",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".bai"
              ],
              "position": 0,
              "prefix": "--input"
            },
            "id": "#input",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "BAM/SAM/CRAM file containing reads This argument may be specified 0 or more times. Default value: null."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#genotype_filter_name",
            "description": "Names to use for the list of sample/genotype filters (must be a 1-to-1 mapping); this name is put in the FILTER field for variants that get filtered This argument may be specified 0 or more times.",
            "label": "Genotype Filter Name",
            "sbg:category": "Optional Arguments"
          },
          {
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "id": "#genotype_filter_expression",
            "description": "One or more expression used with FORMAT (sample/genotype-level) fields to filter (see documentation guide for more info) This argument may be specified 0 or more times.",
            "label": "Genotype Filter Expression",
            "sbg:category": "Optional Arguments"
          },
          {
            "sbg:altPrefix": "",
            "id": "#gcs_max_retries",
            "label": "Gcs Max Retries",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--gcs-max-retries"
            },
            "sbg:toolDefaultValue": "20",
            "type": [
              "null",
              "int"
            ],
            "description": "If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#filter_too_short",
            "type": [
              "null",
              "int"
            ],
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30."
          },
          {
            "sbg:altPrefix": "",
            "label": "Filter Not In Mask",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-not-in-mask",
              "position": 0
            },
            "id": "#filter_not_in_mask",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Filter records NOT in given input mask. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#filter_name",
            "description": "This argument may be specified 0 or more times. Default value: null.",
            "label": "Filter Name",
            "sbg:category": "Optional Arguments"
          },
          {
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "id": "#filter_expression",
            "description": "One or more expression used with INFO fields to filter This argument may be specified 0 or more times. Default value: null.",
            "label": "Filter Expression",
            "sbg:category": "Optional Arguments"
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "id": "#exclude_intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "required": false,
            "id": "#exclude_intervals_file",
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "id": "#dont_require_soft_clips_both_ends",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "id": "#disable_tool_default_read_filters",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "id": "#disable_sequence_dictionary_validation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "id": "#disable_bam_index_caching",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "id": "#create_output_variant_md5",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "id": "#create_output_variant_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "id": "#create_output_bam_md5",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-index",
              "position": 0
            },
            "id": "#create_output_bam_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cluster-window-size",
              "position": 0
            },
            "label": "Cluster Window Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cluster_window_size",
            "type": [
              "null",
              "int"
            ],
            "description": "The window size (in bases) in which to evaluate clustered SNPs Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cluster-size",
              "position": 0
            },
            "label": "Cluster Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cluster_size",
            "type": [
              "null",
              "int"
            ],
            "description": "The number of SNPs which make up a cluster. Must be at least 2 Default value: 3."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_index_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_listed_lanes",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-list",
              "position": 0
            },
            "label": "Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_list",
            "type": [
              "null",
              "string"
            ],
            "description": "This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#ambig_filter_frac",
            "type": [
              "null",
              "float"
            ],
            "description": "Threshold fraction of non-regular bases (e.g. N) above which to filter Default value: 0.05."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "id": "#ambig_filter_bases",
            "type": [
              "null",
              "int"
            ],
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "id": "#add_output_sam_program_record",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "teodora.aleksic",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/opt/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "VariantFiltration"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "Filtered VCF",
            "id": "#filtered_vcf",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variant",
              "glob": "*.vcf",
              "secondaryFiles": [
                ".idx"
              ]
            },
            "type": [
              "File"
            ],
            "description": "File to which variants should be written."
          }
        ],
        "sbg:revision": 21,
        "sbg:copyOf": "vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/56",
        "sbg:createdOn": 1500296584,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 156.54773437692265,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-variantfiltration/21",
        "description": "Filter variant calls based on INFO and FORMAT annotations.\n\n###**Overview**  \n\nThis tool is designed for hard-filtering variant calls based on certain criteria. Records are hard-filtered by changing the value in the FILTER field to something other than PASS. Filtered records will be preserved in the output unless their removal is requested in the command line.\n\n###**Input**  \n\n- A VCF of variant calls to filter.\n- One or more filtering expressions and corresponding filter names.\n\n###**Output**  \n\nA filtered VCF in which passing variants are annotated as PASS and failing variants are annotated with the name(s) of the filter(s) they failed. \n\n###**Usage example**  \n\n    ./gatk-launch VariantFiltration \\\n   \t\t-R reference.fasta \\\n   \t\t-V input.vcf \\\n   \t\t-O output.vcf \\\n   \t\t--filterExpression \"AB < 0.2 || MQ0 > 50\" \\\n   \t\t--filterName \"my_filters\"\n\n###**Note** \n\nComposing filtering expressions can range from very simple to extremely complicated depending on what you're trying to do. Please see [this document](https://software.broadinstitute.org/gatk/documentation/article.php?id=1255) for more details on how to compose and use filtering expressions effectively.\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/56",
        "label": "SNP GATK VariantFiltration",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1520946077,
        "sbg:id": "admin/sbg-public-data/gatk-4-0-variantfiltration/21",
        "temporaryFailCodes": []
      },
      "id": "#SNP_GATK_VariantFiltration",
      "sbg:y": 156.54773437692265
    },
    {
      "sbg:x": 2429.1668445732903,
      "inputs": [
        {
          "id": "#INDEL_GATK_VariantFiltration.verbosity"
        },
        {
          "source": [
            "#INDEL_GATK_SelectVariants.select_variants_vcf"
          ],
          "id": "#INDEL_GATK_VariantFiltration.variant"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.use_jdk_inflater"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.use_jdk_deflater"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.split_filter_expressions"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.set_filtered_gt_to_nocall"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.seconds_between_progress_updates"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.sample"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#INDEL_GATK_VariantFiltration.reference"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.read_validation_stringency"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.read_name"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.read_index"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.read_filter"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.quiet"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.pl_filter_name"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.missing_values_in_expressions_should_evaluate_as_failing"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.minimum_mapping_quality"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.min_read_length"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.memory_per_job",
          "default": 2048
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.memory_overhead_per_job"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.maximum_mapping_quality"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.max_read_length"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.max_fragment_length"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.mask_name"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.mask_extension"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.mask"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.library"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.lenient"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.keep_reverse"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.keep_read_group"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.invert_genotype_filter_expression"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.invert_filter_expression"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.invalidate_previous_filters"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.intervals_string"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.intervals_file"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.interval_set_rule"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.interval_padding"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.interval_merging_rule"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.interval_exclusion_padding"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.input"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.genotype_filter_name"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.genotype_filter_expression"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.gcs_max_retries"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.filter_too_short"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.filter_not_in_mask"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.filter_name",
          "default": "GATKBestPracticeINDELFilter"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.filter_expression",
          "default": [
            "QD < 2.0",
            "FS > 200.0",
            "ReadPosRankSum < -20.0",
            "SOR > 10.0"
          ]
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.exclude_intervals_string"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.exclude_intervals_file"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.disable_tool_default_read_filters"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.disable_sequence_dictionary_validation"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.disable_read_filter"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.disable_bam_index_caching"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.create_output_variant_md5"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.create_output_variant_index"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.create_output_bam_md5"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.create_output_bam_index"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.cluster_window_size"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.cluster_size"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.cloud_prefetch_buffer"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.cloud_index_prefetch_buffer"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.black_listed_lanes"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.black_list"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.ambig_filter_frac"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.ambig_filter_bases"
        },
        {
          "id": "#INDEL_GATK_VariantFiltration.add_output_sam_program_record"
        }
      ],
      "outputs": [
        {
          "id": "#INDEL_GATK_VariantFiltration.filtered_vcf"
        }
      ],
      "run": {
        "x": 2429.1668445732903,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/teodora_aleksic/gatk:4.0.2.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 21,
        "sbg:cmdPreview": "/opt/gatk --java-options \"-Xmx2048M\" VariantFiltration --variant /path/to/variant.ext --reference /path/to/reference.ext  --filter-name \"qd,rank\" --filter-expression \"qd<2 || rank>10\"   --output variant.vcf",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "genotypeFilterName": "",
            "bqsr": {
              "path": "/path/to/bqsr.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "genotype_filter_expression": [],
            "memory_overhead_per_job": 0,
            "exclude_intervals_string": "",
            "genotype_filter_name": "",
            "ambigFilterBases": null,
            "secondsBetweenProgressUpdates": null,
            "filterName": "",
            "QUIET": false,
            "variant": {
              "path": "/path/to/variant.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".idx"
                }
              ]
            },
            "lenient": false,
            "setFilteredGtToNocall": false,
            "memory_per_job": 2048,
            "variants": [
              {
                "path": "varaint.vcf"
              }
            ],
            "createOutputBamMD5": false,
            "validation_strictness": null,
            "clusterWindowSize": 35,
            "excludeIntervals": [
              {
                "path": "/path/to/excludeIntervals-1.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/excludeIntervals-2.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "disableToolDefaultReadFilters": false,
            "addOutputSAMProgramRecord": false,
            "filterNotInMask": false,
            "invertFilterExpression": false,
            "invalidatePreviousFilters": false,
            "filterExpression": [
              "V1 != 1.0",
              "V2 == 2.0",
              "V3 > 3",
              "V4 >= 4",
              "V5 < 5",
              "V6 <= 6"
            ],
            "keepReverse": false,
            "disableBamIndexCaching": false,
            "clusterSize": 3,
            "use_jdk_inflater": false,
            "createOutputVariantIndex": false,
            "splitFilterExpressions": true,
            "unsafe": null,
            "filter_name": [
              "qd",
              "rank"
            ],
            "pedigree": {
              "path": "/path/to/pedigree.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "gcs_max_retries": null,
            "genotypeFilterExpression": null,
            "disableSequenceDictionaryValidation": false,
            "filter_not_in_mask": false,
            "invertGenotypeFilterExpression": false,
            "createOutputBamIndex": false,
            "use_jdk_deflater": false,
            "createOutputVariantMD5": false,
            "filter_expression": [
              "qd<2",
              "rank>10"
            ],
            "invert_criteria": true,
            "invert_selection": true,
            "no_cmdline_in_header": true,
            "no_call": true,
            "intervals_string": "",
            "intervals": "intervals-string-value",
            "reference": {
              "path": "/path/to/reference.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "dontRequireSoftClipsBothEnds": false,
            "missingValuesInExpressionsShouldEvaluateAsFailing": false,
            "interval_merging_rule": null
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296584,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/17",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887439,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/18",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718056,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/19",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405206,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/22",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105746,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/23",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1505747526,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/25",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508243030,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/26",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508247186,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/27",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508251764,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/28",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488847,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/29",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1509714113,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/34",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1509721571,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/35",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522938,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/36",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786633,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/37",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515588129,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/46",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590613,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/48",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599033,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/50",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516622352,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/51",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516625354,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/52",
            "sbg:revision": 18
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517403818,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/54",
            "sbg:revision": 19
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648209,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/55",
            "sbg:revision": 20
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946077,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/56",
            "sbg:revision": 21
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  read_name = [].concat($job.inputs.variant)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  read_namebase = read_name.slice(0, read_name.length-1).join('.')\n  return read_namebase + '.vcf'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output",
            "position": 1
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{ \n    /** Extracts filter name from expression */\n    function getVariableName(filterExpression){\n        var expressions = ['!=', '==', '>=', '<=', '>', '<']\n\n        for (var i = 0; i < expressions.length; i++) {\n            var indexOf = filterExpression.indexOf(expressions[i])\n\n            if (indexOf >= 0)\n                return filterExpression.slice(0, indexOf).trim()\n        }\n\n        return ''\n    }\n\n    /** Combines multiple filters into a new filter name */\n    function getFilterName(filterExpressions){\n        var newFilterName = ''\n\n        for (var i = 0; i < filterExpressions.length; i++) {\n            var variableName = getVariableName(filterExpressions[i])\n\n            newFilterName = newFilterName ? (newFilterName + '-' + variableName) : variableName\n        }\n\n        return newFilterName\n    }\n\n    filterName = $job.inputs.filter_name\n    filterExpressions = $job.inputs.filter_expression\n    splitFilterExpressions = $job.inputs.split_filter_expressions\n    \n    // Adds filter expressions to the command line\n    if (filterExpressions && filterExpressions.length > 0) \n    {  \n        if (splitFilterExpressions) // Adds each expression as a separate filter\n        {\n            cmd = []\n\n            for (i = 0; i < filterExpressions.length; i++) \n            {\n                var variableName = getVariableName(filterExpressions[i])\n\n                cmd.push('--filter-name')\n                cmd.push('\"' + variableName + '\"')\n                cmd.push('--filter-expression')\n                cmd.push('\"' + filterExpressions[i] + '\"')\n            }\n\n            return cmd.join(' ')\n        }\n        else // Adds all expressions as a single filter\n        { \n            filterName = filterName ? filterName : getFilterName(filterExpressions)\n\n            var expressions = []\n\n            for (var i = 0; i < filterExpressions.length; i++) \n            {\n                expressions.push(filterExpressions[i])\n\n                if (i < filterExpressions.length - 1)\n                expressions.push('||')\n            }\n\n            expressions = expressions.join(' ').trim()\n            expressions = '\"' + expressions + '\"'\n\n            return(['--filter-name', \n                    '\"' +  filterName + '\"', \n                    '--filter-expression', \n                    expressions].join(' ').trim())   \n        }\n    }\n    else\n        return ''\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{ \n    /** Extracts filter name from expression */\n    function getVariableName(filterExpression){\n        var expressions = ['!=', '==', '>=', '<=', '>', '<']\n\n        for (var i = 0; i < expressions.length; i++) {\n            var indexOf = filterExpression.indexOf(expressions[i])\n\n            if (indexOf >= 0)\n                return filterExpression.slice(0, indexOf).trim()\n        }\n\n        return ''\n    }\n\n    /** Combines multiple filters into a new filter name */\n    function getFilterName(filterExpressions){\n        var newFilterName = ''\n\n        for (var i = 0; i < filterExpressions.length; i++) {\n            var variableName = getVariableName(filterExpressions[i])\n\n            newFilterName = newFilterName ? (newFilterName + '-' + variableName) : variableName\n        }\n\n        return newFilterName\n    }\n\n    filterName = $job.inputs.genotype_filter_name\n    filterExpressions = $job.inputs.genotype_filter_expression\n    splitFilterExpressions = $job.inputs.split_filter_expressions\n    \n    // Adds filter expressions to the command line\n    if (filterExpressions && filterExpressions.length > 0) \n    {  \n        if (splitFilterExpressions) // Adds each expression as a separate filter\n        {\n            cmd = []\n\n            for (i = 0; i < filterExpressions.length; i++) \n            {\n                var variableName = getVariableName(filterExpressions[i])\n\n                cmd.push('--genotype-filter-name')\n                cmd.push('\"' + variableName + '\"')\n                cmd.push('--genotype-filter-expression')\n                cmd.push('\"' + filterExpressions[i] + '\"')\n            }\n\n            return cmd.join(' ')\n        }\n        else // Adds all expressions as a single filter\n        { \n            filterName = filterName ? filterName : getFilterName(filterExpressions)\n\n            var expressions = []\n\n            for (var i = 0; i < filterExpressions.length; i++) \n            {\n                expressions.push(filterExpressions[i])\n\n                if (i < filterExpressions.length - 1)\n                expressions.push('||')\n            }\n\n            expressions = expressions.join(' ').trim()\n            expressions = '\"' + expressions + '\"'\n\n            return(['--genotype-filter-name', \n                    '\"' +  filterName + '\"', \n                    '--genotype-filter-expression', \n                    expressions].join(' ').trim())   \n        }\n    }\n    else\n        return ''\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#verbosity",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--variant",
              "position": 0
            },
            "sbg:fileTypes": "VCF,VCF.GZ",
            "label": "Variant",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#variant",
            "required": true,
            "type": [
              "File"
            ],
            "description": "A VCF file containing variants Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "id": "#use_jdk_inflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "id": "#use_jdk_deflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Split Filter Expressions",
            "sbg:category": "Optional Arguments",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#split_filter_expressions",
            "description": "Split filter expressions into separate tool arguments",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Set Filtered Gt To Nocall",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--set-filtered-gt-to-nocall",
              "position": 0
            },
            "id": "#set_filtered_gt_to_nocall",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Set filtered genotypes to no-call Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#seconds_between_progress_updates",
            "type": [
              "null",
              "float"
            ],
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#sample",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "position": 0,
              "prefix": "--reference"
            },
            "sbg:fileTypes": "FASTA,FA",
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "sbg:toolDefaultValue": "FASTA,FA",
            "id": "#reference",
            "required": true,
            "type": [
              "File"
            ],
            "description": "Reference sequence Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_validation_stringency",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#read_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep only reads with this read name Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_index",
            "type": [
              "null",
              "string"
            ],
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "id": "#quiet",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pl-filter-name",
              "position": 0
            },
            "label": "Pl Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#pl_filter_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with RG:PL attribute containing this string This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Missing Values In Expressions Should Evaluate As Failing",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--missing-values-in-expressions-should-evaluate-as-failing",
              "position": 0
            },
            "id": "#missing_values_in_expressions_should_evaluate_as_failing",
            "type": [
              "null",
              "boolean"
            ],
            "description": "When evaluating the JEXL expressions, missing values should be considered failing the expression Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#minimum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum mapping quality to keep (inclusive) Default value: 10."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#min_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at least equal to the specified value Default value: 1."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "description": "Memory per job",
            "label": "Memory Per Job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "description": "Memory overhead per job",
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#maximum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum mapping quality to keep (inclusive) Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at most equal to the specified value Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_fragment_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mask-name",
              "position": 0
            },
            "label": "Mask Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mask_name",
            "type": [
              "null",
              "string"
            ],
            "description": "The text to put in the FILTER field if a 'mask' is provided and overlaps with a variant call Default value: Mask."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mask-extension",
              "position": 0
            },
            "label": "Mask Extension",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mask_extension",
            "type": [
              "null",
              "int"
            ],
            "description": "How many bases beyond records from a provided 'mask' should variants be filtered Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mask",
              "position": 0
            },
            "label": "Mask",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mask",
            "type": [
              "null",
              "string"
            ],
            "description": "Input mask Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#library",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the library to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "id": "#lenient",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "id": "#keep_reverse",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#keep_read_group",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the read group to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Genotype Filter Expression",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-genotype-filter-expression",
              "position": 0
            },
            "id": "#invert_genotype_filter_expression",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Invert the selection criteria for --genotypeFilterExpression Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Filter Expression",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-filter-expression",
              "position": 0
            },
            "id": "#invert_filter_expression",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Invert the selection criteria for --filterExpression Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Invalidate Previous Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invalidate-previous-filters",
              "position": 0
            },
            "id": "#invalidate_previous_filters",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Remove previous filters applied to the VCF Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "id": "#intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#intervals_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-set-rule",
              "position": 0
            },
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_set_rule",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "UNION",
                  "INTERSECTION"
                ],
                "type": "enum"
              }
            ],
            "description": "Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-padding",
              "position": 0
            },
            "label": "Interval Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are including. Default value: 0."
          },
          {
            "sbg:altPrefix": "",
            "id": "#interval_merging_rule",
            "label": "Interval Merging Rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-merging-rule"
            },
            "sbg:toolDefaultValue": "ALL",
            "type": [
              "null",
              {
                "name": "interval_merging_rule",
                "symbols": [
                  "ALL",
                  "OVERLAPPING_ONLY"
                ],
                "type": "enum"
              }
            ],
            "description": "Interval merging rule for abutting intervals.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_exclusion_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0."
          },
          {
            "sbg:fileTypes": "BAM,SAM,CRAM",
            "label": "Input",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".bai"
              ],
              "position": 0,
              "prefix": "--input"
            },
            "id": "#input",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "BAM/SAM/CRAM file containing reads This argument may be specified 0 or more times. Default value: null."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#genotype_filter_name",
            "description": "Names to use for the list of sample/genotype filters (must be a 1-to-1 mapping); this name is put in the FILTER field for variants that get filtered This argument may be specified 0 or more times.",
            "label": "Genotype Filter Name",
            "sbg:category": "Optional Arguments"
          },
          {
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "id": "#genotype_filter_expression",
            "description": "One or more expression used with FORMAT (sample/genotype-level) fields to filter (see documentation guide for more info) This argument may be specified 0 or more times.",
            "label": "Genotype Filter Expression",
            "sbg:category": "Optional Arguments"
          },
          {
            "sbg:altPrefix": "",
            "id": "#gcs_max_retries",
            "label": "Gcs Max Retries",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--gcs-max-retries"
            },
            "sbg:toolDefaultValue": "20",
            "type": [
              "null",
              "int"
            ],
            "description": "If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#filter_too_short",
            "type": [
              "null",
              "int"
            ],
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30."
          },
          {
            "sbg:altPrefix": "",
            "label": "Filter Not In Mask",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-not-in-mask",
              "position": 0
            },
            "id": "#filter_not_in_mask",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Filter records NOT in given input mask. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#filter_name",
            "description": "This argument may be specified 0 or more times. Default value: null.",
            "label": "Filter Name",
            "sbg:category": "Optional Arguments"
          },
          {
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "id": "#filter_expression",
            "description": "One or more expression used with INFO fields to filter This argument may be specified 0 or more times. Default value: null.",
            "label": "Filter Expression",
            "sbg:category": "Optional Arguments"
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "id": "#exclude_intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "required": false,
            "id": "#exclude_intervals_file",
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "id": "#dont_require_soft_clips_both_ends",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "id": "#disable_tool_default_read_filters",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "id": "#disable_sequence_dictionary_validation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "id": "#disable_bam_index_caching",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "id": "#create_output_variant_md5",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "id": "#create_output_variant_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "id": "#create_output_bam_md5",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-index",
              "position": 0
            },
            "id": "#create_output_bam_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cluster-window-size",
              "position": 0
            },
            "label": "Cluster Window Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cluster_window_size",
            "type": [
              "null",
              "int"
            ],
            "description": "The window size (in bases) in which to evaluate clustered SNPs Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cluster-size",
              "position": 0
            },
            "label": "Cluster Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cluster_size",
            "type": [
              "null",
              "int"
            ],
            "description": "The number of SNPs which make up a cluster. Must be at least 2 Default value: 3."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_index_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_listed_lanes",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-list",
              "position": 0
            },
            "label": "Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_list",
            "type": [
              "null",
              "string"
            ],
            "description": "This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#ambig_filter_frac",
            "type": [
              "null",
              "float"
            ],
            "description": "Threshold fraction of non-regular bases (e.g. N) above which to filter Default value: 0.05."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "id": "#ambig_filter_bases",
            "type": [
              "null",
              "int"
            ],
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "id": "#add_output_sam_program_record",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "teodora.aleksic",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/opt/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "VariantFiltration"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "Filtered VCF",
            "id": "#filtered_vcf",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variant",
              "glob": "*.vcf",
              "secondaryFiles": [
                ".idx"
              ]
            },
            "type": [
              "File"
            ],
            "description": "File to which variants should be written."
          }
        ],
        "sbg:revision": 21,
        "sbg:copyOf": "vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/56",
        "sbg:createdOn": 1500296584,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 334.58347887132453,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-variantfiltration/21",
        "description": "Filter variant calls based on INFO and FORMAT annotations.\n\n###**Overview**  \n\nThis tool is designed for hard-filtering variant calls based on certain criteria. Records are hard-filtered by changing the value in the FILTER field to something other than PASS. Filtered records will be preserved in the output unless their removal is requested in the command line.\n\n###**Input**  \n\n- A VCF of variant calls to filter.\n- One or more filtering expressions and corresponding filter names.\n\n###**Output**  \n\nA filtered VCF in which passing variants are annotated as PASS and failing variants are annotated with the name(s) of the filter(s) they failed. \n\n###**Usage example**  \n\n    ./gatk-launch VariantFiltration \\\n   \t\t-R reference.fasta \\\n   \t\t-V input.vcf \\\n   \t\t-O output.vcf \\\n   \t\t--filterExpression \"AB < 0.2 || MQ0 > 50\" \\\n   \t\t--filterName \"my_filters\"\n\n###**Note** \n\nComposing filtering expressions can range from very simple to extremely complicated depending on what you're trying to do. Please see [this document](https://software.broadinstitute.org/gatk/documentation/article.php?id=1255) for more details on how to compose and use filtering expressions effectively.\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_VariantFiltration/56",
        "label": "INDEL GATK VariantFiltration",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1520946077,
        "sbg:id": "admin/sbg-public-data/gatk-4-0-variantfiltration/21",
        "temporaryFailCodes": []
      },
      "id": "#INDEL_GATK_VariantFiltration",
      "sbg:y": 334.58347887132453
    },
    {
      "sbg:x": 2229.884854232661,
      "inputs": [
        {
          "id": "#INDEL_GATK_SelectVariants.verbosity"
        },
        {
          "source": [
            "#GATK_MergeVcfs.output"
          ],
          "id": "#INDEL_GATK_SelectVariants.variant"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.use_jdk_inflater"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.use_jdk_deflater"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.set_filtered_gt_to_nocall"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.select_type_to_include",
          "default": "INDEL"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.select_type_to_exclude"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.select_random_fraction"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.select_expressions"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.seconds_between_progress_updates"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.sample_name"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.sample_file"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.sample_expressions"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.sample"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.restrict_alleles_to"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.remove_unused_alternates"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.remove_fraction_genotypes"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#INDEL_GATK_SelectVariants.reference"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.read_validation_stringency"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.read_name"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.read_index"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.read_filter"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.quiet"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.preserve_alleles"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.pl_filter_name"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.pedigree"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.minimum_mapping_quality"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.min_read_length"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.min_indel_size"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.min_fraction_filtered_genotypes"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.min_filtered_genotypes"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.mendelian_violation_qual_threshold"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.mendelian_violation"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.memory_per_job",
          "default": 2048
        },
        {
          "id": "#INDEL_GATK_SelectVariants.memory_overhead_per_job"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.maximum_mapping_quality"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.max_read_length"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.max_nocal_lnumber"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.max_nocal_lfraction"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.max_indel_size"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.max_fragment_length"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.max_fraction_filtered_genotypes"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.max_filtered_genotypes"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.library"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.lenient"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.keep_reverse"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.keep_read_group"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.keep_original_dp"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.keep_original_ac"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.keep_ids"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.invert_select"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.invert_mendelian_violation"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.intervals_string"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.intervals_file"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.interval_set_rule"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.interval_padding"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.interval_merging_rule"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.interval_exclusion_padding"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.input"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.gcs_max_retries"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.filter_too_short"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_sample_name"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_sample_file"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_sample_expressions"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_non_variants"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_intervals_string"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_intervals_file"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_ids"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.exclude_filtered"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.discordance"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.disable_tool_default_read_filters"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.disable_sequence_dictionary_validation"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.disable_read_filter"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.disable_bam_index_caching"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.create_output_variant_md5"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.create_output_variant_index"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.create_output_bam_md5"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.create_output_bam_index"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.concordance"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.cloud_prefetch_buffer"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.cloud_index_prefetch_buffer"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.black_listed_lanes"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.black_list"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.ambig_filter_frac"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.ambig_filter_bases"
        },
        {
          "id": "#INDEL_GATK_SelectVariants.add_output_sam_program_record"
        }
      ],
      "outputs": [
        {
          "id": "#INDEL_GATK_SelectVariants.select_variants_vcf"
        }
      ],
      "run": {
        "x": 2229.884854232661,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/teodora_aleksic/gatk:4.0.2.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 16,
        "sbg:cmdPreview": "/opt/gatk --java-options \"-Xmx2048M\" SelectVariants --variant /path/to/variant.ext --output variant.vcf",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "mendelianViolation": true,
            "createOutputVariantIndex": true,
            "bqsr": {
              "path": "/path/to/bqsr.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "secondsBetweenProgressUpdates": null,
            "select_type_to_include": [
              "INDEL",
              "MIXED"
            ],
            "unsafe": null,
            "invertSelect": true,
            "disableSequenceDictionaryValidation": true,
            "excludeNonVariants": true,
            "use_jdk_inflater": false,
            "createOutputBamIndex": true,
            "gcs_max_retries": null,
            "lenient": null,
            "variant": {
              "path": "/path/to/variant.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "removeUnusedAlternates": true,
            "reference": {
              "path": "/example/example.fasta",
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "keepOriginalAC": 10,
            "variants": [
              {
                "path": "/example/bam.ext"
              }
            ],
            "validation_strictness": null,
            "use_jdk_deflater": false,
            "select_expressions": null,
            "createOutputVariantMD5": true,
            "sample_name": "",
            "invertMendelianViolation": true,
            "disableToolDefaultReadFilters": true,
            "no_cmdline_in_header": true,
            "memory_overhead_per_job": 0,
            "exclude_intervals_string": "",
            "addOutputSAMProgramRecord": true,
            "maxNOCALLnumber": null,
            "memory_per_job": 2048,
            "excludeFiltered": true,
            "sample_expressions": "",
            "intervals_string": "",
            "maxNOCALLfraction": null,
            "exclude_sample_file": null,
            "keepReverse": true,
            "disableBamIndexCaching": true,
            "keepOriginalDP": 1,
            "dontRequireSoftClipsBothEnds": true,
            "ambigFilterBases": 3,
            "setFilteredGtToNocall": true,
            "interval_merging_rule": null
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296598,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/19",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640364,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/20",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887435,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/21",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718052,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/22",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405196,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/23",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105738,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/24",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1505747521,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/26",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488841,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/27",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522912,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/28",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511786942,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/29",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786626,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/30",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515588105,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/39",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590606,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/41",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599016,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/43",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517403812,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/45",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648183,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/46",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946083,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/47",
            "sbg:revision": 16
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  read_name = [].concat($job.inputs.variant)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  read_namebase = read_name.slice(0, read_name.length-1).join('.')\n  return read_namebase + '.vcf'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output"
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.select_expressions){\n\tsexpression = $job.inputs.select_expressions\n\tfilter = []\n\tfor (i = 0; i < sexpression.length; i++) {\n      \t\tfilter.push(\" --selectExpressions '\", sexpression[i], \"'\")\n    \t}\n\treturn filter.join(\"\").trim()\n  } \n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": ""
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#verbosity",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--variant",
              "position": 0
            },
            "sbg:fileTypes": "VCF,VCF.GZ",
            "label": "Variant",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#variant",
            "required": true,
            "type": [
              "File"
            ],
            "description": "A VCF file containing variants Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "id": "#use_jdk_inflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "id": "#use_jdk_deflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Set Filtered Gt To Nocall",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--set-filtered-gt-to-nocall",
              "position": 0
            },
            "id": "#set_filtered_gt_to_nocall",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Set filtered genotypes to no-call Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--select-type-to-include",
              "position": 0
            },
            "label": "Select Type To Include",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#select_type_to_include",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "NO_VARIATION",
                  "SNP",
                  "MNP",
                  "INDEL",
                  "SYMBOLIC",
                  "MIXED"
                ],
                "type": "enum"
              }
            ],
            "description": "Select only a certain type of variants from the input file This argument may be specified 0 or more times. Default value: null. Possible values: {NO_VARIATION, SNP, MNP, INDEL, SYMBOLIC, MIXED}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--select-type-to-exclude",
              "position": 0
            },
            "label": "Select Type To Exclude",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#select_type_to_exclude",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "NO_VARIATION",
                  "SNP",
                  "MNP",
                  "INDEL",
                  "SYMBOLIC",
                  "MIXED"
                ],
                "type": "enum"
              }
            ],
            "description": "Do not select certain type of variants from the input file This argument may be specified 0 or more times. Default value: null. Possible values: {NO_VARIATION, SNP, MNP, INDEL, SYMBOLIC, MIXED}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--select-random-fraction",
              "position": 0
            },
            "label": "Select Random Fraction",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#select_random_fraction",
            "type": [
              "null",
              "float"
            ],
            "description": "Select a fraction of variants at random from the input Default value: 0.0."
          },
          {
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "label": "Select Expressions",
            "sbg:category": "Optional Arguments",
            "sbg:toolDefaultValue": "[]",
            "id": "#select_expressions",
            "description": "One or more criteria to use when selecting the data This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#seconds_between_progress_updates",
            "type": [
              "null",
              "float"
            ],
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-name",
              "position": 0
            },
            "label": "Sample Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Include genotypes from this sample This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-file",
              "position": 0
            },
            "label": "Sample File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "File containing a list of samples to include This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-expressions",
              "position": 0
            },
            "label": "Sample Expressions",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_expressions",
            "type": [
              "null",
              "string"
            ],
            "description": "Regular expression to select multiple samples This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#sample",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--restrict-alleles-to",
              "position": 0
            },
            "label": "Restrict Alleles To",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#restrict_alleles_to",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ALL",
                  "BIALLELIC",
                  "MULTIALLELIC"
                ],
                "type": "enum"
              }
            ],
            "description": "Select only variants of a particular allelicity Default value: ALL. Possible values: {ALL, BIALLELIC, MULTIALLELIC}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Remove Unused Alternates",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--remove-unused-alternates",
              "position": 0
            },
            "id": "#remove_unused_alternates",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Remove alternate alleles not present in any genotypes Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--remove-fraction-genotypes",
              "position": 0
            },
            "label": "Remove Fraction Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#remove_fraction_genotypes",
            "type": [
              "null",
              "float"
            ],
            "description": "Select a fraction of genotypes at random from the input and sets them to no-call Default value: 0.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "position": 0,
              "prefix": "--reference"
            },
            "sbg:fileTypes": "FASTA, FA",
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#reference",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_validation_stringency",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#read_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep only reads with this read name Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_index",
            "type": [
              "null",
              "string"
            ],
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#quiet",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "true",
                  "false"
                ],
                "type": "enum"
              }
            ],
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--preserve-alleles",
              "position": 0
            },
            "label": "Preserve Alleles",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#preserve_alleles",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "true",
                  "false"
                ],
                "type": "enum"
              }
            ],
            "description": "Preserve original alleles, do not trim Default value: false. Possible values: {true, false}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pl-filter-name",
              "position": 0
            },
            "label": "Pl Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#pl_filter_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with RG:PL attribute containing this string This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pedigree",
              "position": 0
            },
            "label": "Pedigree",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#pedigree",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Pedigree file Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#minimum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum mapping quality to keep (inclusive) Default value: 10."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#min_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at least equal to the specified value Default value: 1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-indel-size",
              "position": 0
            },
            "label": "Min Indel Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_indel_size",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum size of indels to include Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-fraction-filtered-genotypes",
              "position": 0
            },
            "label": "Min Fraction Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_fraction_filtered_genotypes",
            "type": [
              "null",
              "float"
            ],
            "description": "Maximum fraction of samples filtered at the genotype level Default value: 0.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-filtered-genotypes",
              "position": 0
            },
            "label": "Min Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_filtered_genotypes",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum number of samples filtered at the genotype level Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mendelian-violation-qual-threshold",
              "position": 0
            },
            "label": "Mendelian Violation Qual Threshold",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mendelian_violation_qual_threshold",
            "type": [
              "null",
              "float"
            ],
            "description": "Minimum GQ score for each trio member to accept a site as a violation Default value: 0.0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Mendelian Violation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mendelian-violation",
              "position": 0
            },
            "id": "#mendelian_violation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Output mendelian violation sites only Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "description": "Memory per job",
            "label": "Memory Per Job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "description": "Memory overhead per job",
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#maximum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum mapping quality to keep (inclusive) Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at most equal to the specified value Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-nocal-lnumber",
              "position": 0
            },
            "label": "Max Nocal Lnumber",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_nocal_lnumber",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of samples with no-call genotypes Default value: 2147483647."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-nocal-lfraction",
              "position": 0
            },
            "label": "Max Nocal Lfraction",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_nocal_lfraction",
            "type": [
              "null",
              "float"
            ],
            "description": "Maximum fraction of samples with no-call genotypes Default value: 1.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-indel-size",
              "position": 0
            },
            "label": "Max Indel Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_indel_size",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum size of indels to include Default value: 2147483647."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_fragment_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fraction-filtered-genotypes",
              "position": 0
            },
            "label": "Max Fraction Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_fraction_filtered_genotypes",
            "type": [
              "null",
              "float"
            ],
            "description": "Maximum fraction of samples filtered at the genotype level Default value: 1.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-filtered-genotypes",
              "position": 0
            },
            "label": "Max Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_filtered_genotypes",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of samples filtered at the genotype level Default value: 2147483647."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#library",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the library to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "id": "#lenient",
            "type": [
              "null",
              "int"
            ],
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "id": "#keep_reverse",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#keep_read_group",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the read group to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Original Dp",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-original-dp",
              "position": 0
            },
            "id": "#keep_original_dp",
            "type": [
              "null",
              "int"
            ],
            "description": "Store the original DP value after subsetting Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Original Ac",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-original-ac",
              "position": 0
            },
            "id": "#keep_original_ac",
            "type": [
              "null",
              "int"
            ],
            "description": "Store the original AC, AF, and AN values after subsetting Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Keep I Ds",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-ids",
              "position": 0
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#keep_ids",
            "description": "List of variant IDs to select Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Select",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-select",
              "position": 0
            },
            "id": "#invert_select",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Invert the selection criteria for -select Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Mendelian Violation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-mendelian-violation",
              "position": 0
            },
            "id": "#invert_mendelian_violation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Output non-mendelian violation sites only Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "id": "#intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#intervals_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-set-rule",
              "position": 0
            },
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_set_rule",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "UNION",
                  "INTERSECTION"
                ],
                "type": "enum"
              }
            ],
            "description": "Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-padding",
              "position": 0
            },
            "label": "Interval Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are including. Default value: 0."
          },
          {
            "sbg:altPrefix": "",
            "id": "#interval_merging_rule",
            "label": "Interval Merging Rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-merging-rule"
            },
            "sbg:toolDefaultValue": "ALL",
            "type": [
              "null",
              {
                "name": "interval_merging_rule",
                "symbols": [
                  "ALL",
                  "OVERLAPPING_ONLY"
                ],
                "type": "enum"
              }
            ],
            "description": "Interval merging rule for abutting intervals.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_exclusion_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0."
          },
          {
            "sbg:fileTypes": "BAM,SAM,CRAM",
            "label": "Input",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".bai"
              ],
              "position": 0,
              "prefix": "--input"
            },
            "id": "#input",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "BAM/SAM/CRAM file containing reads This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "id": "#gcs_max_retries",
            "label": "Gcs Max Retries",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--gcs-max-retries"
            },
            "sbg:toolDefaultValue": "20",
            "type": [
              "null",
              "int"
            ],
            "description": "If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#filter_too_short",
            "type": [
              "null",
              "int"
            ],
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-sample-name",
              "position": 0
            },
            "label": "Exclude Sample Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#exclude_sample_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Exclude genotypes from this sample This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Sample File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "--exclude-sample-file",
              "position": 0,
              "sbg:cmdInclude": true
            },
            "id": "#exclude_sample_file",
            "required": false,
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "List of samples to exclude This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-sample-expressions",
              "position": 0
            },
            "label": "Exclude Sample Expressions",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#exclude_sample_expressions",
            "type": [
              "null",
              "string"
            ],
            "description": "List of sample expressions to exclude This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Non Variants",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-non-variants",
              "position": 0
            },
            "id": "#exclude_non_variants",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Don't include non-variant sites Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "id": "#exclude_intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#exclude_intervals_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null."
          },
          {
            "label": "Exclude I Ds",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-ids",
              "position": 0
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#exclude_ids",
            "description": "List of variant IDs to select Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Filtered",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-filtered",
              "position": 0
            },
            "id": "#exclude_filtered",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Don't include filtered sites Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "id": "#dont_require_soft_clips_both_ends",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--discordance",
              "position": 0
            },
            "label": "Discordance",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#discordance",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Output variants not called in this comparison track Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "id": "#disable_tool_default_read_filters",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "id": "#disable_sequence_dictionary_validation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "id": "#disable_bam_index_caching",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "id": "#create_output_variant_md5",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "id": "#create_output_variant_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#create_output_bam_md5",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "true",
                  "false"
                ],
                "type": "enum"
              }
            ],
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-index",
              "position": 0
            },
            "id": "#create_output_bam_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--concordance",
              "position": 0
            },
            "label": "Concordance",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#concordance",
            "type": [
              "null",
              "string"
            ],
            "description": "Output variants also called in this comparison track Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_index_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_listed_lanes",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-list",
              "position": 0
            },
            "label": "Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_list",
            "type": [
              "null",
              "string"
            ],
            "description": "This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#ambig_filter_frac",
            "type": [
              "null",
              "float"
            ],
            "description": "Threshold fraction of non-regular bases (e.g. N) above which to filter Default value: 0.05."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "id": "#ambig_filter_bases",
            "type": [
              "null",
              "int"
            ],
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "id": "#add_output_sam_program_record",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "teodora.aleksic",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/opt/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "SelectVariants"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "Select Variants VCF",
            "id": "#select_variants_vcf",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variant",
              "glob": "*.vcf",
              "secondaryFiles": [
                ".idx"
              ]
            },
            "type": [
              "File"
            ],
            "description": "File to which variants should be written."
          }
        ],
        "sbg:revision": 16,
        "sbg:copyOf": "vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/47",
        "sbg:createdOn": 1500296598,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 384.5641937480047,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-selectvariants/16",
        "description": "Select a subset of variants from a VCF file.\n\n###**Overview**  \n\nThis tool allows you to select a subset of variants based on various criteria in order to facilitate certain analyses such as comparing and contrasting cases vs. controls, extracting variant or non-variant loci that meet certain requirements, or troubleshooting some unexpected results, to name but a few.\n\nThere are many different options for selecting subsets of variants from a larger callset:\n\nExtract one or more samples from a callset based on either a complete sample name or a pattern match.\nSpecify criteria for inclusion that place thresholds on annotation values, e.g. \"DP > 1000\" (depth of coverage greater than 1000x), \"AF < 0.25\" (sites with allele frequency less than 0.25). These criteria are written as \"JEXL expressions\", which are documented in the article about using JEXL expressions.\nProvide concordance or discordance tracks in order to include or exclude variants that are also present in other given callsets.\nSelect variants based on criteria like their type (e.g. INDELs only), evidence of mendelian violation, filtering status, allelicity, and so on.\nThere are also several options for recording the original values of certain annotations that are recalculated when a subsetting the new callset, trimming alleles, and so on.\n\n###**Input**  \n\nA variant call set in VCF format from which to select a subset.  \n\n###**Output**  \n\nA new VCF file containing the selected subset of variants.  \n\n###**Usage examples**   \n\n    ./gatk-launch SelectVariants \\\n     \t-R reference.fasta \\\n     \t-V input.vcf \\\n     \t-selectType SNP \\\n     \t-O output.vcf\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/47",
        "label": "INDEL GATK SelectVariants",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1520946083,
        "sbg:id": "h-af2714cd/h-9af90a6e/h-e1a2d231/0",
        "temporaryFailCodes": []
      },
      "id": "#INDEL_GATK_SelectVariants",
      "sbg:y": 384.5641937480047
    },
    {
      "sbg:x": 2189.9896155601896,
      "inputs": [
        {
          "id": "#SNP_GATK_SelectVariants.verbosity"
        },
        {
          "source": [
            "#GATK_MergeVcfs.output"
          ],
          "id": "#SNP_GATK_SelectVariants.variant"
        },
        {
          "id": "#SNP_GATK_SelectVariants.use_jdk_inflater"
        },
        {
          "id": "#SNP_GATK_SelectVariants.use_jdk_deflater"
        },
        {
          "id": "#SNP_GATK_SelectVariants.set_filtered_gt_to_nocall"
        },
        {
          "id": "#SNP_GATK_SelectVariants.select_type_to_include",
          "default": "SNP"
        },
        {
          "id": "#SNP_GATK_SelectVariants.select_type_to_exclude"
        },
        {
          "id": "#SNP_GATK_SelectVariants.select_random_fraction"
        },
        {
          "id": "#SNP_GATK_SelectVariants.select_expressions"
        },
        {
          "id": "#SNP_GATK_SelectVariants.seconds_between_progress_updates"
        },
        {
          "id": "#SNP_GATK_SelectVariants.sample_name"
        },
        {
          "id": "#SNP_GATK_SelectVariants.sample_file"
        },
        {
          "id": "#SNP_GATK_SelectVariants.sample_expressions"
        },
        {
          "id": "#SNP_GATK_SelectVariants.sample"
        },
        {
          "id": "#SNP_GATK_SelectVariants.restrict_alleles_to"
        },
        {
          "id": "#SNP_GATK_SelectVariants.remove_unused_alternates"
        },
        {
          "id": "#SNP_GATK_SelectVariants.remove_fraction_genotypes"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#SNP_GATK_SelectVariants.reference"
        },
        {
          "id": "#SNP_GATK_SelectVariants.read_validation_stringency"
        },
        {
          "id": "#SNP_GATK_SelectVariants.read_name"
        },
        {
          "id": "#SNP_GATK_SelectVariants.read_index"
        },
        {
          "id": "#SNP_GATK_SelectVariants.read_filter"
        },
        {
          "id": "#SNP_GATK_SelectVariants.quiet"
        },
        {
          "id": "#SNP_GATK_SelectVariants.preserve_alleles"
        },
        {
          "id": "#SNP_GATK_SelectVariants.pl_filter_name"
        },
        {
          "id": "#SNP_GATK_SelectVariants.pedigree"
        },
        {
          "id": "#SNP_GATK_SelectVariants.minimum_mapping_quality"
        },
        {
          "id": "#SNP_GATK_SelectVariants.min_read_length"
        },
        {
          "id": "#SNP_GATK_SelectVariants.min_indel_size"
        },
        {
          "id": "#SNP_GATK_SelectVariants.min_fraction_filtered_genotypes"
        },
        {
          "id": "#SNP_GATK_SelectVariants.min_filtered_genotypes"
        },
        {
          "id": "#SNP_GATK_SelectVariants.mendelian_violation_qual_threshold"
        },
        {
          "id": "#SNP_GATK_SelectVariants.mendelian_violation"
        },
        {
          "id": "#SNP_GATK_SelectVariants.memory_per_job",
          "default": 2048
        },
        {
          "id": "#SNP_GATK_SelectVariants.memory_overhead_per_job"
        },
        {
          "id": "#SNP_GATK_SelectVariants.maximum_mapping_quality"
        },
        {
          "id": "#SNP_GATK_SelectVariants.max_read_length"
        },
        {
          "id": "#SNP_GATK_SelectVariants.max_nocal_lnumber"
        },
        {
          "id": "#SNP_GATK_SelectVariants.max_nocal_lfraction"
        },
        {
          "id": "#SNP_GATK_SelectVariants.max_indel_size"
        },
        {
          "id": "#SNP_GATK_SelectVariants.max_fragment_length"
        },
        {
          "id": "#SNP_GATK_SelectVariants.max_fraction_filtered_genotypes"
        },
        {
          "id": "#SNP_GATK_SelectVariants.max_filtered_genotypes"
        },
        {
          "id": "#SNP_GATK_SelectVariants.library"
        },
        {
          "id": "#SNP_GATK_SelectVariants.lenient"
        },
        {
          "id": "#SNP_GATK_SelectVariants.keep_reverse"
        },
        {
          "id": "#SNP_GATK_SelectVariants.keep_read_group"
        },
        {
          "id": "#SNP_GATK_SelectVariants.keep_original_dp"
        },
        {
          "id": "#SNP_GATK_SelectVariants.keep_original_ac"
        },
        {
          "id": "#SNP_GATK_SelectVariants.keep_ids"
        },
        {
          "id": "#SNP_GATK_SelectVariants.invert_select"
        },
        {
          "id": "#SNP_GATK_SelectVariants.invert_mendelian_violation"
        },
        {
          "id": "#SNP_GATK_SelectVariants.intervals_string"
        },
        {
          "id": "#SNP_GATK_SelectVariants.intervals_file"
        },
        {
          "id": "#SNP_GATK_SelectVariants.interval_set_rule"
        },
        {
          "id": "#SNP_GATK_SelectVariants.interval_padding"
        },
        {
          "id": "#SNP_GATK_SelectVariants.interval_merging_rule"
        },
        {
          "id": "#SNP_GATK_SelectVariants.interval_exclusion_padding"
        },
        {
          "id": "#SNP_GATK_SelectVariants.input"
        },
        {
          "id": "#SNP_GATK_SelectVariants.gcs_max_retries"
        },
        {
          "id": "#SNP_GATK_SelectVariants.filter_too_short"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_sample_name"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_sample_file"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_sample_expressions"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_non_variants"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_intervals_string"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_intervals_file"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_ids"
        },
        {
          "id": "#SNP_GATK_SelectVariants.exclude_filtered"
        },
        {
          "id": "#SNP_GATK_SelectVariants.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#SNP_GATK_SelectVariants.discordance"
        },
        {
          "id": "#SNP_GATK_SelectVariants.disable_tool_default_read_filters"
        },
        {
          "id": "#SNP_GATK_SelectVariants.disable_sequence_dictionary_validation"
        },
        {
          "id": "#SNP_GATK_SelectVariants.disable_read_filter"
        },
        {
          "id": "#SNP_GATK_SelectVariants.disable_bam_index_caching"
        },
        {
          "id": "#SNP_GATK_SelectVariants.create_output_variant_md5"
        },
        {
          "id": "#SNP_GATK_SelectVariants.create_output_variant_index"
        },
        {
          "id": "#SNP_GATK_SelectVariants.create_output_bam_md5"
        },
        {
          "id": "#SNP_GATK_SelectVariants.create_output_bam_index"
        },
        {
          "id": "#SNP_GATK_SelectVariants.concordance"
        },
        {
          "id": "#SNP_GATK_SelectVariants.cloud_prefetch_buffer"
        },
        {
          "id": "#SNP_GATK_SelectVariants.cloud_index_prefetch_buffer"
        },
        {
          "id": "#SNP_GATK_SelectVariants.black_listed_lanes"
        },
        {
          "id": "#SNP_GATK_SelectVariants.black_list"
        },
        {
          "id": "#SNP_GATK_SelectVariants.ambig_filter_frac"
        },
        {
          "id": "#SNP_GATK_SelectVariants.ambig_filter_bases"
        },
        {
          "id": "#SNP_GATK_SelectVariants.add_output_sam_program_record"
        }
      ],
      "outputs": [
        {
          "id": "#SNP_GATK_SelectVariants.select_variants_vcf"
        }
      ],
      "run": {
        "x": 2189.9896155601896,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/teodora_aleksic/gatk:4.0.2.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 16,
        "sbg:cmdPreview": "/opt/gatk --java-options \"-Xmx2048M\" SelectVariants --variant /path/to/variant.ext --output variant.vcf",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "mendelianViolation": true,
            "createOutputVariantIndex": true,
            "bqsr": {
              "path": "/path/to/bqsr.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "secondsBetweenProgressUpdates": null,
            "select_type_to_include": [
              "INDEL",
              "MIXED"
            ],
            "unsafe": null,
            "invertSelect": true,
            "disableSequenceDictionaryValidation": true,
            "excludeNonVariants": true,
            "use_jdk_inflater": false,
            "createOutputBamIndex": true,
            "gcs_max_retries": null,
            "lenient": null,
            "variant": {
              "path": "/path/to/variant.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "removeUnusedAlternates": true,
            "reference": {
              "path": "/example/example.fasta",
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "keepOriginalAC": 10,
            "variants": [
              {
                "path": "/example/bam.ext"
              }
            ],
            "validation_strictness": null,
            "use_jdk_deflater": false,
            "select_expressions": null,
            "createOutputVariantMD5": true,
            "sample_name": "",
            "invertMendelianViolation": true,
            "disableToolDefaultReadFilters": true,
            "no_cmdline_in_header": true,
            "memory_overhead_per_job": 0,
            "exclude_intervals_string": "",
            "addOutputSAMProgramRecord": true,
            "maxNOCALLnumber": null,
            "memory_per_job": 2048,
            "excludeFiltered": true,
            "sample_expressions": "",
            "intervals_string": "",
            "maxNOCALLfraction": null,
            "exclude_sample_file": null,
            "keepReverse": true,
            "disableBamIndexCaching": true,
            "keepOriginalDP": 1,
            "dontRequireSoftClipsBothEnds": true,
            "ambigFilterBases": 3,
            "setFilteredGtToNocall": true,
            "interval_merging_rule": null
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296598,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/19",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640364,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/20",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887435,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/21",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718052,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/22",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405196,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/23",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105738,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/24",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1505747521,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/26",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488841,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/27",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522912,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/28",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511786942,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/29",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786626,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/30",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515588105,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/39",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590606,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/41",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599016,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/43",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1517403812,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/45",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648183,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/46",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946083,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/47",
            "sbg:revision": 16
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  read_name = [].concat($job.inputs.variant)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  read_namebase = read_name.slice(0, read_name.length-1).join('.')\n  return read_namebase + '.vcf'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output"
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.select_expressions){\n\tsexpression = $job.inputs.select_expressions\n\tfilter = []\n\tfor (i = 0; i < sexpression.length; i++) {\n      \t\tfilter.push(\" --selectExpressions '\", sexpression[i], \"'\")\n    \t}\n\treturn filter.join(\"\").trim()\n  } \n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": ""
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#verbosity",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--variant",
              "position": 0
            },
            "sbg:fileTypes": "VCF,VCF.GZ",
            "label": "Variant",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#variant",
            "required": true,
            "type": [
              "File"
            ],
            "description": "A VCF file containing variants Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "id": "#use_jdk_inflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "id": "#use_jdk_deflater",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Set Filtered Gt To Nocall",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--set-filtered-gt-to-nocall",
              "position": 0
            },
            "id": "#set_filtered_gt_to_nocall",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Set filtered genotypes to no-call Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--select-type-to-include",
              "position": 0
            },
            "label": "Select Type To Include",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#select_type_to_include",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "NO_VARIATION",
                  "SNP",
                  "MNP",
                  "INDEL",
                  "SYMBOLIC",
                  "MIXED"
                ],
                "type": "enum"
              }
            ],
            "description": "Select only a certain type of variants from the input file This argument may be specified 0 or more times. Default value: null. Possible values: {NO_VARIATION, SNP, MNP, INDEL, SYMBOLIC, MIXED}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--select-type-to-exclude",
              "position": 0
            },
            "label": "Select Type To Exclude",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#select_type_to_exclude",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "NO_VARIATION",
                  "SNP",
                  "MNP",
                  "INDEL",
                  "SYMBOLIC",
                  "MIXED"
                ],
                "type": "enum"
              }
            ],
            "description": "Do not select certain type of variants from the input file This argument may be specified 0 or more times. Default value: null. Possible values: {NO_VARIATION, SNP, MNP, INDEL, SYMBOLIC, MIXED}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--select-random-fraction",
              "position": 0
            },
            "label": "Select Random Fraction",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#select_random_fraction",
            "type": [
              "null",
              "float"
            ],
            "description": "Select a fraction of variants at random from the input Default value: 0.0."
          },
          {
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "label": "Select Expressions",
            "sbg:category": "Optional Arguments",
            "sbg:toolDefaultValue": "[]",
            "id": "#select_expressions",
            "description": "One or more criteria to use when selecting the data This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#seconds_between_progress_updates",
            "type": [
              "null",
              "float"
            ],
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-name",
              "position": 0
            },
            "label": "Sample Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Include genotypes from this sample This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-file",
              "position": 0
            },
            "label": "Sample File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "File containing a list of samples to include This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-expressions",
              "position": 0
            },
            "label": "Sample Expressions",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_expressions",
            "type": [
              "null",
              "string"
            ],
            "description": "Regular expression to select multiple samples This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#sample",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--restrict-alleles-to",
              "position": 0
            },
            "label": "Restrict Alleles To",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#restrict_alleles_to",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ALL",
                  "BIALLELIC",
                  "MULTIALLELIC"
                ],
                "type": "enum"
              }
            ],
            "description": "Select only variants of a particular allelicity Default value: ALL. Possible values: {ALL, BIALLELIC, MULTIALLELIC}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Remove Unused Alternates",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--remove-unused-alternates",
              "position": 0
            },
            "id": "#remove_unused_alternates",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Remove alternate alleles not present in any genotypes Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--remove-fraction-genotypes",
              "position": 0
            },
            "label": "Remove Fraction Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#remove_fraction_genotypes",
            "type": [
              "null",
              "float"
            ],
            "description": "Select a fraction of genotypes at random from the input and sets them to no-call Default value: 0.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "position": 0,
              "prefix": "--reference"
            },
            "sbg:fileTypes": "FASTA, FA",
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#reference",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_validation_stringency",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#read_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep only reads with this read name Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_index",
            "type": [
              "null",
              "string"
            ],
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#quiet",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "true",
                  "false"
                ],
                "type": "enum"
              }
            ],
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--preserve-alleles",
              "position": 0
            },
            "label": "Preserve Alleles",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#preserve_alleles",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "true",
                  "false"
                ],
                "type": "enum"
              }
            ],
            "description": "Preserve original alleles, do not trim Default value: false. Possible values: {true, false}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pl-filter-name",
              "position": 0
            },
            "label": "Pl Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#pl_filter_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with RG:PL attribute containing this string This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pedigree",
              "position": 0
            },
            "label": "Pedigree",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#pedigree",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Pedigree file Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#minimum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum mapping quality to keep (inclusive) Default value: 10."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#min_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at least equal to the specified value Default value: 1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-indel-size",
              "position": 0
            },
            "label": "Min Indel Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_indel_size",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum size of indels to include Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-fraction-filtered-genotypes",
              "position": 0
            },
            "label": "Min Fraction Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_fraction_filtered_genotypes",
            "type": [
              "null",
              "float"
            ],
            "description": "Maximum fraction of samples filtered at the genotype level Default value: 0.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-filtered-genotypes",
              "position": 0
            },
            "label": "Min Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_filtered_genotypes",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum number of samples filtered at the genotype level Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mendelian-violation-qual-threshold",
              "position": 0
            },
            "label": "Mendelian Violation Qual Threshold",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#mendelian_violation_qual_threshold",
            "type": [
              "null",
              "float"
            ],
            "description": "Minimum GQ score for each trio member to accept a site as a violation Default value: 0.0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Mendelian Violation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mendelian-violation",
              "position": 0
            },
            "id": "#mendelian_violation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Output mendelian violation sites only Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "description": "Memory per job",
            "label": "Memory Per Job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "description": "Memory overhead per job",
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#maximum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum mapping quality to keep (inclusive) Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at most equal to the specified value Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-nocal-lnumber",
              "position": 0
            },
            "label": "Max Nocal Lnumber",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_nocal_lnumber",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of samples with no-call genotypes Default value: 2147483647."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-nocal-lfraction",
              "position": 0
            },
            "label": "Max Nocal Lfraction",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_nocal_lfraction",
            "type": [
              "null",
              "float"
            ],
            "description": "Maximum fraction of samples with no-call genotypes Default value: 1.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-indel-size",
              "position": 0
            },
            "label": "Max Indel Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_indel_size",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum size of indels to include Default value: 2147483647."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_fragment_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fraction-filtered-genotypes",
              "position": 0
            },
            "label": "Max Fraction Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_fraction_filtered_genotypes",
            "type": [
              "null",
              "float"
            ],
            "description": "Maximum fraction of samples filtered at the genotype level Default value: 1.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-filtered-genotypes",
              "position": 0
            },
            "label": "Max Filtered Genotypes",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_filtered_genotypes",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of samples filtered at the genotype level Default value: 2147483647."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#library",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the library to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "id": "#lenient",
            "type": [
              "null",
              "int"
            ],
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "id": "#keep_reverse",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#keep_read_group",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the read group to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Original Dp",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-original-dp",
              "position": 0
            },
            "id": "#keep_original_dp",
            "type": [
              "null",
              "int"
            ],
            "description": "Store the original DP value after subsetting Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Original Ac",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-original-ac",
              "position": 0
            },
            "id": "#keep_original_ac",
            "type": [
              "null",
              "int"
            ],
            "description": "Store the original AC, AF, and AN values after subsetting Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Keep I Ds",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-ids",
              "position": 0
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#keep_ids",
            "description": "List of variant IDs to select Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Select",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-select",
              "position": 0
            },
            "id": "#invert_select",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Invert the selection criteria for -select Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Invert Mendelian Violation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--invert-mendelian-violation",
              "position": 0
            },
            "id": "#invert_mendelian_violation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Output non-mendelian violation sites only Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "id": "#intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#intervals_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-set-rule",
              "position": 0
            },
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_set_rule",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "UNION",
                  "INTERSECTION"
                ],
                "type": "enum"
              }
            ],
            "description": "Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-padding",
              "position": 0
            },
            "label": "Interval Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are including. Default value: 0."
          },
          {
            "sbg:altPrefix": "",
            "id": "#interval_merging_rule",
            "label": "Interval Merging Rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-merging-rule"
            },
            "sbg:toolDefaultValue": "ALL",
            "type": [
              "null",
              {
                "name": "interval_merging_rule",
                "symbols": [
                  "ALL",
                  "OVERLAPPING_ONLY"
                ],
                "type": "enum"
              }
            ],
            "description": "Interval merging rule for abutting intervals.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_exclusion_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0."
          },
          {
            "sbg:fileTypes": "BAM,SAM,CRAM",
            "label": "Input",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".bai"
              ],
              "position": 0,
              "prefix": "--input"
            },
            "id": "#input",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "BAM/SAM/CRAM file containing reads This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "id": "#gcs_max_retries",
            "label": "Gcs Max Retries",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--gcs-max-retries"
            },
            "sbg:toolDefaultValue": "20",
            "type": [
              "null",
              "int"
            ],
            "description": "If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#filter_too_short",
            "type": [
              "null",
              "int"
            ],
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-sample-name",
              "position": 0
            },
            "label": "Exclude Sample Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#exclude_sample_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Exclude genotypes from this sample This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Sample File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "--exclude-sample-file",
              "position": 0,
              "sbg:cmdInclude": true
            },
            "id": "#exclude_sample_file",
            "required": false,
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "List of samples to exclude This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-sample-expressions",
              "position": 0
            },
            "label": "Exclude Sample Expressions",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#exclude_sample_expressions",
            "type": [
              "null",
              "string"
            ],
            "description": "List of sample expressions to exclude This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Non Variants",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-non-variants",
              "position": 0
            },
            "id": "#exclude_non_variants",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Don't include non-variant sites Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "id": "#exclude_intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#exclude_intervals_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null."
          },
          {
            "label": "Exclude I Ds",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-ids",
              "position": 0
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#exclude_ids",
            "description": "List of variant IDs to select Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Filtered",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-filtered",
              "position": 0
            },
            "id": "#exclude_filtered",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Don't include filtered sites Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "id": "#dont_require_soft_clips_both_ends",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--discordance",
              "position": 0
            },
            "label": "Discordance",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#discordance",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Output variants not called in this comparison track Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "id": "#disable_tool_default_read_filters",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "id": "#disable_sequence_dictionary_validation",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "id": "#disable_bam_index_caching",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "id": "#create_output_variant_md5",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "id": "#create_output_variant_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#create_output_bam_md5",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "true",
                  "false"
                ],
                "type": "enum"
              }
            ],
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-index",
              "position": 0
            },
            "id": "#create_output_bam_index",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--concordance",
              "position": 0
            },
            "label": "Concordance",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#concordance",
            "type": [
              "null",
              "string"
            ],
            "description": "Output variants also called in this comparison track Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_index_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_listed_lanes",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-list",
              "position": 0
            },
            "label": "Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_list",
            "type": [
              "null",
              "string"
            ],
            "description": "This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#ambig_filter_frac",
            "type": [
              "null",
              "float"
            ],
            "description": "Threshold fraction of non-regular bases (e.g. N) above which to filter Default value: 0.05."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "id": "#ambig_filter_bases",
            "type": [
              "null",
              "int"
            ],
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "id": "#add_output_sam_program_record",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "teodora.aleksic",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/opt/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "SelectVariants"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "Select Variants VCF",
            "id": "#select_variants_vcf",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variant",
              "glob": "*.vcf",
              "secondaryFiles": [
                ".idx"
              ]
            },
            "type": [
              "File"
            ],
            "description": "File to which variants should be written."
          }
        ],
        "sbg:revision": 16,
        "sbg:copyOf": "vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/47",
        "sbg:createdOn": 1500296598,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 117.42866564222146,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-selectvariants/16",
        "description": "Select a subset of variants from a VCF file.\n\n###**Overview**  \n\nThis tool allows you to select a subset of variants based on various criteria in order to facilitate certain analyses such as comparing and contrasting cases vs. controls, extracting variant or non-variant loci that meet certain requirements, or troubleshooting some unexpected results, to name but a few.\n\nThere are many different options for selecting subsets of variants from a larger callset:\n\nExtract one or more samples from a callset based on either a complete sample name or a pattern match.\nSpecify criteria for inclusion that place thresholds on annotation values, e.g. \"DP > 1000\" (depth of coverage greater than 1000x), \"AF < 0.25\" (sites with allele frequency less than 0.25). These criteria are written as \"JEXL expressions\", which are documented in the article about using JEXL expressions.\nProvide concordance or discordance tracks in order to include or exclude variants that are also present in other given callsets.\nSelect variants based on criteria like their type (e.g. INDELs only), evidence of mendelian violation, filtering status, allelicity, and so on.\nThere are also several options for recording the original values of certain annotations that are recalculated when a subsetting the new callset, trimming alleles, and so on.\n\n###**Input**  \n\nA variant call set in VCF format from which to select a subset.  \n\n###**Output**  \n\nA new VCF file containing the selected subset of variants.  \n\n###**Usage examples**   \n\n    ./gatk-launch SelectVariants \\\n     \t-R reference.fasta \\\n     \t-V input.vcf \\\n     \t-selectType SNP \\\n     \t-O output.vcf\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_SelectVariants/47",
        "label": "SNP GATK SelectVariants",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1520946083,
        "sbg:id": "h-ae387fe4/h-7510c953/h-360ae4f9/0",
        "temporaryFailCodes": []
      },
      "id": "#SNP_GATK_SelectVariants",
      "sbg:y": 117.42866564222146
    },
    {
      "sbg:x": 985.0001612107014,
      "inputs": [
        {
          "id": "#SBG_Prepare_Intervals.split_mode",
          "default": "File per chr with alt contig in a single file"
        },
        {
          "id": "#SBG_Prepare_Intervals.format"
        },
        {
          "id": "#SBG_Prepare_Intervals.fai_file"
        },
        {
          "source": [
            "#intervals_file"
          ],
          "id": "#SBG_Prepare_Intervals.bed_file"
        }
      ],
      "outputs": [
        {
          "id": "#SBG_Prepare_Intervals.str_arr"
        },
        {
          "id": "#SBG_Prepare_Intervals.names"
        },
        {
          "id": "#SBG_Prepare_Intervals.intervals"
        }
      ],
      "run": {
        "sbg:cmdPreview": "python sbg_prepare_intervals.py  --format \"chr start end\" --mode 2",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "vladimirk",
        "outputs": [
          {
            "id": "#str_arr",
            "outputBinding": {
              "outputEval": {
                "class": "Expression",
                "script": "{ rows = $self[0].contents\n  if (rows[rows.length -1] == '\\n'){\n    rows = rows.split(/\\r?\\n/).slice(0,-1);\n  }\n  else {\n    rows = rows.split(/\\r?\\n/);\n  }\n  out_list = []\n  for (i=0; i<rows.length; i++)\n  {\n    row = rows[i];\n    chromosome = row.split(\"\\t\")[0];\n    start = row.split(\"\\t\")[1];\n    end = row.split(\"\\t\")[2];\n    if(typeof start !== \"undefined\"){\n    \tinterval = chromosome.concat(\":\", start, \"-\", end);\n    }\n    else{\n    \tinterval = chromosome\n    }    \n    out_list.push(interval);\n  }\n  return out_list;\n  \t\n}\n",
                "engine": "#cwl-js-engine"
              },
              "loadContents": true,
              "glob": {
                "class": "Expression",
                "script": "{ \n  if ($job.inputs.bed_file){\n    glob = $job.inputs.bed_file.path\n\tglob = glob.split('/').slice(-1)[0]\n  }\n  else if($job.inputs.fai_file){\n    glob = $job.inputs.fai_file.path\n\tglob = glob.split('/').slice(-1)[0].split('.').slice(0, -1).join('.') + '.bed'\n  }\n\n  return glob\n}",
                "engine": "#cwl-js-engine"
              }
            },
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "description": "Outputs BED content as strings.",
            "label": "String output"
          },
          {
            "id": "#names",
            "outputBinding": {
              "outputEval": {
                "class": "Expression",
                "script": "{   \n content =  $self[0].contents.replace(/\\0/g, '')\n content = content.replace('[','')\n content = content.replace(']','')\n content = content.replace(/\\'/g, \"\")\n content = content.replace(/\\s/g, '')\n content_arr = content.split(\",\")\n\n return content_arr\n \n\n} ",
                "engine": "#cwl-js-engine"
              },
              "loadContents": true,
              "glob": "Intervals/names.txt"
            },
            "type": [
              "null",
              "string"
            ],
            "description": "File containing the names of created files.",
            "label": "Output file names"
          },
          {
            "sbg:fileTypes": "BED",
            "label": "Intervals",
            "id": "#intervals",
            "outputBinding": {
              "glob": "Intervals/*.bed",
              "sbg:metadata": {
                "sbg_scatter": "true"
              }
            },
            "type": [
              "null",
              {
                "name": "intervals",
                "items": "File",
                "type": "array"
              }
            ],
            "description": "Array of BED files genereted as per selected Split Mode."
          }
        ],
        "label": "SBG Prepare Intervals",
        "sbg:latestRevision": 15,
        "sbg:publisher": "sbg",
        "y": 658.4616348529505,
        "sbg:createdOn": 1473083821,
        "successCodes": [],
        "sbg:validationErrors": [],
        "sbg:project": "bix-demo/sbgtools-demo",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 1000
          },
          "inputs": {
            "split_mode": "File per chr with alt contig in a single file",
            "fai_file": {
              "path": "/path/to/fai_file.fasta.fai",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "format": "chr start end"
          }
        },
        "sbg:modifiedOn": 1530193387,
        "hints": [
          {
            "class": "sbg:MemRequirement",
            "value": 1000
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/bogdang/sbg_prepare_intervals:1.0",
            "dockerImageId": ""
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1473083821,
            "sbg:revisionNotes": "Copy of medjo/sbg-prepare-intervals/sbg-prepare-intervals/75",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1473084447,
            "sbg:revisionNotes": "Copy of medjo/sbg-prepare-intervals/sbg-prepare-intervals/76",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "medjo",
            "sbg:modifiedOn": 1473928444,
            "sbg:revisionNotes": null,
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "medjo",
            "sbg:modifiedOn": 1474970272,
            "sbg:revisionNotes": "split_mode set to required",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1478525360,
            "sbg:revisionNotes": "Fixed Toolkit name.",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "medjo",
            "sbg:modifiedOn": 1491904483,
            "sbg:revisionNotes": "Description changed",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1491905063,
            "sbg:revisionNotes": "Common issues added",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500382475,
            "sbg:revisionNotes": "Change the Javascript for adding the format argument into the command line",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1503074487,
            "sbg:revisionNotes": "Removed lower() from mode_2",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "medjo",
            "sbg:modifiedOn": 1503398050,
            "sbg:revisionNotes": "String output added",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1504515792,
            "sbg:revisionNotes": "Glob fix for fai input",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1508491917,
            "sbg:revisionNotes": "Removed sbg:format for string output from json",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "medjo",
            "sbg:modifiedOn": 1512057641,
            "sbg:revisionNotes": "Bug fixed - if bed file is not ended with \\n tool will work as expected.",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "bogdang",
            "sbg:modifiedOn": 1528202923,
            "sbg:revisionNotes": "Ignore header lines",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "luka.topalovic",
            "sbg:modifiedOn": 1529595373,
            "sbg:revisionNotes": "Back to revision 12",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "medjo",
            "sbg:modifiedOn": 1530193387,
            "sbg:revisionNotes": "check for header",
            "sbg:revision": 15
          }
        ],
        "x": 985.0001612107014,
        "sbg:license": "Apache License 2.0",
        "sbg:image_url": null,
        "stdin": "",
        "sbg:toolAuthor": "Seven Bridges Genomics",
        "sbg:contributors": [
          "bix-demo",
          "vladimirk",
          "medjo",
          "nikola_jovanovic",
          "teodora.aleksic",
          "luka.topalovic",
          "bogdang"
        ],
        "inputs": [
          {
            "label": "Split mode",
            "sbg:category": "Input",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n  mode = $job.inputs.split_mode\n  switch (mode) \n  {\n    case \"File per interval\": \n      return 1\n    case \"File per chr with alt contig in a single file\": \n      return 2\n    case \"Output original BED\": \n      return 3\n    case \"File per interval with alt contig in a single file\": \n      return 4  \n  }\n  return 3\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mode",
              "position": 3
            },
            "type": [
              {
                "name": "split_mode",
                "symbols": [
                  "File per interval",
                  "File per chr with alt contig in a single file",
                  "Output original BED",
                  "File per interval with alt contig in a single file"
                ],
                "type": "enum"
              }
            ],
            "id": "#split_mode",
            "description": "Depending on selected Split Mode value, output files are generated in accordance with description below:  1. File per interval - The tool creates one interval file per line of the input BED(FAI) file. Each interval file contains a single line (one of the lines of BED(FAI) input file).  2. File per chr with alt contig in a single file - For each contig(chromosome) a single file is created containing all the intervals corresponding to it . All the intervals (lines) other than (chr1, chr2 ... chrY or 1, 2 ... Y) are saved as (\"others.bed\").  3. Output original BED - BED file is required for execution of this mode. If mode 3 is applied input is passed to the output.  4. File per interval with alt contig in a single file - For each chromosome a single file is created for each interval. All the intervals (lines) other than (chr1, chr2 ... chrY or 1, 2 ... Y) are saved as (\"others.bed\"). NOTE: Do not use option 1 (File per interval) with exome BED or a BED with a lot of GL contigs, as it will create a large number of files."
          },
          {
            "id": "#format",
            "type": [
              "null",
              {
                "name": "format",
                "symbols": [
                  "chr start end",
                  "chr:start-end"
                ],
                "type": "enum"
              }
            ],
            "label": "Interval format",
            "description": "Format of the intervals in the generated files.",
            "sbg:category": "Input"
          },
          {
            "sbg:fileTypes": "FAI",
            "label": "Input FAI file",
            "sbg:category": "File Input",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--fai",
              "position": 2
            },
            "required": false,
            "id": "#fai_file",
            "type": [
              "null",
              "File"
            ],
            "description": "FAI file is converted to BED format if BED file is not provided.",
            "sbg:stageInput": "link"
          },
          {
            "sbg:fileTypes": "BED",
            "label": "Input BED file",
            "sbg:category": "File Input",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--bed",
              "position": 1
            },
            "required": false,
            "id": "#bed_file",
            "type": [
              "null",
              "File"
            ],
            "description": "Input BED file containing intervals. Required for modes 3 and 4.",
            "sbg:stageInput": "link"
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\t\n  if ($job.inputs.format)\n  \treturn \"--format \" + \"\\\"\" + $job.inputs.format + \"\\\"\"\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "temporaryFailCodes": [],
        "id": "bix-demo/sbgtools-demo/sbg-prepare-intervals/15",
        "description": "Depending on selected Split Mode value, output files are generated in accordance with description below:\n\n1. File per interval - The tool creates one interval file per line of the input BED(FAI) file.\nEach interval file contains a single line (one of the lines of BED(FAI) input file).\n\n2. File per chr with alt contig in a single file - For each contig(chromosome) a single file\nis created containing all the intervals corresponding to it .\nAll the intervals (lines) other than (chr1, chr2 ... chrY or 1, 2 ... Y) are saved as\n(\"others.bed\").\n\n3. Output original BED - BED file is required for execution of this mode. If mode 3 is applied input is passed to the output.\n\n4. File per interval with alt contig in a single file - For each chromosome a single file is created for each interval.\nAll the intervals (lines) other than (chr1, chr2 ... chrY or 1, 2 ... Y) are saved as\n(\"others.bed\").\n\n##### Common issues: \nDo not use option 1 (File per interval) with exome BED or a BED with a lot of GL contigs, as it will create a large number of files.",
        "sbg:modifiedBy": "medjo",
        "sbg:toolkit": "SBGTools",
        "sbg:projectName": "SBGTools - Demo New",
        "sbg:toolkitVersion": "1.0",
        "sbg:revisionNotes": "check for header",
        "sbg:revision": 15,
        "sbg:categories": [
          "Converters"
        ],
        "cwlVersion": "sbg:draft-2",
        "baseCommand": [
          "python",
          "sbg_prepare_intervals.py"
        ],
        "sbg:sbgMaintained": false,
        "sbg:id": "admin/sbg-public-data/sbg-prepare-intervals/96",
        "class": "CommandLineTool",
        "requirements": [
          {
            "class": "CreateFileRequirement",
            "fileDef": [
              {
                "fileContent": "\"\"\"\nUsage:\n    sbg_prepare_intervals.py [options] [--fastq FILE --bed FILE --mode INT --format STR --others STR]\n\nDescription:\n    Purpose of this tool is to split BED file into files based on the selected mode.\n    If bed file is not provided fai(fasta index) file is converted to bed.\n\nOptions:\n\n    -h, --help            Show this message.\n\n    -v, -V, --version     Tool version.\n\n    -b, -B, --bed FILE    Path to input bed file.\n\n    --fai FILE            Path to input fai file.\n\n    --format STR          Output file format.\n\n    --mode INT            Select input mode.\n\n\"\"\"\n\n\nimport os\nimport sys\nimport glob\nimport shutil\nfrom docopt import docopt\n\ndefault_extension = '.bed'  # for output files\n\n\ndef create_file(contents, contig_name, extension=default_extension):\n    \"\"\"function for creating a file for all intervals in a contig\"\"\"\n\n    new_file = open(\"Intervals/\" + contig_name + extension, \"w\")\n    new_file.write(contents)\n    new_file.close()\n\n\ndef add_to_file(line, name, extension=default_extension):\n    \"\"\"function for adding a line to a file\"\"\"\n\n    new_file = open(\"Intervals/\" + name + extension, \"a\")\n    if lformat == formats[1]:\n        sep = line.split(\"\\t\")\n        line = sep[0] + \":\" + sep[1] + \"-\" + sep[2]\n    new_file.write(line)\n    new_file.close()\n\n\ndef fai2bed(fai):\n    \"\"\"function to create a bed file from fai file\"\"\"\n\n    region_thr = 10000000  # threshold used to determine starting point accounting for telomeres in chromosomes\n    basename = fai[0:fai.rfind(\".\")]\n    with open(fai, \"r\") as ins:\n        new_array = []\n        for line in ins:\n            len_reg = int(line.split()[1])\n            cutoff = 0 if (\n            len_reg < region_thr) else 0  # sd\\\\telomeres or start with 1\n            new_line = line.split()[0] + '\\t' + str(cutoff) + '\\t' + str(\n                len_reg + cutoff)\n            new_array.append(new_line)\n    new_file = open(basename + \".bed\", \"w\")\n    new_file.write(\"\\n\".join(new_array))\n    return basename + \".bed\"\n\n\ndef chr_intervals(no_of_chrms=23):\n    \"\"\"returns all possible designations for chromosome intervals\"\"\"\n\n    chrms = []\n    for i in range(1, no_of_chrms):\n        chrms.append(\"chr\" + str(i))\n        chrms.append(str(i))\n    chrms.extend([\"x\", \"y\", \"chrx\", \"chry\"])\n    return chrms\n\n\ndef mode_1(orig_file):\n    \"\"\"mode 1: every line is a new file\"\"\"\n\n    with open(orig_file, \"r\") as ins:\n        prev = \"\"\n        counter = 0\n        names = []\n        for line in ins:\n            if is_header(line):\n                continue\n            if line.split()[0] == prev:\n                counter += 1\n            else:\n                counter = 0\n            suffix = \"\" if (counter == 0) else \"_\" + str(counter)\n            create_file(line, line.split()[0] + suffix)\n            names.append(line.split()[0] + suffix)\n            prev = line.split()[0]\n\n        create_file(str(names), \"names\", extension=\".txt\")\n\n\ndef mode_2(orig_file, others_name):\n    \"\"\"mode 2: separate file is created for each chromosome, and one file is created for other intervals\"\"\"\n\n    chrms = chr_intervals()\n    names = []\n\n    with open(orig_file, 'r') as ins:\n        for line in ins:\n            if is_header(line):\n                continue\n            name = line.split()[0]\n            if name.lower() in chrms:\n                name = name\n            else:\n                name = others_name\n            try:\n                add_to_file(line, name)\n                if not name in names:\n                    names.append(name)\n            except:\n                raise Exception(\n                    \"Couldn't create or write in the file in mode 2\")\n\n        create_file(str(names), \"names\", extension=\".txt\")\n\n\ndef mode_3(orig_file, extension=default_extension):\n    \"\"\"mode 3: input file is staged to output\"\"\"\n\n    orig_name = orig_file.split(\"/\")[len(orig_file.split(\"/\")) - 1]\n    output_file = r\"./Intervals/\" + orig_name[\n                                    0:orig_name.rfind('.')] + extension\n\n    shutil.copyfile(orig_file, output_file)\n\n    names = [orig_name[0:orig_name.rfind('.')]]\n    create_file(str(names), \"names\", extension=\".txt\")\n\n\ndef mode_4(orig_file, others_name):\n    \"\"\"mode 4: every interval in chromosomes is in a separate file. Other intervals are in a single file\"\"\"\n\n    chrms = chr_intervals()\n    names = []\n\n    with open(orig_file, \"r\") as ins:\n        counter = {}\n        for line in ins:\n            if line.startswith('@'):\n                continue\n            name = line.split()[0].lower()\n            if name in chrms:\n                if name in counter:\n                    counter[name] += 1\n                else:\n                    counter[name] = 0\n                suffix = \"\" if (counter[name] == 0) else \"_\" + str(counter[name])\n                create_file(line, name + suffix)\n                names.append(name + suffix)\n                prev = name\n            else:\n                name = others_name\n                if not name in names:\n                    names.append(name)\n                try:\n                    add_to_file(line, name)\n                except:\n                    raise Exception(\n                        \"Couldn't create or write in the file in mode 4\")\n\n    create_file(str(names), \"names\", extension=\".txt\")\n\n\ndef prepare_intervals():\n    # reading input files and split mode from command line\n    args = docopt(__doc__, version='1.0')\n\n    bed_file = args['--bed']\n    fai_file = args['--fai']\n    split_mode = int(args['--mode'])\n\n    # define file name for non-chromosomal contigs\n    others_name = 'others'\n\n    global formats, lformat\n    formats = [\"chr start end\", \"chr:start-end\"]\n    lformat = args['--format']\n    if lformat == None:\n        lformat = formats[0]\n    if not lformat in formats:\n        raise Exception('Unsuported interval format')\n\n    if not os.path.exists(r\"./Intervals\"):\n        os.mkdir(r\"./Intervals\")\n    else:\n        files = glob.glob(r\"./Intervals/*\")\n        for f in files:\n            os.remove(f)\n\n    # create variable input_file taking bed_file as priority\n    if bed_file:\n        input_file = bed_file\n    elif fai_file:\n        input_file = fai2bed(fai_file)\n    else:\n        raise Exception('No input files are provided')\n\n    # calling adequate split mode function\n    if split_mode == 1:\n        mode_1(input_file)\n    elif split_mode == 2:\n        mode_2(input_file, others_name)\n    elif split_mode == 3:\n        if bed_file:\n            mode_3(input_file)\n        else:\n            raise Exception('Bed file is required for mode 3')\n    elif split_mode == 4:\n        mode_4(input_file, others_name)\n    else:\n        raise Exception('Split mode value is not set')\n\n\ndef is_header(line):\n    x = line.split('\\t')\n    try:\n        int(x[1])\n        int(x[2])\n        header = False\n    except:\n        sys.stderr.write('Line is skipped: {}'.format(line))\n        header = True\n    return header\n\n\nif __name__ == '__main__':\n    prepare_intervals()",
                "filename": "sbg_prepare_intervals.py"
              }
            ]
          },
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ]
      },
      "id": "#SBG_Prepare_Intervals",
      "sbg:y": 658.4616348529505
    },
    {
      "sbg:x": 115.66668864091304,
      "inputs": [
        {
          "id": "#FastQC.threads"
        },
        {
          "id": "#FastQC.quiet"
        },
        {
          "id": "#FastQC.nogroup"
        },
        {
          "id": "#FastQC.nano"
        },
        {
          "id": "#FastQC.memory_per_job"
        },
        {
          "id": "#FastQC.limits_file"
        },
        {
          "id": "#FastQC.kmers"
        },
        {
          "source": [
            "#fastq"
          ],
          "id": "#FastQC.input_fastq"
        },
        {
          "id": "#FastQC.format"
        },
        {
          "id": "#FastQC.cpus_per_job"
        },
        {
          "id": "#FastQC.contaminants_file"
        },
        {
          "id": "#FastQC.casava"
        },
        {
          "id": "#FastQC.adapters_file"
        }
      ],
      "outputs": [
        {
          "id": "#FastQC.report_zip"
        },
        {
          "id": "#FastQC.report_html"
        }
      ],
      "run": {
        "sbg:cmdPreview": "fastqc  --noextract --outdir .  /path/to/input_fastq-1.fastq  /path/to/input_fastq-2.fastq",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "bix-demo",
        "outputs": [
          {
            "sbg:fileTypes": "ZIP",
            "label": "Report zip",
            "id": "#report_zip",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input_fastq",
              "glob": "*_fastqc.zip",
              "sbg:metadata": {
                "__inherit__": "input_fastq"
              }
            },
            "type": [
              "null",
              {
                "name": "report_zip",
                "items": "File",
                "type": "array"
              }
            ],
            "description": "Zip archive of the report."
          },
          {
            "sbg:fileTypes": "HTML",
            "label": "Report HTMLs",
            "id": "#report_html",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input_fastq",
              "glob": "*.html"
            },
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "FastQC reports in HTML format."
          }
        ],
        "label": "FastQC",
        "sbg:latestRevision": 11,
        "id": "bix-demo/fastqc-0-11-4-demo/fastqc-0-11-4/11",
        "y": 420.0000894202157,
        "sbg:createdOn": 1450911593,
        "successCodes": [],
        "sbg:validationErrors": [],
        "class": "CommandLineTool",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 2,
            "mem": 1624
          },
          "inputs": {
            "quiet": true,
            "format": null,
            "memory_per_job": null,
            "cpus_per_job": null,
            "threads": null,
            "input_fastq": [
              {
                "path": "/path/to/input_fastq-1.fastq",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input_fastq-2.fastq",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ]
          }
        },
        "sbg:links": [
          {
            "id": "http://www.bioinformatics.babraham.ac.uk/projects/fastqc/",
            "label": "Homepage"
          },
          {
            "id": "http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.4_source.zip",
            "label": "Source Code"
          },
          {
            "id": "https://wiki.hpcc.msu.edu/display/Bioinfo/FastQC+Tutorial",
            "label": "Wiki"
          },
          {
            "id": "http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.4.zip",
            "label": "Download"
          },
          {
            "id": "http://www.bioinformatics.babraham.ac.uk/projects/fastqc",
            "label": "Publication"
          }
        ],
        "baseCommand": [
          "fastqc"
        ],
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/mladenlsbg/fastqc:0.11.4",
            "dockerImageId": "759c4c8fbafd"
          },
          {
            "class": "sbg:CPURequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  // if cpus_per_job is set, it takes precedence\n  if ($job.inputs.cpus_per_job) {\n    return $job.inputs.cpus_per_job \n  }\n  // if threads parameter is set, the number of CPUs is set based on that parametere\n  else if ($job.inputs.threads) {\n    return $job.inputs.threads\n  }\n  // else the number of CPUs is determined by the number of input files, up to 7 -- default\n  else return Math.min([].concat($job.inputs.input_fastq).length,7)\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  // if memory_per_job is set, it takes precedence\n  if ($job.inputs.memory_per_job){\n    return $job.inputs.memory_per_job\n  }\n  // if threads parameter is set, memory req is set based on the number of threads\n  else if ($job.inputs.threads){\n    return 1024 + 300*$job.inputs.threads\n  }\n  // else the memory req is determined by the number of input files, up to 7 -- default\n  else return (1024 + 300*Math.min([].concat($job.inputs.input_fastq).length,7))\n}\n\n",
              "engine": "#cwl-js-engine"
            }
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911593,
            "sbg:revisionNotes": null,
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911593,
            "sbg:revisionNotes": null,
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911594,
            "sbg:revisionNotes": null,
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "mladenlSBG",
            "sbg:modifiedOn": 1459870965,
            "sbg:revisionNotes": null,
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "mladenlSBG",
            "sbg:modifiedOn": 1465990120,
            "sbg:revisionNotes": null,
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "mladenlSBG",
            "sbg:modifiedOn": 1476188095,
            "sbg:revisionNotes": "Input categories added.",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "mladenlSBG",
            "sbg:modifiedOn": 1476270496,
            "sbg:revisionNotes": "FASTQ input changed from single file to array. Added better thread handling. \n\nIMPORTANT NOTICE: If updating this tool in existing workflow, it's necessary to REMOVE SCATTER (uncheck it) from input_fastq or it might break the pipeline.",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "mladenlSBG",
            "sbg:modifiedOn": 1476354537,
            "sbg:revisionNotes": "FASTQ input changed from single file to array. Added better thread handling.\n\nIMPORTANT NOTICE: If updating this tool in existing workflow, it's necessary to REMOVE SCATTER (uncheck it) from input_fastq or it might break the pipeline.",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "mladenlSBG",
            "sbg:modifiedOn": 1488882730,
            "sbg:revisionNotes": "IMPORTANT NOTICE: If updating this tool in existing workflow, it's necessary to REMOVE SCATTER (uncheck it) from input_fastq or it might break the pipeline.\"\n\nAdded automatised handling of BAM and SAM files. Also, added security measures for better automated threading handling.",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1488980183,
            "sbg:revisionNotes": "Changed the file types of limits, adapters and contaminants files to be TXT, they have to be in format name[tab]sequence. Format should be similar to the one in the Configuration folder provided with FastQC, txt files.\n\n\"IMPORTANT NOTICE: If updating this tool in existing workflow, it's necessary to REMOVE SCATTER (uncheck it) from input_fastq or it might break the pipeline.\"",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1493223877,
            "sbg:revisionNotes": "* Fixed the JS expression for the CPU and Memory allocation\n* Added cpus_per_job and memory_per_job parameters\n* Removed default version for format, so the tool can handle combinations of file formats",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1529400574,
            "sbg:revisionNotes": "HTML output added.",
            "sbg:revision": 11
          }
        ],
        "x": 115.66668864091304,
        "sbg:license": "GNU General Public License v3.0 only",
        "sbg:image_url": null,
        "stdin": "",
        "sbg:toolAuthor": "Babraham Institute",
        "sbg:contributors": [
          "bix-demo",
          "mladenlSBG",
          "nikola_jovanovic"
        ],
        "inputs": [
          {
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n//if \"threads\" is not specified\n//number of threads is determined based on number of inputs\n  if (! $job.inputs.threads){\n    $job.inputs.threads = [].concat($job.inputs.input_fastq).length\n  }\n  return Math.min($job.inputs.threads,7)\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--threads"
            },
            "id": "#threads",
            "label": "Threads",
            "sbg:category": "Options",
            "sbg:altPrefix": "-t",
            "sbg:toolDefaultValue": "1",
            "type": [
              "null",
              "int"
            ],
            "description": "Specifies the number of files which can be processed simultaneously.  Each thread will be allocated 250MB of memory so you shouldn't run more threads than your available memory will cope with, and not more than 6 threads on a 32 bit machine."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet"
            },
            "label": "Quiet",
            "sbg:category": "Options",
            "sbg:altPrefix": "-q",
            "id": "#quiet",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Supress all progress messages on stdout and only report errors."
          },
          {
            "label": "Nogroup",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": false,
              "prefix": "--nogroup"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#nogroup",
            "description": "Disable grouping of bases for reads >50bp. All reports will show data for every base in the read.  WARNING: Using this option will cause fastqc to crash and burn if you use it on really long reads, and your plots may end up a ridiculous size. You have been warned."
          },
          {
            "label": "Nano",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": false,
              "prefix": "--nano"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#nano",
            "description": "Files come from naopore sequences and are in fast5 format. In this mode you can pass in directories to process and the program will take in all fast5 files within those directories and produce a single output file from the sequences found in all files."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Amount of memory allocated per job execution.",
            "sbg:category": "Execution parameters",
            "sbg:toolDefaultValue": "Determined by the number of input files",
            "id": "#memory_per_job",
            "description": "Amount of memory allocated per execution of FastQC job."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--limits"
            },
            "sbg:fileTypes": "TXT",
            "label": "Limits",
            "sbg:category": "File inputs",
            "sbg:altPrefix": "-l",
            "id": "#limits_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Specifies a non-default file which contains a set of criteria which will be used to determine the warn/error limits for the various modules.  This file can also be used to selectively remove some modules from the output all together.  The format needs to mirror the default limits.txt file found in the Configuration folder."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--kmers"
            },
            "id": "#kmers",
            "label": "Kmers",
            "sbg:category": "Options",
            "sbg:altPrefix": "-f",
            "sbg:toolDefaultValue": "7",
            "type": [
              "null",
              "int"
            ],
            "description": "Specifies the length of Kmer to look for in the Kmer content module. Specified Kmer length must be between 2 and 10. Default length is 7 if not specified."
          },
          {
            "sbg:fileTypes": "FASTQ, FQ, FASTQ.GZ, FQ.GZ, BAM, SAM",
            "label": "Input file",
            "sbg:category": "File inputs",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "position": 100,
              "sbg:cmdInclude": true
            },
            "id": "#input_fastq",
            "required": true,
            "type": [
              {
                "name": "input_fastq",
                "items": "File",
                "type": "array"
              }
            ],
            "description": "Input file."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--format"
            },
            "id": "#format",
            "label": "Format",
            "sbg:category": "Options",
            "sbg:altPrefix": "-f",
            "sbg:toolDefaultValue": "FASTQ",
            "type": [
              "null",
              {
                "name": "format",
                "symbols": [
                  "bam",
                  "sam",
                  "bam_mapped",
                  "sam_mapped",
                  "fastq"
                ],
                "type": "enum"
              }
            ],
            "description": "Bypasses the normal sequence file format detection and forces the program to use the specified format.  Valid formats are BAM, SAM, BAM_mapped, SAM_mapped and FASTQ."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Number of CPUs.",
            "sbg:category": "Execution parameters",
            "sbg:toolDefaultValue": "Determined by the number of input files",
            "id": "#cpus_per_job",
            "description": "Number of CPUs to be allocated per execution of FastQC."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--contaminants"
            },
            "sbg:fileTypes": "TXT",
            "label": "Contaminants",
            "sbg:category": "File inputs",
            "sbg:altPrefix": "-c",
            "id": "#contaminants_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Specifies a non-default file which contains the list of contaminants to screen overrepresented sequences against. The file must contain sets of named contaminants in the form name[tab]sequence.  Lines prefixed with a hash will be ignored."
          },
          {
            "label": "Casava",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": false,
              "prefix": "--casava"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#casava",
            "description": "Files come from raw casava output. Files in the same sample group (differing only by the group number) will be analysed as a set rather than individually. Sequences with the filter flag set in the header will be excluded from the analysis. Files must have the same names given to them by casava (including being gzipped and ending with .gz) otherwise they won't be grouped together correctly."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--adapters"
            },
            "sbg:fileTypes": "TXT",
            "label": "Adapters",
            "sbg:category": "File inputs",
            "sbg:altPrefix": "-a",
            "id": "#adapters_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Specifies a non-default file which contains the list of adapter sequences which will be explicity searched against the library. The file must contain sets of named adapters in the form name[tab]sequence.  Lines prefixed with a hash will be ignored."
          }
        ],
        "sbg:project": "bix-demo/fastqc-0-11-4-demo",
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "arguments": [
          {
            "valueFrom": "--noextract",
            "separate": true,
            "prefix": ""
          },
          {
            "valueFrom": ".",
            "separate": true,
            "prefix": "--outdir"
          }
        ],
        "stdout": "",
        "sbg:publisher": "sbg",
        "description": "FastQC reads a set of sequence files and produces a quality control (QC) report from each one. These reports consist of a number of different modules, each of which will help identify a different type of potential problem in your data. \n\nSince it's necessary to convert the tool report in order to show them on Seven Bridges platform, it's recommended to use [FastQC Analysis workflow instead](https://igor.sbgenomics.com/public/apps#admin/sbg-public-data/fastqc-analysis/). \n\nFastQC is a tool which takes a FASTQ file and runs a series of tests on it to generate a comprehensive QC report.  This report will tell you if there is anything unusual about your sequence.  Each test is flagged as a pass, warning, or fail depending on how far it departs from what you would expect from a normal large dataset with no significant biases.  It is important to stress that warnings or even failures do not necessarily mean that there is a problem with your data, only that it is unusual.  It is possible that the biological nature of your sample means that you would expect this particular bias in your results.",
        "sbg:modifiedBy": "nikola_jovanovic",
        "sbg:toolkit": "FastQC",
        "sbg:projectName": "FastQC 0.11.4 - Demo",
        "sbg:toolkitVersion": "0.11.4",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:revision": 11,
        "sbg:categories": [
          "FASTQ-Processing",
          "Quality-Control",
          "Quantification"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1529400574,
        "sbg:sbgMaintained": false,
        "sbg:id": "h-5817f41e/h-8ced9b69/h-57550ff8/0",
        "temporaryFailCodes": [],
        "sbg:revisionNotes": "HTML output added."
      },
      "id": "#FastQC",
      "sbg:y": 420.0000894202157
    },
    {
      "sbg:x": 55.38462453763157,
      "inputs": [
        {
          "id": "#BWA_INDEX_1.total_memory"
        },
        {
          "source": [
            "#reference"
          ],
          "id": "#BWA_INDEX_1.reference"
        },
        {
          "id": "#BWA_INDEX_1.prefix_of_the_index_to_be_output"
        },
        {
          "id": "#BWA_INDEX_1.do_not_add_alt_contig_to_reference"
        },
        {
          "id": "#BWA_INDEX_1.bwt_construction"
        },
        {
          "id": "#BWA_INDEX_1.block_size"
        },
        {
          "id": "#BWA_INDEX_1.add_64_to_fasta_name"
        }
      ],
      "outputs": [
        {
          "id": "#BWA_INDEX_1.indexed_reference"
        }
      ],
      "run": {
        "sbg:cmdPreview": "cp /opt/hs38DH.fa.alt reference38.fasta.alt ; bwa index reference38.fasta            ; tar -cf reference38.fasta.tar reference38.fasta *.amb *.ann *.bwt *.pac *.sa *.alt ;",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "vladimirk",
        "class": "CommandLineTool",
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/bwa:0.7.17",
            "dockerImageId": "2f813371e803"
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  \n  GB_1 = 1024*1024*1024\n  reads_size = $job.inputs.reference.size\n\n  if(!reads_size) { reads_size = GB_1 }\n  \n  if($job.inputs.total_memory){\n    return $job.inputs.total_memory * 1024\n  } else if (ext=='tar'){\n    return 128\n  }\n    {\n    return (parseInt(1.5 * reads_size / (1024*1024)))\n  }\n}",
              "engine": "#cwl-js-engine"
            }
          }
        ],
        "label": "BWA INDEX",
        "sbg:latestRevision": 3,
        "sbg:toolkitVersion": "0.7.17",
        "sbg:sbgMaintained": false,
        "sbg:createdOn": 1531828242,
        "successCodes": [],
        "sbg:validationErrors": [],
        "sbg:project": "vladimirk/bwa-mem-bundle-0-7-17-demo",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 1536
          },
          "inputs": {
            "add_64_to_fasta_name": false,
            "total_memory": null,
            "reference": {
              "path": "/path/to/the/reference38.fasta",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".amb"
                },
                {
                  "path": ".ann"
                },
                {
                  "path": ".bwt"
                },
                {
                  "path": ".pac"
                },
                {
                  "path": ".sa"
                }
              ]
            },
            "block_size": null,
            "prefix_of_the_index_to_be_output": "prefix",
            "do_not_add_alt_contig_to_reference": false,
            "bwt_construction": null
          }
        },
        "description": "BWA INDEX constructs the FM-index (Full-text index in Minute space) for the reference genome.\nGenerated index files will be used with BWA MEM, BWA ALN, BWA SAMPE and BWA SAMSE tools.\n\nIf input reference file has TAR extension it is assumed that BWA indices came together with it. BWA INDEX will only pass that TAR to the output. If input is not TAR, the creation of BWA indices and its packing in TAR file (together with the reference) will be performed.\n\nTAR also contains alt reference from bwa.kit suggested by the author of the tool.",
        "y": 44.6153840905817,
        "outputs": [
          {
            "sbg:fileTypes": "TAR",
            "label": "TARed fasta with its BWA indices",
            "id": "#indexed_reference",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#reference",
              "glob": {
                "class": "Expression",
                "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar'){\n    return reference_file\n  }\n  else{\n    return reference_file + '.tar'\n  }\n}\n",
                "engine": "#cwl-js-engine"
              },
              "sbg:metadata": {
                "reference": {
                  "class": "Expression",
                  "script": "{\n  path = [].concat($job.inputs.reference)[0].path.split('/')\n  last = path.pop()\n  return last\n}",
                  "engine": "#cwl-js-engine"
                }
              }
            },
            "type": [
              "null",
              "File"
            ],
            "description": "TARed fasta with its BWA indices."
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531828242,
            "sbg:revisionNotes": "Copy of vladimirk/bwa-mem-bundle-0-7-13-demo/bwa-index/18",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531839752,
            "sbg:revisionNotes": "add alt to TAR",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531840345,
            "sbg:revisionNotes": "*.alt correction",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531844984,
            "sbg:revisionNotes": "docs",
            "sbg:revision": 3
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "x": 55.38462453763157,
        "sbg:license": "GNU Affero General Public License v3.0, MIT License",
        "id": "vladimirk/bwa-mem-bundle-0-7-17-demo/bwa-index/3",
        "stdin": "",
        "sbg:toolAuthor": "Heng Li",
        "sbg:contributors": [
          "vladimirk"
        ],
        "inputs": [
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#total_memory",
            "description": "Total memory [GB] to be reserved for the tool (Default value is 1.5 x size_of_the_reference).",
            "label": "Total memory [Gb]",
            "sbg:category": "Configuration"
          },
          {
            "sbg:fileTypes": "FASTA,FA,FA.GZ,FASTA.GZ,TAR",
            "label": "Reference",
            "sbg:category": "File input",
            "required": true,
            "id": "#reference",
            "type": [
              "File"
            ],
            "description": "Input reference fasta of TAR file with reference and indices.",
            "sbg:stageInput": "link"
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#prefix_of_the_index_to_be_output",
            "description": "Prefix of the index [same as fasta name].",
            "label": "Prefix of the index to be output",
            "sbg:category": "Configuration"
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Do not add alt contigs file to TAR bundle",
            "sbg:toolDefaultValue": "False",
            "id": "#do_not_add_alt_contig_to_reference",
            "description": "Do not add alt contigs file to TAR bundle.",
            "sbg:stageInput": null
          },
          {
            "id": "#bwt_construction",
            "label": "Bwt construction",
            "sbg:category": "Configuration",
            "sbg:toolDefaultValue": "auto",
            "type": [
              "null",
              {
                "name": "bwt_construction",
                "symbols": [
                  "bwtsw",
                  "is",
                  "div"
                ],
                "type": "enum"
              }
            ],
            "description": "Algorithm for constructing BWT index. Available options are:s\tIS linear-time algorithm for constructing suffix array. It requires 5.37N memory where N is the size of the database. IS is moderately fast, but does not work with database larger than 2GB. IS is the default algorithm due to its simplicity. The current codes for IS algorithm are reimplemented by Yuta Mori. bwtsw\tAlgorithm implemented in BWT-SW. This method works with the whole human genome. Warning: `-a bwtsw' does not work for short genomes, while `-a is' and `-a div' do not work not for long genomes."
          },
          {
            "id": "#block_size",
            "label": "Block size",
            "sbg:category": "Configuration",
            "sbg:toolDefaultValue": "10000000",
            "type": [
              "null",
              "int"
            ],
            "description": "Block size for the bwtsw algorithm (effective with -a bwtsw)."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "id": "#add_64_to_fasta_name",
            "description": "Index files named as <in.fasta>64 instead of <in.fasta>.*.",
            "label": "Output index files renamed by adding 64",
            "sbg:category": "Configuration"
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar' || !$job.inputs.bwt_construction){\n    return ''\n  } else {\n    return '-a ' + $job.inputs.bwt_construction\n  }\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar' || !$job.inputs.prefix){\n    return ''\n  } else {\n    return '-p ' + $job.inputs.prefix\n  }\n}\n",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar' || !$job.inputs.block_size){\n    return ''\n  } else {\n    return '-b ' + $job.inputs.block_size\n  }\n}\n\n",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar' || !$job.inputs.add_64_to_fasta_name){\n    return ''\n  } else {\n    return '-6 '\n  }\n}\n",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar'){\n    return ''\n  }\n  else{\n    extensions = ' *.amb' + ' *.ann' + ' *.bwt' + ' *.pac' + ' *.sa'\n    if(!$job.inputs.do_not_add_alt_contig_to_reference){\n      if (reference_file.search('38') >= 0){\n        extensions = extensions + ' *.alt ; '\n      }\n    }\n    tar_cmd = 'tar -cf ' + reference_file + '.tar ' + reference_file + extensions\n    return ' ; ' + tar_cmd\n  }\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:categories": [
          "Indexing",
          "FASTA-Processing"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "http://bio-bwa.sourceforge.net/",
            "label": "Homepage"
          },
          {
            "id": "https://github.com/lh3/bwa",
            "label": "Source code"
          },
          {
            "id": "http://bio-bwa.sourceforge.net/bwa.shtml",
            "label": "Wiki"
          },
          {
            "id": "http://sourceforge.net/projects/bio-bwa/",
            "label": "Download"
          },
          {
            "id": "http://www.ncbi.nlm.nih.gov/pubmed/19451168",
            "label": "Publication"
          }
        ],
        "baseCommand": [
          {
            "class": "Expression",
            "script": "{\n  reference_file = $job.inputs.reference.path.split('/')[$job.inputs.reference.path.split('/').length-1]\n  ext = reference_file.split('.')[reference_file.split('.').length-1]\n  if(ext=='tar'){\n    return 'echo Index files passed without any processing!'\n  }\n  else{\n    \n    cp_alt_cmd = ''\n\n    if(!$job.inputs.do_not_add_alt_contig_to_reference){\n      if (reference_file.search('38') >= 0){\n        cp_alt_cmd = 'cp /opt/hs38DH.fa.alt ' + reference_file + '.alt ; '\n      }\n    }\n    \n    index_cmd = 'bwa index '+ reference_file + ' '\n    \n    return cp_alt_cmd + index_cmd\n  }\n}",
            "engine": "#cwl-js-engine"
          }
        ],
        "sbg:toolkit": "BWA",
        "sbg:image_url": null,
        "sbg:revisionNotes": "docs",
        "sbg:revision": 3,
        "sbg:projectName": "BWA MEM Bundle 0.7.17 - Demo",
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1531844984,
        "sbg:id": "h-b657d3cc/h-2262d2fc/h-cce99859/0",
        "temporaryFailCodes": [],
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ]
      },
      "id": "#BWA_INDEX_1",
      "sbg:y": 44.6153840905817
    },
    {
      "sbg:x": 3081.538726253629,
      "inputs": [
        {
          "source": [
            "#GATK_MergeVcfs_2.output"
          ],
          "id": "#SnpEff.variants_file"
        },
        {
          "id": "#SnpEff.up_down_stream_len"
        },
        {
          "id": "#SnpEff.total_memory"
        },
        {
          "id": "#SnpEff.threads"
        },
        {
          "id": "#SnpEff.strict"
        },
        {
          "id": "#SnpEff.stats"
        },
        {
          "id": "#SnpEff.splicesitesize"
        },
        {
          "id": "#SnpEff.splice_site_region_intron_max"
        },
        {
          "id": "#SnpEff.splice_region_intron_min"
        },
        {
          "id": "#SnpEff.splice_region_exons_size"
        },
        {
          "id": "#SnpEff.sequenceontology"
        },
        {
          "id": "#SnpEff.reg"
        },
        {
          "id": "#SnpEff.output_format"
        },
        {
          "id": "#SnpEff.onlyreg"
        },
        {
          "id": "#SnpEff.only_protein"
        },
        {
          "id": "#SnpEff.onlyTr"
        },
        {
          "id": "#SnpEff.oicr"
        },
        {
          "id": "#SnpEff.nostats"
        },
        {
          "id": "#SnpEff.no_utr"
        },
        {
          "id": "#SnpEff.no_upstream"
        },
        {
          "id": "#SnpEff.no_shift_hgvs"
        },
        {
          "id": "#SnpEff.no_next_prot"
        },
        {
          "id": "#SnpEff.no_motif"
        },
        {
          "id": "#SnpEff.no_lof"
        },
        {
          "id": "#SnpEff.no_intron"
        },
        {
          "id": "#SnpEff.no_intergenic"
        },
        {
          "id": "#SnpEff.no_interaction"
        },
        {
          "id": "#SnpEff.no_hgvs"
        },
        {
          "id": "#SnpEff.no_genome"
        },
        {
          "id": "#SnpEff.no_downstream"
        },
        {
          "id": "#SnpEff.no_EffectType"
        },
        {
          "id": "#SnpEff.noExpandIUB"
        },
        {
          "id": "#SnpEff.nextprot"
        },
        {
          "id": "#SnpEff.motif"
        },
        {
          "id": "#SnpEff.max_tsl"
        },
        {
          "id": "#SnpEff.interval"
        },
        {
          "id": "#SnpEff.interaction"
        },
        {
          "id": "#SnpEff.input_format"
        },
        {
          "id": "#SnpEff.hgvs_tr_id"
        },
        {
          "id": "#SnpEff.hgvs_1_letter"
        },
        {
          "id": "#SnpEff.hgvsOld"
        },
        {
          "id": "#SnpEff.geneid"
        },
        {
          "id": "#SnpEff.format_eff"
        },
        {
          "id": "#SnpEff.filterinterval"
        },
        {
          "source": [
            "#database"
          ],
          "id": "#SnpEff.database"
        },
        {
          "id": "#SnpEff.csvstats"
        },
        {
          "id": "#SnpEff.configuration_file"
        },
        {
          "id": "#SnpEff.configOption"
        },
        {
          "id": "#SnpEff.classic"
        },
        {
          "id": "#SnpEff.chr"
        },
        {
          "id": "#SnpEff.canonList"
        },
        {
          "id": "#SnpEff.canon"
        },
        {
          "id": "#SnpEff.cancersamples"
        },
        {
          "id": "#SnpEff.cancer"
        },
        {
          "source": [
            "#assembly"
          ],
          "id": "#SnpEff.assembly"
        },
        {
          "id": "#SnpEff.add_lof_tag"
        },
        {
          "id": "#SnpEff.add_hgvs_anno"
        }
      ],
      "outputs": [
        {
          "id": "#SnpEff.summary_text"
        },
        {
          "id": "#SnpEff.summary"
        },
        {
          "id": "#SnpEff.annotated"
        }
      ],
      "run": {
        "x": 3081.538726253629,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/jrandjelovic/snpeff:v4.3k",
            "dockerImageId": "aae3dcb89b53"
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "script": "{\n  if ($job.inputs.total_memory)\n  {\n    return $job.inputs.total_memory * 1024\n  }\n  \n  else\n  {\n    return 8192\n  }\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          }
        ],
        "sbg:latestRevision": 5,
        "sbg:cmdPreview": "unzip -o /path/to/database/GRCh37.75.zip -d /opt/snpEff ; java -Xmx3072M -jar /opt/snpEff/snpEff.jar  -nodownload  -noLog GRCh37.75  path/to/variants/variants_file.vcf  > variants_file.snpEff_annotated.vcf",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 3072
          },
          "inputs": {
            "configOption": null,
            "format_eff": false,
            "output_format": null,
            "csvstats": false,
            "no_EffectType": [
              "no_EffectType-string-value-1",
              "no_EffectType-string-value-2"
            ],
            "variants_file": {
              "path": "path/to/variants/variants_file.vcf",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "no_motif": false,
            "chr": "",
            "splice_region_intron_min": 7,
            "configuration_file": {
              "path": null,
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "no_hgvs": false,
            "hgvs_1_letter": false,
            "strict": false,
            "max_tsl": null,
            "splice_site_region_intron_max": 8,
            "interval": [
              {
                "path": "/path/to/interval-1.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/interval-2.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "add_hgvs_anno": false,
            "noExpandIUB": false,
            "threads": false,
            "no_genome": false,
            "stats": "",
            "total_memory": 3,
            "database": {
              "path": "/path/to/database/GRCh37.75.zip",
              "secondaryFiles": [],
              "metadata": {}
            },
            "hgvs_tr_id": false,
            "hgvsOld": false,
            "only_protein": false,
            "no_next_prot": false,
            "input_format": null,
            "interaction": false,
            "oicr": false,
            "no_interaction": false,
            "no_lof": false,
            "onlyTr": {
              "path": "/path/to/onlyTr.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "up_down_stream_len": null,
            "splice_region_exons_size": null,
            "no_shift_hgvs": false,
            "assembly": "GRCh37.75",
            "nostats": false,
            "classic": false
          }
        },
        "sbg:sbgMaintained": false,
        "outputs": [
          {
            "sbg:fileTypes": "TXT",
            "label": "Summary",
            "id": "#summary_text",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variants_file",
              "glob": "*.txt"
            },
            "type": [
              "null",
              "File"
            ],
            "description": "SnpEff Summary in text format."
          },
          {
            "sbg:fileTypes": "HTML, CSV",
            "label": "Summary file",
            "id": "#summary",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variants_file",
              "glob": "*.{html,csv}"
            },
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "SnpEff summary file in HTML or CSV file format."
          },
          {
            "sbg:fileTypes": "VCF, TXT, GATK, BED, BEDANN",
            "label": "SnpEff annotated file",
            "id": "#annotated",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variants_file",
              "glob": {
                "script": "{\t\n  filename = $job.inputs.variants_file.path\n  basename = filename.split('.').slice(0, filename.split('.').length-1).join('.').replace(/^.*[\\\\\\/]/, '')\n \n  \n  if($job.inputs.output_format === \"txt\")\n  {\n    return basename.concat(\".snpEff_annotated.txt\")\n  }\n  else if ($job.inputs.output_format === \"bed\" || $job.inputs.output_format === \"bedAnn\")\n  {\n    return basename.concat(\".snpEff_annotated.bed\")\n  }\n  else\n  {\n    return basename.concat(\".snpEff_annotated.vcf\")\n  }\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              }
            },
            "type": [
              "null",
              "File"
            ],
            "description": "SnpEff annotated file."
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "jrandjelovic",
            "sbg:modifiedOn": 1510312055,
            "sbg:revisionNotes": "Copy of jrandjelovic/snpeff-4-3/snpeff-4-2/19",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "jrandjelovic",
            "sbg:modifiedOn": 1511868923,
            "sbg:revisionNotes": "Copy of jrandjelovic/snpeff-4-3/snpeff-4-2/20",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "jrandjelovic",
            "sbg:modifiedOn": 1512125273,
            "sbg:revisionNotes": "Copy of jrandjelovic/snpeff-4-3/snpeff-4-2/26",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "jrandjelovic",
            "sbg:modifiedOn": 1534243005,
            "sbg:revisionNotes": "Copy of jrandjelovic/snpeff-4-3/snpeff-4-2/29",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "jrandjelovic",
            "sbg:modifiedOn": 1539181260,
            "sbg:revisionNotes": "Copy of jrandjelovic/snpeff-4-3/snpeff-4-2/30",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "jrandjelovic",
            "sbg:modifiedOn": 1539197199,
            "sbg:revisionNotes": "Copy of jrandjelovic/snpeff-4-3/snpeff-4-2/31",
            "sbg:revision": 5
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "script": "{\t\n  filename = $job.inputs.variants_file.path\n  basename = filename.split('.').slice(0, filename.split('.').length-1).join('.').replace(/^.*[\\\\\\/]/, '')\n \n  \n  if($job.inputs.output_format === \"txt\")\n  {\n    name = basename.concat(\".snpEff_annotated.txt\")\n  }\n  else if ($job.inputs.output_format === \"bed\" || $job.inputs.output_format === \"bedAnn\")\n  {\n    name = basename.concat(\".snpEff_annotated.bed\")\n  }\n  else\n  {\n    name = basename.concat(\".snpEff_annotated.vcf\")\n  }\n  return '> ' + name\n}\n",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 5000
          },
          {
            "valueFrom": "-nodownload",
            "separate": true,
            "position": 0
          },
          {
            "valueFrom": "-noLog",
            "separate": true,
            "position": 0
          }
        ],
        "sbg:project": "jrandjelovic/snpeff-4-3-demo",
        "inputs": [
          {
            "sbg:fileTypes": "VCF, TXT, PILEUP, BED",
            "label": "Input variants file",
            "sbg:category": "File type inputs",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 2001
            },
            "id": "#variants_file",
            "required": true,
            "type": [
              "File"
            ],
            "description": "Input variants file."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-upDownStreamLen",
              "position": 490
            },
            "label": "Upstream downstream interval length",
            "sbg:category": "Database options",
            "sbg:altPrefix": "-ud",
            "id": "#up_down_stream_len",
            "required": false,
            "type": [
              "null",
              "int"
            ],
            "description": "Set upstream downstream interval length (in bases)."
          },
          {
            "id": "#total_memory",
            "label": "Java memory requirement [Gb]",
            "sbg:category": "Other input types",
            "sbg:toolDefaultValue": "8",
            "required": false,
            "type": [
              "null",
              "int"
            ],
            "description": "RAM requirement for the java process execution [Gb]."
          },
          {
            "id": "#threads",
            "label": "Use multiple threads (implies '-noStats')",
            "sbg:category": "Other input types",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-t",
              "position": 280
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use multiple threads (implies '-noStats'). Default: False."
          },
          {
            "id": "#strict",
            "label": "Only use validated transcripts",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-strict",
              "position": 480
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Only use 'validated' transcripts (i.e. sequence has been checked). Default: false."
          },
          {
            "inputBinding": {
              "valueFrom": {
                "script": "{\n  if ($job.inputs.stats)\n  {\n    return $job.inputs.stats\n  }\n  else if (!$job.inputs.nostats)\n  { \n    filename = $job.inputs.variants_file.path.split('/').pop()\n    primename = filename.split('.vcf')[0]\n    return primename.concat(\".html\")\n  }\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-stats",
              "position": 60
            },
            "description": "Name of stats file (summary).",
            "label": "Name of stats file (summary)",
            "sbg:category": "Options",
            "sbg:altPrefix": "-s",
            "id": "#stats",
            "required": false,
            "type": [
              "null",
              "string"
            ],
            "sbg:toolDefaultValue": "snpEff_summary.html"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--spliceSiteSize",
              "position": 430
            },
            "description": "Set size for splice sites (donor and acceptor) in bases.",
            "label": "Set size for splice sites (donor and acceptor) in bases",
            "sbg:category": "Database options",
            "sbg:altPrefix": "-ss",
            "id": "#splicesitesize",
            "required": false,
            "type": [
              "null",
              "int"
            ],
            "sbg:toolDefaultValue": "2"
          },
          {
            "description": "Set maximum number of bases for splice site region within intron. Default: 8 bases.",
            "label": "Set maximum number of bases for splice site region within intron",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-spliceRegionIntronMax",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "required": false,
            "id": "#splice_site_region_intron_max",
            "sbg:toolDefaultValue": "8",
            "sbg:stageInput": null
          },
          {
            "description": "Set minimum number of bases for splice site region within intron. Default: 3 bases.",
            "label": "Set minimum number of bases for splice site region within intron",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-spliceRegionIntronMin",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "required": false,
            "id": "#splice_region_intron_min",
            "sbg:toolDefaultValue": "3",
            "sbg:stageInput": null
          },
          {
            "id": "#splice_region_exons_size",
            "label": "Set size for splice site region within exons",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-spliceRegionExonSize",
              "position": 440
            },
            "sbg:toolDefaultValue": "3",
            "required": false,
            "type": [
              "null",
              "int"
            ],
            "description": "Set size for splice site region within exons. Default: 3 bases."
          },
          {
            "id": "#sequenceontology",
            "label": "Use Sequence Ontology terms",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-sequenceOntology",
              "position": 250
            },
            "sbg:toolDefaultValue": "True",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use Sequence Ontology terms."
          },
          {
            "label": "Regulation track to use (this option can be used add several times)",
            "sbg:category": "Database options",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "-reg",
              "position": 420,
              "sbg:cmdInclude": true
            },
            "id": "#reg",
            "required": false,
            "type": [
              "null",
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            ],
            "description": "Regulation track to use (this option can be used add several times)."
          },
          {
            "id": "#output_format",
            "label": "Ouput format",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-o",
              "position": 50
            },
            "sbg:toolDefaultValue": "vcf",
            "required": false,
            "type": [
              "null",
              {
                "name": "output_format",
                "symbols": [
                  "vcf",
                  "gatk",
                  "bed",
                  "bedAnn"
                ],
                "type": "enum"
              }
            ],
            "description": "Ouput format. Possible values: {txt, vcf, gatk, bed, bedAnn}."
          },
          {
            "label": "Only use regulation tracks",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-onlyReg",
              "position": 400
            },
            "id": "#onlyreg",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Only use regulation tracks."
          },
          {
            "id": "#only_protein",
            "label": "Only use protein coding transcripts",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-onlyProtein",
              "position": 410
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Only use protein coding transcripts. Default: false."
          },
          {
            "sbg:fileTypes": "TXT",
            "label": "Only use transcripts from this file",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-onlyTr",
              "position": 0
            },
            "id": "#onlyTr",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Only use the transcripts in this file. Format: One transcript ID per line."
          },
          {
            "id": "#oicr",
            "label": "Add OICR tag in VCF file",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-oicr",
              "position": 240
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Add OICR tag in VCF file."
          },
          {
            "label": "Do not create stats (summary) file",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noStats",
              "position": 70
            },
            "id": "#nostats",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not create stats (summary) file."
          },
          {
            "label": "Do not show 5_PRIME_UTR or 3_PRIME_UTR changes",
            "sbg:category": "Results filter options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-no-utr",
              "position": 130
            },
            "id": "#no_utr",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not show 5_PRIME_UTR or 3_PRIME_UTR changes."
          },
          {
            "label": "Do not show upstream changes",
            "sbg:category": "Results filter options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-no-upstream",
              "position": 120
            },
            "id": "#no_upstream",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not show upstream changes."
          },
          {
            "id": "#no_shift_hgvs",
            "label": "Do not shift variants according to HGVS",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noShiftHgvs",
              "position": 230
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not shift variants according to HGVS notation (most 3-prime end)."
          },
          {
            "label": "Disable NextProt annotations",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noNextProt",
              "position": 390
            },
            "type": [
              "null",
              "boolean"
            ],
            "required": false,
            "id": "#no_next_prot",
            "description": "Disable NextProt annotations.",
            "sbg:stageInput": null
          },
          {
            "label": "Disable motif annotations",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noMotif",
              "position": 380
            },
            "type": [
              "null",
              "boolean"
            ],
            "required": false,
            "id": "#no_motif",
            "description": "Disable motif annotations.",
            "sbg:stageInput": null
          },
          {
            "id": "#no_lof",
            "label": "Do not add LOF and NMD annotations",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noLof",
              "position": 220
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not add LOF and NMD annotations."
          },
          {
            "label": "Do not show intron changes",
            "sbg:category": "Results filter options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-no-intron",
              "position": 110
            },
            "id": "#no_intron",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not show intron changes."
          },
          {
            "label": "Do not show intergenic changes",
            "sbg:category": "Results filter options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-no-intergenic",
              "position": 100
            },
            "id": "#no_intergenic",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not show intergenic changes."
          },
          {
            "id": "#no_interaction",
            "label": "Disable interaction annotations",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noInteraction",
              "position": 370
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Disable interaction annotations."
          },
          {
            "label": "Do not add HGVS annotations",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noHgvs",
              "position": 210
            },
            "type": [
              "null",
              "boolean"
            ],
            "required": false,
            "id": "#no_hgvs",
            "description": "Do not add HGVS annotations.",
            "sbg:stageInput": null
          },
          {
            "label": "Do not load any genomic database",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noGenome",
              "position": 360
            },
            "type": [
              "null",
              "boolean"
            ],
            "required": false,
            "id": "#no_genome",
            "description": "Do not load any genomic database (e.g. annotate using custom files).",
            "sbg:stageInput": null
          },
          {
            "label": "Do not show downstream changes",
            "sbg:category": "Results filter options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-no-downstream",
              "position": 90
            },
            "id": "#no_downstream",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Do not show downstream changes."
          },
          {
            "label": "Do not show EffectType",
            "sbg:category": "Results filter options",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "-no",
              "sbg:cmdInclude": true
            },
            "id": "#no_EffectType",
            "required": false,
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "description": "Do not show 'EffectType'. This option can be used several times."
          },
          {
            "label": "Disable IUB code expansion",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-noExpandIUB"
            },
            "id": "#noExpandIUB",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Disable IUB code expansion in input variants."
          },
          {
            "label": "Annotate using NextProt (requires NextProt database)",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-nextProt",
              "position": 350
            },
            "id": "#nextprot",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Annotate using NextProt (requires NextProt database)."
          },
          {
            "id": "#motif",
            "label": "Annotate using motifs (requires Motif database)",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-motif",
              "position": 340
            },
            "sbg:toolDefaultValue": "True",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Annotate using motifs (requires Motif database)."
          },
          {
            "label": "Max TSL",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-maxTSL",
              "position": 330
            },
            "id": "#max_tsl",
            "required": false,
            "type": [
              "null",
              "int"
            ],
            "description": "Only use transcripts having Transcript Support Level lower than this cutoff."
          },
          {
            "sbg:fileTypes": "TXT, BED, BigBed, VCF, GFF",
            "label": "Use a custom intervals in TXT/BED/BigBed/VCF/GFF file (you may use this option many times)",
            "sbg:category": "Database options",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "-interval",
              "position": 320,
              "sbg:cmdInclude": true
            },
            "id": "#interval",
            "required": false,
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "Use a custom intervals in TXT/BED/BigBed/VCF/GFF file (you may use this option many times).",
            "sbg:stageInput": null
          },
          {
            "id": "#interaction",
            "label": "Annotate using interactions",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-interaction",
              "position": 310
            },
            "sbg:toolDefaultValue": "True",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Annotate using inteactions (requires interaciton database). Default: true."
          },
          {
            "id": "#input_format",
            "label": "Input format",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-i",
              "position": 40
            },
            "sbg:toolDefaultValue": "vcf",
            "required": false,
            "type": [
              "null",
              {
                "name": "input_format",
                "symbols": [
                  "vcf",
                  " bed"
                ],
                "type": "enum"
              }
            ],
            "description": "Input format. Possible values: {vcf, txt, pileup, bed}. [Default: vcf]."
          },
          {
            "id": "#hgvs_tr_id",
            "label": "Use transcript ID in HGVS",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-hgvsTrId",
              "position": 190
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use transcript ID in HGVS notation. Default: false."
          },
          {
            "id": "#hgvs_1_letter",
            "label": "Use one letter Amino acid codes in HGVS",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-hgvs1LetterAa",
              "position": 180
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use one letter Amino acid codes in HGVS notation. Default: false."
          },
          {
            "id": "#hgvsOld",
            "label": "Use old HGVS notation",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-hgvsOld"
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use old HGVS notation."
          },
          {
            "id": "#geneid",
            "label": "Use gene ID instead of gene name (VCF output)",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-geneId",
              "position": 170
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use gene ID instead of gene name (VCF output). Default: false."
          },
          {
            "label": "Use EFF field",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-formatEff",
              "position": 160
            },
            "id": "#format_eff",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use 'EFF' field compatible with older versions (instead of 'ANN')."
          },
          {
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "-filterInterval",
              "position": 80,
              "sbg:cmdInclude": true
            },
            "sbg:fileTypes": "interval",
            "label": "Only analyze changes that intersect with the intervals specified in this file (you may use this option many times)",
            "sbg:category": "Results filter options",
            "sbg:altPrefix": "-fi",
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "required": false,
            "id": "#filterinterval",
            "description": "Only analyze changes that intersect with the intervals specified in this file."
          },
          {
            "sbg:fileTypes": "ZIP",
            "label": "SnpEff database file",
            "sbg:category": "File type inputs",
            "id": "#database",
            "required": true,
            "type": [
              "File"
            ],
            "description": "SnpEff database file is zip archive that can be downloaded from the SnpEff official site, or using the SnpEff download app."
          },
          {
            "label": "Create CSV summary file alongside HTML",
            "sbg:category": "Options",
            "inputBinding": {
              "valueFrom": {
                "script": "{\n  if ($job.inputs.csvstats)\n  {\n    filename = $job.inputs.variants_file.path.split('/').pop()\n    primename = filename.split('.vcf')[0]\n    return primename.concat(\".csv\")\n  }\n}\n",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-csvStats",
              "position": 20
            },
            "type": [
              "null",
              "boolean"
            ],
            "required": false,
            "id": "#csvstats",
            "description": "Create CSV summary file alongside HTML.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-c",
              "position": 260
            },
            "sbg:fileTypes": "config",
            "label": "Configuration file",
            "sbg:category": "Generic options",
            "sbg:altPrefix": "-config",
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#configuration_file",
            "description": "Specify config file.",
            "sbg:stageInput": "link"
          },
          {
            "label": "Override a config file option (name=value format)",
            "sbg:category": "Generic options",
            "inputBinding": {
              "itemSeparator": null,
              "separate": true,
              "prefix": "-configOption",
              "sbg:cmdInclude": true
            },
            "id": "#configOption",
            "required": false,
            "type": [
              "null",
              {
                "items": "string",
                "type": "array"
              }
            ],
            "description": "Override a config file option. Please note that the options should be entered in name=value format."
          },
          {
            "label": "Use old style annotations",
            "sbg:category": "General options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-classic",
              "position": 10
            },
            "id": "#classic",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use old style annotations instead of Sequence Ontology and Hgvs."
          },
          {
            "label": "String to prepend to chromosome names",
            "sbg:category": "Options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-chr",
              "position": 55
            },
            "id": "#chr",
            "required": false,
            "type": [
              "null",
              "string"
            ],
            "description": "Prepend 'string' to chromosome name (e.g. 'chr1' instead of '1'). Only on TXT output."
          },
          {
            "label": "Canon list file",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-canonList"
            },
            "id": "#canonList",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Only use canonical transcripts, replace some transcripts using the 'gene_id \t transcript_id' entries in <file>."
          },
          {
            "label": "Only use canonical transcripts",
            "sbg:category": "Database options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-canon",
              "position": 300
            },
            "id": "#canon",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Only use canonical transcripts."
          },
          {
            "sbg:fileTypes": "TXT",
            "label": "Two column TXT file defining 'original and derived' samples",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-cancerSamples",
              "position": 150
            },
            "id": "#cancersamples",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Two column TXT file defining 'original \\t derived' samples."
          },
          {
            "id": "#cancer",
            "label": "Perform 'cancer' comparisons (somatic vs. germline)",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-cancer",
              "position": 140
            },
            "sbg:toolDefaultValue": "False",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Perform 'cancer' comparisons (somatic vs. germline)."
          },
          {
            "label": "Assembly (genome version)",
            "sbg:category": "Inputs",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": false,
              "position": 2000
            },
            "id": "#assembly",
            "required": true,
            "type": [
              "string"
            ],
            "description": "Genome version matching the SnpEff database used (for example GRCh37.75 or GRCh38.86)."
          },
          {
            "label": "Add loss of function (LOF) and nonsense mediated decay (NMD) tags",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-lof",
              "position": 200
            },
            "id": "#add_lof_tag",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Add loss of function (LOF) and nonsense mediated decay (NMD) tags."
          },
          {
            "id": "#add_hgvs_anno",
            "label": "Use HGVS annotations for amino acid sub-field",
            "sbg:category": "Annotations options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-hgvs",
              "position": 170
            },
            "sbg:toolDefaultValue": "True",
            "required": false,
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use HGVS annotations for amino acid sub-field. Default: true."
          }
        ],
        "appUrl": "/u/jrandjelovic/snpeff-4-3-demo/apps/#jrandjelovic/snpeff-4-3-demo/snpeff-4-3/5",
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "http://snpeff.sourceforge.net/index.html",
            "label": "Homepage"
          },
          {
            "id": "https://github.com/pcingola/SnpEff",
            "label": "Source Code"
          },
          {
            "id": "http://snpeff.sourceforge.net/SnpEff_manual.html",
            "label": "Wiki"
          },
          {
            "id": "http://sourceforge.net/projects/snpeff/files/snpEff_latest_core.zip",
            "label": "Download"
          },
          {
            "id": "http://snpeff.sourceforge.net/SnpEff_paper.pdf",
            "label": "Publication"
          }
        ],
        "sbg:modifiedBy": "jrandjelovic",
        "sbg:toolkitVersion": "4.3k",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Pablo Cingolani/Broad Institue",
        "sbg:projectName": "SnpEff 4.3 Demo",
        "baseCommand": [
          {
            "script": "{\n  return 'unzip -o ' + $job.inputs.database.path + ' -d /opt/snpEff ;'\n}",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          "java",
          {
            "script": "{\n  //java -Xmx4g path/to/snpEff/snpEff.jar -c path/to/snpEff/snpEff.config GRCh37.75 path/to/snps.vcf\n  if($job.inputs.total_memory){\n    mem_mb = parseInt($job.inputs.total_memory) * 1024\n  \treturn '-Xmx'.concat(mem_mb, 'M')\n  }\n  \treturn '-Xmx8192M'\n}\n\n",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          "-jar",
          "/opt/snpEff/snpEff.jar"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "jrandjelovic",
        "abg:revisionNotes": "cosmetic, label typo",
        "sbg:revision": 5,
        "sbg:copyOf": "jrandjelovic/snpeff-4-3/snpeff-4-2/31",
        "sbg:createdOn": 1510312055,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 332.30771381332994,
        "sbg:license": "GNU Lesser General Public License v3.0 only",
        "sbg:contributors": [
          "jrandjelovic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "jrandjelovic/snpeff-4-3-demo/snpeff-4-3/5",
        "description": "**SnpEff** is a variant annotation and effect prediction\u200b tool, which annotates and predicts the effects of variants on genes, such as amino acid changes [1].\n\n*A list of **all inputs and parameters** with corresponding descriptions can be found at the end of the page.*\n\n### Common Use Cases\n\nTypical usage assumes predicted variants (SNPs, insertions, deletions, and MNPs) as input, usually in variant call format (VCF). **SnpEff** analyzes and annotates input variants and calculates the effects they produce on known genes [1]. The output file can be in several file formats, most common being VCF.\n\n**SnpEff** requires an annotation database to run. Official SnpEff annotation databases can be downloaded from [here](https://sourceforge.net/projects/snpeff/files/databases/v4_3/); however, human databases are also hosted on Seven Bridges, in Public Reference Files section (files snpEff_v4_3_GRCh38.86.zip and\tsnpEff_v4_3_GRCh37.75.zip) and can be [imported](https://docs.sevenbridges.com/docs/copy-files-using-the-visual-interface).\n\n### Changes Introduced by Seven Bridges\n\n* Input VCF file (**Input variants file**) is required (as opposed to default input being STDIN).\n* Parameter **Java memory requirement [Gb]** which controls the amount of RAM available to **SnpEff** was included in the wrapper.\n* The following parameters have been excluded from the wrapper:  \n    * `-download`  - The tool is expected to use data from the provided database archive.\n    * `-fileList` - Processing multiple files can be achieved by using batch tasks or scatter mode in workflows.\n    * `-dataDir <path>`  - In the wrapper, data directory is always the same and corresponds to the location of the prepared **SnpEff** database.\n    * `-download`  - Supplying a database archive as an input is required. Downloading missing data for a genome from command line is not supported.\n    * `-help`, `-quiet`, `-verbose`, `-debug` and `-version` - These options are not usually included in Seven Bridges wrappers.\n\n### Common Issues and Important Notes\n\n* Required inputs are **Input variants file** (a VCF or VCF.GZ file to be annotated), **SnpEff database file** (SnpEff database ZIP archive matching the major version of SnpEff used [2], which is 4.3 for this wrapper; e.g. snpEff_v4_3_GRCh38.86.zip or snpEff_v4_3_GRCh37.75.zip from Public Reference Files section), and **Assembly (genome version)**, which is a string representing genome version/assembly (e.g., GRCh38.86, GRCh37.75, hg19), matching the SnpEff database used (GRCh38.86 and GRCh37.75 should be used for the files in the Public Reference Files section).\n* As **SnpEff** is a java tool, it may be occasionally necessary to increase the amount of allocated RAM (default value: 8192 MB), using the **Java memory requirement [Gb]** parameter.\n* A number of **SnpEff** command line options are designed in mutually exclusive pairs (for example `-noStats` and `-stats` or `-lof` and `-noLof`) with some redundancy. These options should not be used together, to avoid task failure.\n* Multithreading parameter **Use multiple threads (implies '-noStats')** (`-t`) will disable statistics. \n* If using VCFs with mitochondrial DNA marked as chrM with GRCh38 database, chromosome not found error can be addressed by renaming chrM to chrMT in the input VCF files, for example using sed: `sed \"s/^chrM/chrMT/g\" input.vcf > input_renamed.vcf`\n* Disabling statistics using **Do not create stats (summary) file** (`-noStats`) will in general speed-up execution.\n\n### Performance Benchmarking\n\nAnnotating NA12878 genome (GRCh38, ~220 Mb as VCF.GZ) with default annotation parameters, 1 CPU, and 8192 MB RAM took 25 minutes with a cost of $0.17 using on-demand default instance.\nBy default, **SnpEff** is allocated 8192 MB of memory. Allocating less memory is not recommended when working with whole genome VCF files.\n\n*Cost can be significantly reduced by **spot instance** usage. Visit [knowledge center](https://docs.sevenbridges.com/docs/about-spot-instances) for more details.*            \n\n### References\n\n[1] [SnpEff documentation](http://snpeff.sourceforge.net/SnpEff_manual.html)\n\n[2] [Official SnpEff 4.3 databases download location](https://sourceforge.net/projects/snpeff/files/databases/v4_3/)",
        "sbg:content_hash": null,
        "sbg:toolkit": "SnpEff",
        "sbg:image_url": null,
        "sbg:revisionNotes": "Copy of jrandjelovic/snpeff-4-3/snpeff-4-2/31",
        "label": "SnpEff",
        "sbg:categories": [
          "Annotation",
          "VCF-Processing"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1539197199,
        "sbg:id": "admin/sbg-public-data/snpeff-4-3/5",
        "temporaryFailCodes": []
      },
      "id": "#SnpEff",
      "sbg:y": 332.30771381332994
    },
    {
      "sbg:x": 163.58977860670944,
      "inputs": [
        {
          "source": [
            "#SBG_FASTQ_Quality_Adjuster.result"
          ],
          "id": "#SBG_Pair_FASTQs_by_Metadata.fastq_list"
        }
      ],
      "outputs": [
        {
          "id": "#SBG_Pair_FASTQs_by_Metadata.tuple_list"
        }
      ],
      "run": {
        "sbg:sbgMaintained": false,
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "bix-demo",
        "sbg:revisionNotes": "Fix for outputEval evaluation failed. Changed map getting to map[a] instead of map.a",
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/nikola_jovanovic/alpine:1",
            "dockerImageId": "d41a0837ab81"
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": 1024
          }
        ],
        "sbg:toolAuthor": "",
        "sbg:latestRevision": 14,
        "sbg:publisher": "sbg",
        "sbg:categories": [
          "Converters",
          "Other"
        ],
        "sbg:createdOn": 1450911289,
        "successCodes": [],
        "sbg:validationErrors": [],
        "sbg:cmdPreview": "echo 'Pairing FASTQs!'",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 1024
          },
          "inputs": {
            "fastq_list": [
              {
                "path": "/asda/dsa/sda/sda/fasta1.fastq",
                "class": "File",
                "size": 0,
                "secondaryFiles": [],
                "metadata": {
                  "sample_id": "a",
                  "paired_end": "1"
                }
              },
              {
                "path": "/asda/dsa/sda/sda/fasta2.fastq",
                "secondaryFiles": [],
                "metadata": {
                  "sample_id": "a",
                  "paired_end": "2"
                }
              },
              {
                "path": "/asda/dsa/sda/sda/fasta3.fastq",
                "secondaryFiles": [],
                "metadata": {
                  "sample_id": "b",
                  "paired_end": ""
                }
              }
            ]
          }
        },
        "sbg:license": "Apache License 2.0",
        "outputs": [
          {
            "sbg:fileTypes": "FASTQ,FQ,FASTQ.GZ,FQ.GZ",
            "label": "List of grouped FASTQ files",
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "outputBinding": {
              "outputEval": {
                "class": "Expression",
                "script": "{\n    function get_meta_map(m, file, meta) {\n        if (meta in file.metadata) {\n            return m[file.metadata[meta]]\n        } else {\n            return m['Undefined']\n        }\n    }\n\n    function create_new_map(map, file, meta) {\n        if (meta in file.metadata) {\n            map[file.metadata[meta]] = {}\n            return map[file.metadata[meta]]\n        } else {\n            map['Undefined'] = {}\n            return map['Undefined']\n        }\n    }\n\n    arr = [].concat($job.inputs.fastq_list)\n    map = {}\n\n    for (i in arr) {\n\n        sm_map = get_meta_map(map, arr[i], 'sample_id')\n        if (!sm_map) sm_map = create_new_map(map, arr[i], 'sample_id')\n\n        lb_map = get_meta_map(sm_map, arr[i], 'library_id')\n        if (!lb_map) lb_map = create_new_map(sm_map, arr[i], 'library_id')\n\n        pu_map = get_meta_map(lb_map, arr[i], 'platform_unit_id')\n        if (!pu_map) pu_map = create_new_map(lb_map, arr[i], 'platform_unit_id')\n\n        if ('file_segment_number' in arr[i].metadata) {\n            if (pu_map[arr[i].metadata['file_segment_number']]) {\n                a = pu_map[arr[i].metadata['file_segment_number']]\n                ar = [].concat(a)\n                ar = ar.concat(arr[i])\n                pu_map[arr[i].metadata['file_segment_number']] = ar\n            } else {\n              pu_map[arr[i].metadata['file_segment_number']] = [].concat(arr[i])\n            }\n        } else {\n            if (pu_map['Undefined']) {\n                a = pu_map['Undefined']\n                ar = [].concat(a)\n                ar = ar.concat(arr[i])\n                pu_map['Undefined'] = ar\n            } else {\n                pu_map['Undefined'] = [].concat(arr[i])\n            }\n        }\n    }\n    tuple_list = []\n    for (sm in map)\n        for (lb in map[sm])\n            for (pu in map[sm][lb]) {\n                for (fsm in map[sm][lb][pu]) {\n                    list = map[sm][lb][pu][fsm]\n                    tuple_list.push(list)\n                }\n            }\n    return tuple_list\n}\n",
                "engine": "#cwl-js-engine"
              }
            },
            "id": "#tuple_list",
            "description": "List of grouped FASTQ files by metadata fields."
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911289,
            "sbg:revisionNotes": null,
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911290,
            "sbg:revisionNotes": null,
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911290,
            "sbg:revisionNotes": null,
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1463403276,
            "sbg:revisionNotes": null,
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "markop",
            "sbg:modifiedOn": 1469015151,
            "sbg:revisionNotes": "Link fastq_list",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1472059795,
            "sbg:revisionNotes": "Added support for single file.",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1489510320,
            "sbg:revisionNotes": null,
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1489665046,
            "sbg:revisionNotes": null,
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1498052477,
            "sbg:revisionNotes": "Fixed a typo.",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1504713791,
            "sbg:revisionNotes": "Fix - error message will appear if files are grouped but have no metadata.",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1505480936,
            "sbg:revisionNotes": "Changed order of pairings (pe1,pe2).",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1508759852,
            "sbg:revisionNotes": "Changed to JavaScript",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1530873664,
            "sbg:revisionNotes": "Changed docker image to images.sbgenomics.com.",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1538404498,
            "sbg:revisionNotes": "JS fix for cwl 1.0",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1547648917,
            "sbg:revisionNotes": "Fix for outputEval evaluation failed. Changed map getting to map[a] instead of map.a",
            "sbg:revision": 14
          }
        ],
        "x": 163.58977860670944,
        "arguments": [],
        "sbg:contributors": [
          "bix-demo",
          "markop",
          "nikola_jovanovic",
          "vladimirk"
        ],
        "sbg:project": "bix-demo/sbgtools-demo",
        "inputs": [
          {
            "sbg:fileTypes": "FASTQ, FQ, FASTQ.GZ, FQ.GZ",
            "label": "List of FASTQ files",
            "required": true,
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "id": "#fastq_list",
            "description": "List of the FASTQ files with properly set metadata fileds.",
            "sbg:stageInput": "link"
          }
        ],
        "sbg:revision": 14,
        "sbg:content_hash": "aef49e72a7e4f23956e043c94a8a2279dfe32824fde935a0e69f66c608e52ba31",
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "temporaryFailCodes": [],
        "id": "bix-demo/sbgtools-demo/sbg-pair-fastqs-by-metadata/14",
        "description": "Tool accepts list of FASTQ files groups them into separate lists. This grouping is done using metadata values and their hierarchy (Sample ID > Library ID > Platform unit ID > File segment number) which should create unique combinations for each pair of FASTQ files. Important metadata fields are Sample ID, Library ID, Platform unit ID and File segment number. Not all of these four metadata fields are required, but the present set has to be sufficient to create unique combinations for each pair of FASTQ files. Files with no paired end metadata are grouped in the same way as the ones with paired end metadata, generally they should be alone in a separate list. Files with no metadata set will be grouped together. \n\nIf there are more than two files in a group, this might create errors further down most pipelines and the user should check if the metadata fields for those files are set properly.",
        "sbg:modifiedBy": "nikola_jovanovic",
        "sbg:toolkit": "SBGTools",
        "sbg:image_url": null,
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "label": "SBG Pair FASTQs by Metadata",
        "sbg:projectName": "SBGTools - Demo New",
        "cwlVersion": "sbg:draft-2",
        "baseCommand": [
          "echo",
          "'Pairing",
          "FASTQs!'"
        ],
        "sbg:id": "admin/sbg-public-data/sbg-pair-fastqs-by-metadata/16",
        "sbg:modifiedOn": 1547648917,
        "class": "CommandLineTool",
        "y": 199.48723191481605,
        "stdin": ""
      },
      "id": "#SBG_Pair_FASTQs_by_Metadata",
      "sbg:y": 199.48723191481605
    },
    {
      "sbg:x": 373.33346019851314,
      "inputs": [
        {
          "source": [
            "#SBG_Untar_fasta.output_fasta"
          ],
          "id": "#SBG_FASTA_Indices.reference"
        },
        {
          "id": "#SBG_FASTA_Indices.memory_per_job"
        }
      ],
      "outputs": [
        {
          "id": "#SBG_FASTA_Indices.fasta_reference"
        },
        {
          "id": "#SBG_FASTA_Indices.fasta_index"
        },
        {
          "id": "#SBG_FASTA_Indices.fasta_dict"
        }
      ],
      "run": {
        "sbg:sbgMaintained": false,
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "bix-demo",
        "sbg:revisionNotes": "Reverted.",
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/nikola_jovanovic/samtoolspicard:1.0",
            "dockerImageId": "b177f5bd06db"
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "script": "{\n  if($job.inputs.memory_per_job)return $job.inputs.memory_per_job + 500\n  else return 2548\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          }
        ],
        "label": "SBG FASTA Indices",
        "sbg:latestRevision": 14,
        "id": "bix-demo/sbgtools-demo/sbg-fasta-indices/14",
        "sbg:categories": [
          "Indexing"
        ],
        "sbg:createdOn": 1450911283,
        "successCodes": [],
        "sbg:validationErrors": [],
        "sbg:cmdPreview": "samtools faidx  /path/to/reference.fa.gz && java -Xmx10M -jar /opt/picard.jar CreateSequenceDictionary R=/path/to/reference.fa.gz O=reference.dict",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 510
          },
          "inputs": {
            "reference": {
              "path": "/path/to/reference.fa.gz",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "memory_per_job": 10
          }
        },
        "sbg:license": "Apache License 2.0",
        "outputs": [
          {
            "type": [
              "null",
              "File"
            ],
            "sbg:fileTypes": "FASTA",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#reference",
              "glob": {
                "script": "{\n  return $job.inputs.reference.path.split('/').pop()\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              },
              "secondaryFiles": [
                ".fai",
                "^.dict",
                "^^.dict"
              ]
            },
            "id": "#fasta_reference",
            "label": "Reference"
          },
          {
            "type": [
              "null",
              "File"
            ],
            "sbg:fileTypes": "FAI",
            "outputBinding": {
              "glob": "*.fai",
              "sbg:metadata": {}
            },
            "id": "#fasta_index",
            "label": "FASTA Index"
          },
          {
            "type": [
              "null",
              "File"
            ],
            "sbg:fileTypes": "DICT",
            "outputBinding": {
              "glob": "*.dict",
              "sbg:metadata": {}
            },
            "id": "#fasta_dict",
            "label": "FASTA Dictionary"
          }
        ],
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911283,
            "sbg:revisionNotes": null,
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1450911283,
            "sbg:revisionNotes": null,
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1458655251,
            "sbg:revisionNotes": null,
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "bix-demo",
            "sbg:modifiedOn": 1458655509,
            "sbg:revisionNotes": null,
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "markop",
            "sbg:modifiedOn": 1458658019,
            "sbg:revisionNotes": null,
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "markop",
            "sbg:modifiedOn": 1458669249,
            "sbg:revisionNotes": null,
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1504530329,
            "sbg:revisionNotes": "Removed python script. Changed docker to just samtools and picard. Wrapped both faidx and CreateSequenceDictionary and exposed memory parameter for java execution.",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1506419953,
            "sbg:revisionNotes": "Changed join to join('.').",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1519907048,
            "sbg:revisionNotes": "Added support for FA.GZ, FASTA.GZ",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1519909639,
            "sbg:revisionNotes": "Added secondary .dict support for fasta.gz",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1528989492,
            "sbg:revisionNotes": "returned to rev 8",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1528990550,
            "sbg:revisionNotes": "rev 7",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1528991971,
            "sbg:revisionNotes": "rev 9: Added secondary .dict support",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1539180036,
            "sbg:revisionNotes": "Updated version for samtools (1.9) and picard (2.18.14)",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1539181752,
            "sbg:revisionNotes": "Reverted.",
            "sbg:revision": 14
          }
        ],
        "x": 373.33346019851314,
        "arguments": [
          {
            "valueFrom": {
              "script": "{\n  memory = '2048'\n  if ($job.inputs.memory_per_job){\n    memory = $job.inputs.memory_per_job\n  }\n  filename = $job.inputs.reference.path.split('/').pop()\n  basename = filename.split('.')\n  if (filename.endsWith('.gz')){\n    basename.pop()\n  }\n  basename.pop()\n  name = basename.join('.')\n  return 'java -Xmx' + memory + 'M -jar /opt/picard.jar CreateSequenceDictionary R=' + $job.inputs.reference.path + ' O=' + name + '.dict'\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "&&",
            "position": 1
          }
        ],
        "sbg:contributors": [
          "vladimirk",
          "markop",
          "bix-demo",
          "nikola_jovanovic"
        ],
        "sbg:project": "bix-demo/sbgtools-demo",
        "inputs": [
          {
            "sbg:fileTypes": "FASTA,FA,FA.GZ,FASTA.GZ",
            "label": "FASTA file",
            "sbg:category": "Input files",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 0
            },
            "id": "#reference",
            "required": true,
            "type": [
              "File"
            ],
            "description": "FASTA file to be indexed",
            "sbg:stageInput": "link"
          },
          {
            "id": "#memory_per_job",
            "label": "Memory per job",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "2048",
            "type": [
              "null",
              "int"
            ],
            "description": "Memory in megabytes required for each execution of the tool."
          }
        ],
        "sbg:revision": 14,
        "sbg:content_hash": null,
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "temporaryFailCodes": [],
        "sbg:publisher": "sbg",
        "description": "Tool allows creating FASTA dictionary and index simultaneously which is necessary for running GATK tools. This version of tool for indexing uses SAMtools faidx command (toolkit version 1.9), while for the FASTA dictionary is used Picard CreateFastaDictionary (toolkit version 2.18.14)",
        "sbg:modifiedBy": "nikola_jovanovic",
        "sbg:toolkit": "SBGTools",
        "sbg:image_url": null,
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Sanja Mijalkovic, Seven Bridges Genomics, <sanja.mijalkovic@sbgenomics.com>",
        "sbg:projectName": "SBGTools - Demo New",
        "cwlVersion": "sbg:draft-2",
        "baseCommand": [
          "samtools",
          "faidx"
        ],
        "sbg:id": "admin/sbg-public-data/sbg-fasta-indices/21",
        "sbg:modifiedOn": 1539181752,
        "class": "CommandLineTool",
        "y": -130.66664127508696,
        "stdin": ""
      },
      "id": "#SBG_FASTA_Indices",
      "sbg:y": -130.66664127508696
    },
    {
      "sbg:x": 367.6924870903057,
      "inputs": [
        {
          "id": "#BWA_MEM_Bundle.wgs_hg38_mode_threads"
        },
        {
          "id": "#BWA_MEM_Bundle.verbose_level"
        },
        {
          "id": "#BWA_MEM_Bundle.use_soft_clipping"
        },
        {
          "id": "#BWA_MEM_Bundle.unpaired_read_penalty"
        },
        {
          "id": "#BWA_MEM_Bundle.total_memory",
          "default": 15
        },
        {
          "id": "#BWA_MEM_Bundle.threads",
          "default": 8
        },
        {
          "id": "#BWA_MEM_Bundle.split_alignment_primary"
        },
        {
          "id": "#BWA_MEM_Bundle.speficy_distribution_parameters"
        },
        {
          "id": "#BWA_MEM_Bundle.sort_memory",
          "default": 2
        },
        {
          "id": "#BWA_MEM_Bundle.smart_pairing_in_input_fastq"
        },
        {
          "id": "#BWA_MEM_Bundle.skip_seeds"
        },
        {
          "id": "#BWA_MEM_Bundle.skip_pairing"
        },
        {
          "id": "#BWA_MEM_Bundle.skip_mate_rescue"
        },
        {
          "id": "#BWA_MEM_Bundle.select_seeds"
        },
        {
          "id": "#BWA_MEM_Bundle.seed_occurrence_for_the_3rd_round"
        },
        {
          "id": "#BWA_MEM_Bundle.score_for_a_sequence_match"
        },
        {
          "id": "#BWA_MEM_Bundle.rg_sample_id"
        },
        {
          "id": "#BWA_MEM_Bundle.rg_platform_unit_id"
        },
        {
          "id": "#BWA_MEM_Bundle.rg_platform"
        },
        {
          "id": "#BWA_MEM_Bundle.rg_median_fragment_length"
        },
        {
          "id": "#BWA_MEM_Bundle.rg_library_id"
        },
        {
          "id": "#BWA_MEM_Bundle.rg_id"
        },
        {
          "id": "#BWA_MEM_Bundle.rg_data_submitting_center"
        },
        {
          "id": "#BWA_MEM_Bundle.reserved_threads",
          "default": 1
        },
        {
          "source": [
            "#BWA_INDEX_1.indexed_reference"
          ],
          "id": "#BWA_MEM_Bundle.reference_index_tar"
        },
        {
          "id": "#BWA_MEM_Bundle.read_type"
        },
        {
          "id": "#BWA_MEM_Bundle.read_group_header"
        },
        {
          "id": "#BWA_MEM_Bundle.output_name"
        },
        {
          "id": "#BWA_MEM_Bundle.output_in_xa"
        },
        {
          "id": "#BWA_MEM_Bundle.output_header"
        },
        {
          "id": "#BWA_MEM_Bundle.output_format"
        },
        {
          "id": "#BWA_MEM_Bundle.output_alignments"
        },
        {
          "id": "#BWA_MEM_Bundle.num_input_bases_in_each_batch"
        },
        {
          "id": "#BWA_MEM_Bundle.mismatch_penalty"
        },
        {
          "id": "#BWA_MEM_Bundle.minimum_seed_length"
        },
        {
          "id": "#BWA_MEM_Bundle.minimum_output_score"
        },
        {
          "id": "#BWA_MEM_Bundle.mate_rescue_rounds"
        },
        {
          "id": "#BWA_MEM_Bundle.mark_shorter"
        },
        {
          "id": "#BWA_MEM_Bundle.mapQ_of_suplementary"
        },
        {
          "id": "#BWA_MEM_Bundle.insert_string_to_header"
        },
        {
          "source": [
            "#SBG_Pair_FASTQs_by_Metadata.tuple_list"
          ],
          "id": "#BWA_MEM_Bundle.input_reads"
        },
        {
          "id": "#BWA_MEM_Bundle.ignore_alt_file"
        },
        {
          "id": "#BWA_MEM_Bundle.gap_open_penalties"
        },
        {
          "id": "#BWA_MEM_Bundle.gap_extension_penalties"
        },
        {
          "id": "#BWA_MEM_Bundle.filter_out_secondary_alignments"
        },
        {
          "id": "#BWA_MEM_Bundle.dropoff"
        },
        {
          "id": "#BWA_MEM_Bundle.drop_chains_fraction"
        },
        {
          "id": "#BWA_MEM_Bundle.discard_exact_matches"
        },
        {
          "id": "#BWA_MEM_Bundle.discard_chain_length"
        },
        {
          "id": "#BWA_MEM_Bundle.deduplication",
          "default": "RemoveDuplicates"
        },
        {
          "id": "#BWA_MEM_Bundle.clipping_penalty"
        },
        {
          "id": "#BWA_MEM_Bundle.band_width"
        },
        {
          "id": "#BWA_MEM_Bundle.append_comment"
        }
      ],
      "outputs": [
        {
          "id": "#BWA_MEM_Bundle.dups_metrics"
        },
        {
          "id": "#BWA_MEM_Bundle.aligned_reads"
        }
      ],
      "scatter": "#BWA_MEM_Bundle.input_reads",
      "run": {
        "x": 367.6924870903057,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/bwa_biobambam2:0.7.17",
            "dockerImageId": ""
          },
          {
            "class": "sbg:CPURequirement",
            "value": {
              "script": "{  \n  // Calculate suggested number of CPUs depending of the input reads size\n  if ($job.inputs.input_reads.constructor == Array){\n    if ($job.inputs.input_reads[1]){\n      reads_size = $job.inputs.input_reads[0].size + $job.inputs.input_reads[1].size\n    } else{\n      reads_size = $job.inputs.input_reads[0].size\n    }\n  }\n  else{\n    reads_size = $job.inputs.input_reads.size\n  }\n  if(!reads_size) { reads_size = 0 }\n\n\n  GB_1 = 1024*1024*1024\n  if(reads_size < GB_1){ suggested_cpus = 1 }\n  else if(reads_size < 10 * GB_1){ suggested_cpus = 8 }\n  else { suggested_cpus = 31 }\n  \n  if($job.inputs.reserved_threads){ return $job.inputs.reserved_threads }\n  else if($job.inputs.threads){ return $job.inputs.threads } \n  else if($job.inputs.sambamba_threads) { return $job.inputs.sambamba_threads }\n  else{    return suggested_cpus  }\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "script": "{  \n\n  // Calculate suggested number of CPUs depending of the input reads size\n  if ($job.inputs.input_reads.constructor == Array){\n    if ($job.inputs.input_reads[1]){\n      reads_size = $job.inputs.input_reads[0].size + $job.inputs.input_reads[1].size\n    } else{\n      reads_size = $job.inputs.input_reads[0].size\n    }\n  }\n  else{\n    reads_size = $job.inputs.input_reads.size\n  }\n  if(!reads_size) { reads_size = 0 }\n \n  GB_1 = 1024*1024*1024\n  if(reads_size < GB_1){ suggested_memory = 4 }\n  else if(reads_size < 10 * GB_1){ suggested_memory = 15 }\n  else { suggested_memory = 58 }\n  \n  if($job.inputs.total_memory){  \t\n    return  $job.inputs.total_memory* 1024  \n  } \n  else if($job.inputs.sort_memory){\n    return  $job.inputs.sort_memory* 1024\n  }\n  else{  \t\n    return suggested_memory * 1024  \n  }\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          }
        ],
        "sbg:latestRevision": 31,
        "sbg:cmdPreview": "/bin/bash -c \" export REF_CACHE=${PWD} ;  tar -tvf reference.HG38.fasta.gz.tar 1>&2; tar -xf reference.HG38.fasta.gz.tar ;  bwa mem  -R '@RG\\tID:1\\tPL:Illumina\\tSM:dnk_sample' -t 10  reference.HG38.fasta.gz  /path/to/LP6005524-DNA_C01_lane_7.sorted.converted.filtered.pe_2.gz /path/to/LP6005524-DNA_C01_lane_7.sorted.converted.filtered.pe_1.gz  | bamsormadup threads=8 level=1 tmplevel=-1 inputformat=sam outputformat=cram SO=coordinate reference=reference.HG38.fasta.gz indexfilename=LP6005524-DNA_C01_lane_7.sorted.converted.filtered.cram.crai M=LP6005524-DNA_C01_lane_7.sorted.converted.filtered.sormadup_metrics.log > LP6005524-DNA_C01_lane_7.sorted.converted.filtered.cram  ;declare -i pipe_statuses=(\\${PIPESTATUS[*]});len=\\${#pipe_statuses[@]};declare -i tot=0;echo \\${pipe_statuses[*]};for (( i=0; i<\\${len}; i++ ));do if [ \\${pipe_statuses[\\$i]} -ne 0 ];then tot=\\${pipe_statuses[\\$i]}; fi;done;if [ \\$tot -ne 0 ]; then >&2 echo Error in piping. Pipe statuses: \\${pipe_statuses[*]};fi; if [ \\$tot -ne 0 ]; then false;fi\"",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 4096
          },
          "inputs": {
            "band_width": null,
            "output_format": "CRAM",
            "wgs_hg38_mode_threads": 10,
            "sort_memory": null,
            "num_input_bases_in_each_batch": null,
            "skip_seeds": null,
            "rg_median_fragment_length": "",
            "deduplication": "RemoveDuplicates",
            "reference_index_tar": {
              "path": "/path/to/reference.HG38.fasta.gz.tar",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".amb"
                },
                {
                  "path": ".ann"
                },
                {
                  "path": ".bwt"
                },
                {
                  "path": ".pac"
                },
                {
                  "path": ".sa"
                }
              ]
            },
            "output_name": "",
            "read_group_header": "",
            "threads": null,
            "reserved_threads": null,
            "total_memory": null,
            "rg_sample_id": "",
            "rg_library_id": "",
            "rg_platform_unit_id": "",
            "filter_out_secondary_alignments": false,
            "mapQ_of_suplementary": false,
            "rg_platform": null,
            "rg_id": "",
            "rg_data_submitting_center": "",
            "split_alignment_primary": false,
            "input_reads": [
              {
                "path": "/path/to/LP6005524-DNA_C01_lane_7.sorted.converted.filtered.pe_1.gz",
                "class": "File",
                "size": 30000000000,
                "secondaryFiles": [],
                "metadata": {
                  "platform": "HiSeq X Ten",
                  "sample_id": "dnk_sample",
                  "paired_end": "2"
                }
              },
              {
                "path": "/path/to/LP6005524-DNA_C01_lane_7.sorted.converted.filtered.pe_2.gz"
              }
            ],
            "mark_shorter": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530796841,
            "sbg:revisionNotes": "Copy of vladimirk/bwa-mem-bundle-0-7-13-demo/bwa-mem-bundle-0-7-13/46",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530798840,
            "sbg:revisionNotes": "init",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530804573,
            "sbg:revisionNotes": "added biobambam2 sort",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530804812,
            "sbg:revisionNotes": "dedup added",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530805386,
            "sbg:revisionNotes": "boolean inputs fixed",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530806442,
            "sbg:revisionNotes": "output written with >",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531825239,
            "sbg:revisionNotes": "sambamba and samblaster",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531832638,
            "sbg:revisionNotes": "samblaster path corrected",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531834946,
            "sbg:revisionNotes": "Added ALT Contig reference",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531844922,
            "sbg:revisionNotes": "docs",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531845530,
            "sbg:revisionNotes": "num_bases_reproducibility",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1532099074,
            "sbg:revisionNotes": "Do_not_use_alt_38 parameter removed due to redundancy",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1535109085,
            "sbg:revisionNotes": "Added new @RG options.",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535572773,
            "sbg:revisionNotes": "added bamsormadup",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535573623,
            "sbg:revisionNotes": "add 'inputformat=sam'",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535574191,
            "sbg:revisionNotes": "add 'cram output support and capture reference'",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535574401,
            "sbg:revisionNotes": "capture output with + ' > ' + name + extension",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535574812,
            "sbg:revisionNotes": "capturing cram output and dups metrics file",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535575033,
            "sbg:revisionNotes": "add cram selection as an output format",
            "sbg:revision": 18
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535575693,
            "sbg:revisionNotes": "fix output_format options",
            "sbg:revision": 19
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535577792,
            "sbg:revisionNotes": "lower case outputformat=cram",
            "sbg:revision": 20
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535579002,
            "sbg:revisionNotes": "fix typo",
            "sbg:revision": 21
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535581267,
            "sbg:revisionNotes": "tar -tv",
            "sbg:revision": 22
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535590853,
            "sbg:revisionNotes": "see tar contents",
            "sbg:revision": 23
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535592012,
            "sbg:revisionNotes": "1>&2",
            "sbg:revision": 24
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535595110,
            "sbg:revisionNotes": "typo",
            "sbg:revision": 25
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535654957,
            "sbg:revisionNotes": "add export REF_CACHE=$CWD",
            "sbg:revision": 26
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535656111,
            "sbg:revisionNotes": "export REF_CACHE=$CWD ;",
            "sbg:revision": 27
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535656657,
            "sbg:revisionNotes": "REF_CACHE=$PWD",
            "sbg:revision": 28
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1535656778,
            "sbg:revisionNotes": "set REF_CACHE",
            "sbg:revision": 29
          },
          {
            "sbg:modifiedBy": "ogan",
            "sbg:modifiedOn": 1536762661,
            "sbg:revisionNotes": "link to reference_tarball",
            "sbg:revision": 30
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549024607,
            "sbg:revisionNotes": ".bam.bai instead only .bai",
            "sbg:revision": 31
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "script": "{\n  ///////////////////////////////////////////\n ///  BIOBAMBAM BAMSORMADUP   //////////////////////\n///////////////////////////////////////////\n  \nfunction common_substring(a,b) {\n  var i = 0;\n  while(a[i] === b[i] && i < a.length)\n  {\n    i = i + 1;\n  }\n\n  return a.slice(0, i);\n}\n\n   // Set output file name\n  if($job.inputs.input_reads[0] instanceof Array){\n    input_1 = $job.inputs.input_reads[0][0] // scatter mode\n    input_2 = $job.inputs.input_reads[0][1]\n  } else if($job.inputs.input_reads instanceof Array){\n    input_1 = $job.inputs.input_reads[0]\n    input_2 = $job.inputs.input_reads[1]\n  }else {\n    input_1 = [].concat($job.inputs.input_reads)[0]\n    input_2 = input_1\n  }\n  full_name = input_1.path.split('/')[input_1.path.split('/').length-1] \n  \n  if($job.inputs.output_name){name = $job.inputs.output_name }\n  else if ($job.inputs.input_reads.length == 1){\n    name = full_name\n    if(name.slice(-3, name.length) === '.gz' || name.slice(-3, name.length) === '.GZ')\n      name = name.slice(0, -3)   \n    if(name.slice(-3, name.length) === '.fq' || name.slice(-3, name.length) === '.FQ')\n      name = name.slice(0, -3)\n    if(name.slice(-6, name.length) === '.fastq' || name.slice(-6, name.length) === '.FASTQ')\n      name = name.slice(0, -6)\n       \n  }else{\n    full_name2 = input_2.path.split('/')[input_2.path.split('/').length-1] \n    name = common_substring(full_name, full_name2)\n    \n    if(name.slice(-1, name.length) === '_' || name.slice(-1, name.length) === '.')\n      name = name.slice(0, -1)\n    if(name.slice(-2, name.length) === 'p_' || name.slice(-1, name.length) === 'p.')\n      name = name.slice(0, -2)\n    if(name.slice(-2, name.length) === 'P_' || name.slice(-1, name.length) === 'P.')\n      name = name.slice(0, -2)\n    if(name.slice(-3, name.length) === '_p_' || name.slice(-3, name.length) === '.p.')\n      name = name.slice(0, -3)\n    if(name.slice(-3, name.length) === '_pe' || name.slice(-3, name.length) === '.pe')\n      name = name.slice(0, -3)\n  }\n\n  //////////////////////////\n  // Set sort memory size\n  \n  reads_size = 0 // Not used because of situations when size does not exist!\n  GB_1 = 1024*1024*1024\n  if(reads_size < GB_1){ \n    suggested_memory = 4\n    suggested_cpus = 1\n  }\n  else if(reads_size < 10 * GB_1){ \n    suggested_memory = 15\n    suggested_cpus = 8\n  }\n  else { \n    suggested_memory = 58 \n    suggested_cpus = 31\n  }\n  \n  \n  if(!$job.inputs.total_memory){ total_memory = suggested_memory }\n  else{ total_memory = $job.inputs.total_memory }\n\n  // TODO:Rough estimation, should be fine-tuned!\n  if(total_memory > 16){ sorter_memory = parseInt(total_memory / 3) }\n  else{ sorter_memory = 5 }\n          \n  if ($job.inputs.sort_memory){\n    sorter_memory_string = $job.inputs.sort_memory +'GiB'\n  }\n  else sorter_memory_string = sorter_memory + 'GiB' \n  \n  // Read number of threads if defined\n  if ($job.inputs.sambamba_threads){\n    threads = $job.inputs.sambamba_threads\n  }\n  else if ($job.inputs.threads){\n    threads = $job.inputs.threads\n  }\n  else if ($job.inputs.wgs_hg38_mode_threads){\n    MAX_THREADS = 36\n    ref_name_arr = $job.inputs.reference_index_tar.path.split('/')\n    ref_name = ref_name_arr[ref_name_arr.length - 1]\n    if (ref_name.search('38') >= 0){threads = $job.inputs.wgs_hg38_mode_threads}\n    else {threads = MAX_THREADS}\n  }\n  else { threads = 8 }\n  \n  \n  \n  if ($job.inputs.deduplication == \"MarkDuplicates\"){\n    dedup = ' markduplicates=1'\n  }\n  else if ($job.inputs.deduplication == \"RemoveDuplicates\"){\n    dedup = ' rmdup=1'\n  }\n  else{\n   dedup = '' \n  }\n  \n  sort_path = 'bamsormadup'\n  indexfilename = ' '\n  // Coordinate Sorted BAM is default\n  if ($job.inputs.output_format == 'CRAM'){\n    out_format = ' outputformat=cram SO=coordinate'\n    ref_name_arr = $job.inputs.reference_index_tar.path.split('/')\n    ref_name = ref_name_arr[ref_name_arr.length - 1].split('.tar')[0]\n    out_format += ' reference=' + ref_name\n    indexfilename = ' indexfilename=' + name + '.cram.crai'\n    extension = '.cram'    \n  }else if($job.inputs.output_format == 'SAM'){\n    out_format = ' outputformat=sam SO=coordinate'\n    extension = '.sam'    \n  }else if ($job.inputs.output_format == 'Queryname Sorted BAM'){\n    out_format = ' outputformat=bam SO=queryname'\n    extension = '.bam'\n  }else if ($job.inputs.output_format == 'Queryname Sorted SAM'){\n    out_format = ' outputformat=sam SO=queryname'\n    extension = '.sam'    \n  }else {\n    out_format = ' outputformat=bam SO=coordinate'\n    indexfilename = ' indexfilename=' + name + '.bam.bai'\n    extension = '.bam'\n  }\n    cmd = \" | \" + sort_path + \" threads=8 level=1 tmplevel=-1 inputformat=sam\" \n    cmd += out_format\n    cmd += indexfilename\n    // capture metrics file\n    cmd += \" M=\" + name + \".sormadup_metrics.log\"\n    return cmd + ' > ' + name + extension\n\n}\n  \n",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": false,
            "position": 112
          },
          {
            "valueFrom": {
              "script": "{\n  \n  if($job.inputs.read_group_header){\n  \treturn '-R ' + $job.inputs.read_group_header\n  }\n    \n  function add_param(key, val){\n    if(!val){\n      return\n\t}\n    param_list.push(key + ':' + val)\n  }\n\n  param_list = []\n\n  // Set output file name\n  if($job.inputs.input_reads[0] instanceof Array){\n    input_1 = $job.inputs.input_reads[0][0] // scatter mode\n  } else if($job.inputs.input_reads instanceof Array){\n    input_1 = $job.inputs.input_reads[0]\n  }else {\n    input_1 = [].concat($job.inputs.input_reads)[0]\n  }\n  \n  //Read metadata for input reads\n  read_metadata = input_1.metadata\n  if(!read_metadata) read_metadata = []\n\n  if($job.inputs.rg_id){\n    add_param('ID', $job.inputs.rg_id)\n  }\n  else {\n    add_param('ID', '1')\n  } \n   \n  \n  if($job.inputs.rg_data_submitting_center){\n  \tadd_param('CN', $job.inputs.rg_data_submitting_center)\n  }\n  else if('data_submitting_center' in  read_metadata){\n  \tadd_param('CN', read_metadata.data_submitting_center)\n  }\n  \n  if($job.inputs.rg_library_id){\n  \tadd_param('LB', $job.inputs.rg_library_id)\n  }\n  else if('library_id' in read_metadata){\n  \tadd_param('LB', read_metadata.library_id)\n  }\n  \n  if($job.inputs.rg_median_fragment_length){\n  \tadd_param('PI', $job.inputs.rg_median_fragment_length)\n  }\n\n  \n  if($job.inputs.rg_platform){\n  \tadd_param('PL', $job.inputs.rg_platform)\n  }\n  else if('platform' in read_metadata){\n    if(read_metadata.platform == 'HiSeq X Ten'){\n      rg_platform = 'Illumina'\n    }\n    else{\n      rg_platform = read_metadata.platform\n    }\n  \tadd_param('PL', rg_platform)\n  }\n  \n  if($job.inputs.rg_platform_unit_id){\n  \tadd_param('PU', $job.inputs.rg_platform_unit_id)\n  }\n  else if('platform_unit_id' in read_metadata){\n  \tadd_param('PU', read_metadata.platform_unit_id)\n  }\n  \n  if($job.inputs.rg_sample_id){\n  \tadd_param('SM', $job.inputs.rg_sample_id)\n  }\n  else if('sample_id' in  read_metadata){\n  \tadd_param('SM', read_metadata.sample_id)\n  }\n    \n  return \"-R '@RG\\\\t\" + param_list.join('\\\\t') + \"'\"\n  \n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 1
          },
          {
            "valueFrom": {
              "script": "{\n  /////// Set input reads in the correct order depending of the paired end from metadata\n    \n     // Set output file name\n  if($job.inputs.input_reads[0] instanceof Array){\n    input_reads = $job.inputs.input_reads[0] // scatter mode\n  } else {\n    input_reads = $job.inputs.input_reads = [].concat($job.inputs.input_reads)\n  }\n  \n  \n  //Read metadata for input reads\n  read_metadata = input_reads[0].metadata\n  if(!read_metadata) read_metadata = []\n  \n  order = 0 // Consider this as normal order given at input: pe1 pe2\n  \n  // Check if paired end 1 corresponds to the first given read\n  if(read_metadata == []){ order = 0 }\n  else if('paired_end' in  read_metadata){ \n    pe1 = read_metadata.paired_end\n    if(pe1 != 1) order = 1 // change order\n  }\n\n  // Return reads in the correct order\n  if (input_reads.length == 1){\n    return input_reads[0].path // Only one read present\n  }\n  else if (input_reads.length == 2){\n    if (order == 0) return input_reads[0].path + ' ' + input_reads[1].path\n    else return input_reads[1].path + ' ' + input_reads[0].path\n  }\n\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 101
          },
          {
            "valueFrom": {
              "script": "{\n  MAX_THREADS = 36\n  suggested_threads = 8\n  \n  if($job.inputs.threads){ threads = $job.inputs.threads  }\n  else if ($job.inputs.wgs_hg38_mode_threads){\n    ref_name_arr = $job.inputs.reference_index_tar.path.split('/')\n    ref_name = ref_name_arr[ref_name_arr.length - 1]\n    if (ref_name.search('38') >= 0){threads = $job.inputs.wgs_hg38_mode_threads}\n    else {threads = MAX_THREADS}\n  }\n  else{ threads = suggested_threads  }\n    \n  return threads\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "-t",
            "position": 2
          },
          {
            "valueFrom": {
              "script": "{\n  name = ''\n  metadata = [].concat($job.inputs.reference_index_tar)[0].metadata\n  \n  if (metadata && metadata.reference_genome) {\n \tname = metadata.reference_genome\n  }\n  else {\n\treference_file = $job.inputs.reference_index_tar.path.split('/')[$job.inputs.reference_index_tar.path.split('/').length-1]\n  \tname = reference_file.slice(0, -4) // cut .tar extension \n  }\n    \n  return name \t\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 10
          },
          {
            "valueFrom": {
              "script": "{\n  cmd = \";declare -i pipe_statuses=(\\\\${PIPESTATUS[*]});len=\\\\${#pipe_statuses[@]};declare -i tot=0;echo \\\\${pipe_statuses[*]};for (( i=0; i<\\\\${len}; i++ ));do if [ \\\\${pipe_statuses[\\\\$i]} -ne 0 ];then tot=\\\\${pipe_statuses[\\\\$i]}; fi;done;if [ \\\\$tot -ne 0 ]; then >&2 echo Error in piping. Pipe statuses: \\\\${pipe_statuses[*]};fi; if [ \\\\$tot -ne 0 ]; then false;fi\\\"\"\n  return cmd\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 10000
          }
        ],
        "sbg:project": "vladimirk/bwa-mem-bundle-0-7-17-demo",
        "inputs": [
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Optimize threads for HG38",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "False",
            "id": "#wgs_hg38_mode_threads",
            "description": "Lower the number of threads if HG38 reference genome is used.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              {
                "name": "verbose_level",
                "symbols": [
                  "1",
                  "2",
                  "3",
                  "4"
                ],
                "type": "enum"
              }
            ],
            "label": "Verbose level",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-v"
            },
            "sbg:toolDefaultValue": "3",
            "id": "#verbose_level",
            "description": "Verbose level: 1=error, 2=warning, 3=message, 4+=debugging."
          },
          {
            "label": "Use soft clipping",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-Y"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_soft_clipping",
            "description": "Use soft clipping for supplementary alignments."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Unpaired read penalty",
            "sbg:category": "BWA Scoring options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-U"
            },
            "sbg:toolDefaultValue": "17",
            "id": "#unpaired_read_penalty",
            "description": "Penalty for an unpaired read pair."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Total memory",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "15",
            "id": "#total_memory",
            "description": "Total memory to be used by the tool in GB. It's sum of BWA, Sambamba Sort and Samblaster. For fastq files of total size less than 10GB, we suggest using the default setting of 15GB, for larger files we suggest using 58GB of memory (and 32CPU cores).",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Threads",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "8",
            "id": "#threads",
            "description": "Number of threads for BWA, Samblaster and Sambamba sort process."
          },
          {
            "label": "Split alignment smallest coordinate as primary",
            "inputBinding": {
              "valueFrom": {
                "script": "{\n  return ''\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-5"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#split_alignment_primary",
            "description": "for split alignment, take the alignment with the smallest coordinate as primary.",
            "sbg:stageInput": null
          },
          {
            "label": "Specify distribution parameters",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "itemSeparator": null,
              "separate": false,
              "prefix": "-I",
              "sbg:cmdInclude": true
            },
            "type": [
              "null",
              {
                "name": "speficy_distribution_parameters",
                "items": "float",
                "type": "array"
              }
            ],
            "id": "#speficy_distribution_parameters",
            "description": "Specify the mean, standard deviation (10% of the mean if absent), max (4 sigma from the mean if absent) and min of the insert size distribution.FR orientation only. This array can have maximum four values, where first two should be specified as FLOAT and last two as INT."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#sort_memory",
            "label": "Memory for BAM sorting",
            "description": "Amount of RAM [Gb] to give to the sorting algorithm (if not provided will be set to one third of the total memory).",
            "sbg:category": "Execution"
          },
          {
            "label": "Smart pairing in input FASTQ file",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-p"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#smart_pairing_in_input_fastq",
            "description": "Smart pairing in input FASTQ file (ignoring in2.fq)."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Skip seeds with more than INT occurrences",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-c"
            },
            "sbg:toolDefaultValue": "500",
            "id": "#skip_seeds",
            "description": "Skip seeds with more than INT occurrences."
          },
          {
            "label": "Skip pairing",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-P"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#skip_pairing",
            "description": "Skip pairing; mate rescue performed unless -S also in use."
          },
          {
            "label": "Skip mate rescue",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-S"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#skip_mate_rescue",
            "description": "Skip mate rescue."
          },
          {
            "type": [
              "null",
              "float"
            ],
            "label": "Select seeds",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-r"
            },
            "sbg:toolDefaultValue": "1.5",
            "id": "#select_seeds",
            "description": "Look for internal seeds inside a seed longer than {-k} * FLOAT."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Seed occurrence for the 3rd round",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-y"
            },
            "sbg:toolDefaultValue": "20",
            "id": "#seed_occurrence_for_the_3rd_round",
            "description": "Seed occurrence for the 3rd round seeding."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Score for a sequence match",
            "sbg:category": "BWA Scoring options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-A"
            },
            "sbg:toolDefaultValue": "1",
            "id": "#score_for_a_sequence_match",
            "description": "Score for a sequence match, which scales options -TdBOELU unless overridden."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "label": "Sample ID",
            "sbg:category": "BWA Read Group Options",
            "sbg:toolDefaultValue": "Inferred from metadata",
            "id": "#rg_sample_id",
            "description": "Specify the sample ID for RG line - A human readable identifier for a sample or specimen, which could contain some metadata information. A sample or specimen is material taken from a biological entity for testing, diagnosis, propagation, treatment, or research purposes, including but not limited to tissues, body fluids, cells, organs, embryos, body excretory products, etc."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "label": "Platform unit ID",
            "sbg:category": "BWA Read Group Options",
            "sbg:toolDefaultValue": "Inferred from metadata",
            "id": "#rg_platform_unit_id",
            "description": "Specify the platform unit (lane/slide) for RG line - An identifier for lanes (Illumina), or for slides (SOLiD) in the case that a library was split and ran over multiple lanes on the flow cell or slides."
          },
          {
            "type": [
              "null",
              {
                "name": "rg_platform",
                "symbols": [
                  "454",
                  "Helicos",
                  "Illumina",
                  "Solid",
                  "IonTorrent"
                ],
                "type": "enum"
              }
            ],
            "label": "Platform",
            "sbg:category": "BWA Read Group Options",
            "sbg:toolDefaultValue": "Inferred from metadata",
            "id": "#rg_platform",
            "description": "Specify the version of the technology that was used for sequencing, which will be placed in RG line."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#rg_median_fragment_length",
            "label": "Median fragment length",
            "description": "Specify the median fragment length for RG line.",
            "sbg:category": "BWA Read Group Options"
          },
          {
            "type": [
              "null",
              "string"
            ],
            "label": "Library ID",
            "sbg:category": "BWA Read Group Options",
            "sbg:toolDefaultValue": "Inferred from metadata",
            "id": "#rg_library_id",
            "description": "Specify the identifier for the sequencing library preparation, which will be placed in RG line."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "label": "Read group ID",
            "sbg:category": "Configuration",
            "sbg:toolDefaultValue": "1",
            "id": "#rg_id",
            "description": "Read group ID"
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#rg_data_submitting_center",
            "label": "Data submitting center",
            "description": "Specify the data submitting center for RG line.",
            "sbg:category": "BWA Read Group Options"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Reserved number of threads on the instance",
            "sbg:category": "Configuration",
            "sbg:toolDefaultValue": "1",
            "id": "#reserved_threads",
            "description": "Reserved number of threads on the instance used by scheduler.",
            "sbg:stageInput": null
          },
          {
            "sbg:fileTypes": "TAR",
            "label": "Reference Index TAR",
            "sbg:category": "Input files",
            "type": [
              "File"
            ],
            "required": true,
            "id": "#reference_index_tar",
            "description": "Reference fasta file with BWA index files packed in TAR.",
            "sbg:stageInput": "link"
          },
          {
            "label": "Sequencing technology-specific settings",
            "sbg:category": "BWA Scoring options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-x"
            },
            "type": [
              "null",
              {
                "name": "read_type",
                "symbols": [
                  "pacbio",
                  "ont2d",
                  "intractg"
                ],
                "type": "enum"
              }
            ],
            "id": "#read_type",
            "description": "Sequencing technology-specific settings; Setting -x changes multiple parameters unless overriden. pacbio: -k17 -W40 -r10 -A1 -B1 -O1 -E1 -L0  (PacBio reads to ref). ont2d: -k14 -W20 -r10 -A1 -B1 -O1 -E1 -L0  (Oxford Nanopore 2D-reads to ref). intractg: -B9 -O16 -L5  (intra-species contigs to ref)."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "label": "Read group header",
            "sbg:category": "BWA Read Group Options",
            "sbg:toolDefaultValue": "Constructed from per-attribute parameters or inferred from metadata.",
            "id": "#read_group_header",
            "description": "Read group header line such as '@RG\\tID:foo\\tSM:bar'.  This value takes precedence over per-attribute parameters."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "id": "#output_name",
            "label": "Output SAM/BAM file name",
            "description": "Name of the output BAM file.",
            "sbg:category": "Configuration"
          },
          {
            "type": [
              "null",
              {
                "items": "int",
                "type": "array"
              }
            ],
            "label": "Output in XA",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "itemSeparator": ",",
              "separate": false,
              "prefix": "-h",
              "sbg:cmdInclude": true
            },
            "sbg:toolDefaultValue": "[5, 200]",
            "id": "#output_in_xa",
            "description": "If there are <INT hits with score >80% of the max score, output all in XA. This array should have no more than two values."
          },
          {
            "label": "Output header",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-V"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#output_header",
            "description": "Output the reference FASTA header in the XR tag."
          },
          {
            "type": [
              "null",
              {
                "name": "output_format",
                "symbols": [
                  "SAM",
                  "BAM",
                  "CRAM",
                  "Queryname Sorted BAM",
                  "Queryname Sorted SAM"
                ],
                "type": "enum"
              }
            ],
            "label": "Output format",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "Coordinate Sorted BAM",
            "id": "#output_format",
            "description": "Cordinate sort is default output."
          },
          {
            "label": "Output alignments",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-a"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#output_alignments",
            "description": "Output all alignments for SE or unpaired PE."
          },
          {
            "label": "process INT input bases in each batch (for reproducibility)",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-K"
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#num_input_bases_in_each_batch",
            "description": "process INT input bases in each batch regardless of nThreads (for reproducibility)",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Mismatch penalty",
            "sbg:category": "BWA Scoring options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-B"
            },
            "sbg:toolDefaultValue": "4",
            "id": "#mismatch_penalty",
            "description": "Penalty for a mismatch."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Minimum seed length",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-k"
            },
            "sbg:toolDefaultValue": "19",
            "id": "#minimum_seed_length",
            "description": "Minimum seed length for BWA MEM."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Minimum alignment score for a read to be output in SAM/BAM",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-T"
            },
            "sbg:toolDefaultValue": "30",
            "id": "#minimum_output_score",
            "description": "Minimum alignment score for a read to be output in SAM/BAM."
          },
          {
            "type": [
              "null",
              "string"
            ],
            "label": "Mate rescue rounds",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-m"
            },
            "sbg:toolDefaultValue": "50",
            "id": "#mate_rescue_rounds",
            "description": "Perform at most INT rounds of mate rescues for each read."
          },
          {
            "label": "Mark shorter",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-M"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#mark_shorter",
            "description": "Mark shorter split hits as secondary."
          },
          {
            "label": "Don't modify mapQ of supplementary alignments",
            "inputBinding": {
              "valueFrom": {
                "script": "{\n  return ''\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-q"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#mapQ_of_suplementary",
            "description": "Don't modify mapQ of supplementary alignments",
            "sbg:stageInput": null
          },
          {
            "label": "Insert string to output SAM or BAM header",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-H"
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#insert_string_to_header",
            "description": "Insert STR to header if it starts with @; or insert lines in FILE."
          },
          {
            "sbg:fileTypes": "FASTQ, FASTQ.GZ, FQ, FQ.GZ",
            "label": "Input reads",
            "sbg:category": "Input files",
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "required": true,
            "id": "#input_reads",
            "description": "Input sequence reads.",
            "sbg:stageInput": "link"
          },
          {
            "label": "Ignore ALT file",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-j"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#ignore_alt_file",
            "description": "Treat ALT contigs as part of the primary assembly (i.e. ignore <idxbase>.alt file)."
          },
          {
            "type": [
              "null",
              {
                "items": "int",
                "type": "array"
              }
            ],
            "label": "Gap open penalties",
            "sbg:category": "BWA Scoring options",
            "inputBinding": {
              "itemSeparator": ",",
              "separate": false,
              "prefix": "-O",
              "sbg:cmdInclude": true
            },
            "sbg:toolDefaultValue": "[6,6]",
            "id": "#gap_open_penalties",
            "description": "Gap open penalties for deletions and insertions. This array can't have more than two values."
          },
          {
            "type": [
              "null",
              {
                "items": "int",
                "type": "array"
              }
            ],
            "label": "Gap extension",
            "sbg:category": "BWA Scoring options",
            "inputBinding": {
              "itemSeparator": ",",
              "separate": false,
              "prefix": "-E",
              "sbg:cmdInclude": true
            },
            "sbg:toolDefaultValue": "[1,1]",
            "id": "#gap_extension_penalties",
            "description": "Gap extension penalty; a gap of size k cost '{-O} + {-E}*k'. This array can't have more than two values."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Filter out secondary alignments",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "False",
            "id": "#filter_out_secondary_alignments",
            "description": "Filter out secondary alignments. Sambamba view tool will be used to perform this internally.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Dropoff",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-d"
            },
            "sbg:toolDefaultValue": "100",
            "id": "#dropoff",
            "description": "Off-diagonal X-dropoff."
          },
          {
            "type": [
              "null",
              "float"
            ],
            "label": "Drop chains fraction",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-D"
            },
            "sbg:toolDefaultValue": "0.50",
            "id": "#drop_chains_fraction",
            "description": "Drop chains shorter than FLOAT fraction of the longest overlapping chain."
          },
          {
            "label": "Discard exact matches",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-e"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#discard_exact_matches",
            "description": "Discard full-length exact matches."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Discard chain length",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-W"
            },
            "sbg:toolDefaultValue": "0",
            "id": "#discard_chain_length",
            "description": "Discard a chain if seeded bases shorter than INT."
          },
          {
            "type": [
              "null",
              {
                "name": "deduplication",
                "symbols": [
                  "None",
                  "MarkDuplicates",
                  "RemoveDuplicates"
                ],
                "type": "enum"
              }
            ],
            "label": "PCR duplicate detection",
            "sbg:category": "Samblaster parameters",
            "sbg:toolDefaultValue": "MarkDuplicates",
            "id": "#deduplication",
            "description": "Use Samblaster for finding duplicates on sequence reads."
          },
          {
            "type": [
              "null",
              {
                "items": "int",
                "type": "array"
              }
            ],
            "label": "Clipping penalty",
            "sbg:category": "BWA Scoring options",
            "inputBinding": {
              "itemSeparator": ",",
              "separate": false,
              "prefix": "-L",
              "sbg:cmdInclude": true
            },
            "sbg:toolDefaultValue": "[5,5]",
            "id": "#clipping_penalty",
            "description": "Penalty for 5'- and 3'-end clipping."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Band width",
            "sbg:category": "BWA Algorithm options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-w"
            },
            "sbg:toolDefaultValue": "100",
            "id": "#band_width",
            "description": "Band width for banded alignment."
          },
          {
            "label": "Append comment",
            "sbg:category": "BWA Input/output options",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "-C"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#append_comment",
            "description": "Append FASTA/FASTQ comment to SAM output."
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "http://bio-bwa.sourceforge.net/",
            "label": "Homepage"
          },
          {
            "id": "https://github.com/lh3/bwa",
            "label": "Source code"
          },
          {
            "id": "http://bio-bwa.sourceforge.net/bwa.shtml",
            "label": "Wiki"
          },
          {
            "id": "http://sourceforge.net/projects/bio-bwa/",
            "label": "Download"
          },
          {
            "id": "http://arxiv.org/abs/1303.3997",
            "label": "Publication"
          },
          {
            "id": "http://www.ncbi.nlm.nih.gov/pubmed/19451168",
            "label": "Publication BWA Algorithm"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "0.7.13",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Heng Li",
        "sbg:projectName": "BWA MEM Bundle 0.7.17 - Demo",
        "baseCommand": [
          {
            "script": "{\n  cmd = \"/bin/bash -c \\\"\"\n  return cmd + \" export REF_CACHE=${PWD} ; \"\n}",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          {
            "script": "{\n  reference_file = $job.inputs.reference_index_tar.path.split('/')[$job.inputs.reference_index_tar.path.split('/').length-1]\n  return 'tar -tvf ' +  reference_file + ' 1>&2; tar -xf ' + reference_file + ' ; '\n  \n}",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          "bwa",
          "mem"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "vladimirk",
        "outputs": [
          {
            "sbg:fileTypes": "LOG",
            "label": "Sormadup metrics",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "glob": "*.sormadup_metrics.log"
            },
            "id": "#dups_metrics",
            "description": "Metrics file for biobambam mark duplicates"
          },
          {
            "sbg:fileTypes": "SAM, BAM, CRAM",
            "label": "Aligned SAM/BAM",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input_reads",
              "glob": "{*.sam,*.bam,*.cram}",
              "secondaryFiles": [
                ".bai",
                "^.bai",
                ".crai",
                "^.crai"
              ],
              "sbg:metadata": {
                "reference_genome": {
                  "script": "{\n  reference_file = $job.inputs.reference_index_tar.path.split('/')[$job.inputs.reference_index_tar.path.split('/').length-1]\n  name = reference_file.slice(0, -4) // cut .tar extension \n  \n  name_list = name.split('.')\n  ext = name_list[name_list.length-1]\n\n  if (ext == 'gz' || ext == 'GZ'){\n    a = name_list.pop() // strip fasta.gz\n    a = name_list.pop()\n  } else\n    a = name_list.pop() //strip only fasta/fa\n  \n  return name_list.join('.')\n  \n}",
                  "class": "Expression",
                  "engine": "#cwl-js-engine"
                }
              }
            },
            "id": "#aligned_reads",
            "description": "Aligned reads."
          }
        ],
        "sbg:revision": 31,
        "sbg:createdOn": 1530796841,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 99.99999792335989,
        "sbg:license": "BWA: GNU Affero General Public License v3.0, MIT License. Sambamba: GNU GENERAL PUBLIC LICENSE. Samblaster: The MIT License (MIT)",
        "sbg:contributors": [
          "vladimirk",
          "nikola_jovanovic",
          "ogan"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/bwa-mem-bundle-0-7-17-demo/bwa-mem-bundle-0-7-17/31",
        "description": "**BWA MEM** is an algorithm designed for aligning sequence reads onto a large reference genome. BWA MEM is implemented as a component of BWA. The algorithm can automatically choose between performing end-to-end and local alignments. BWA MEM is capable of outputting multiple alignments, and finding chimeric reads. It can be applied to a wide range of read lengths, from 70 bp to several megabases. \n\nIn order to obtain possibilities for additional fast processing of aligned reads, two tools are embedded together into the same package with BWA MEM (0.7.13): Samblaster. (0.1.22) and Sambamba (v0.6.0). \nIf deduplication of alignments is needed, it can be done by setting the parameter 'Duplication'. **Samblaster** will be used internally to perform this action.\nBesides the standard BWA MEM SAM output file, BWA MEM package has been extended to support two additional output options: a BAM file obtained by piping through **Sambamba view** while filtering out the secondary alignments, as well as a Coordinate Sorted BAM option that additionally pipes the output through **Sambamba sort**, along with an accompanying .bai file produced by **Sambamba sort** as side effect. Sorted BAM is the default output of BWA MEM. Parameters responsible for these additional features are 'Filter out secondary alignments' and 'Output format'. Passing data from BWA MEM to Samblaster and Sambamba tools has been done through the pipes which saves processing times of two read and write of aligned reads into the hard drive. \n\nFor input reads fastq files of total size less than 10 GB we suggest using the default setting for parameter 'total memory' of 15GB, for larger files we suggest using 58 GB of memory and 32 CPU cores.\n\n**Important:**\nIn order to work BWA MEM Bundle requires fasta reference file accompanied with **bwa fasta indices** in TAR file.\nThere is the **known issue** with samblaster. It does not support processing when number of sequences in fasta is larger than 32768. If this is the case do not use deduplication option because the output BAM will be corrupted.\n\nHuman reference genome version 38 comes with ALT contigs, a collection of diverged alleles present in some humans but not the others. Making effective use of these contigs will help to reduce mapping artifacts, however, to facilitate mapping these ALT contigs to the primary assembly, GRC decided to add to each contig long flanking sequences almost identical to the primary assembly. As a result, a naive mapping against GRCh38+ALT will lead to many mapQ-zero mappings in these flanking regions. Please use post-processing steps to fix these alignments or implement [steps](https://sourceforge.net/p/bio-bwa/mailman/message/32845712/) described by the author of BWA toolkit.",
        "sbg:content_hash": "a10b6a701fb02268c2eb962a12d541bdad9da25895b0dabda8100548afacd0774",
        "sbg:toolkit": "BWA",
        "sbg:image_url": null,
        "sbg:revisionNotes": ".bam.bai instead only .bai",
        "label": "BWA MEM Bundle",
        "sbg:categories": [
          "Alignment",
          "FASTQ-Processing"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549024607,
        "sbg:id": "h-bca6401d/h-7bf9f5a6/h-28d2477e/0",
        "temporaryFailCodes": []
      },
      "id": "#BWA_MEM_Bundle",
      "sbg:y": 99.99999792335989
    },
    {
      "sbg:x": 998.8099151774204,
      "inputs": [
        {
          "id": "#GATK_BaseRecalibrator.verbosity"
        },
        {
          "id": "#GATK_BaseRecalibrator.use_original_qualities"
        },
        {
          "id": "#GATK_BaseRecalibrator.use_jdk_inflater"
        },
        {
          "id": "#GATK_BaseRecalibrator.use_jdk_deflater"
        },
        {
          "id": "#GATK_BaseRecalibrator.seconds_between_progress_updates"
        },
        {
          "id": "#GATK_BaseRecalibrator.sample"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#GATK_BaseRecalibrator.reference"
        },
        {
          "source": [
            "#BWA_MEM_Bundle.aligned_reads"
          ],
          "id": "#GATK_BaseRecalibrator.reads"
        },
        {
          "id": "#GATK_BaseRecalibrator.read_validation_stringency"
        },
        {
          "id": "#GATK_BaseRecalibrator.read_name"
        },
        {
          "id": "#GATK_BaseRecalibrator.read_index"
        },
        {
          "id": "#GATK_BaseRecalibrator.read_filter"
        },
        {
          "id": "#GATK_BaseRecalibrator.quiet"
        },
        {
          "id": "#GATK_BaseRecalibrator.quantizing_levels"
        },
        {
          "id": "#GATK_BaseRecalibrator.preserve_qscores_less_than"
        },
        {
          "id": "#GATK_BaseRecalibrator.pl_filter_name"
        },
        {
          "id": "#GATK_BaseRecalibrator.mismatches_default_quality"
        },
        {
          "id": "#GATK_BaseRecalibrator.mismatches_context_size"
        },
        {
          "id": "#GATK_BaseRecalibrator.minimum_mapping_quality"
        },
        {
          "id": "#GATK_BaseRecalibrator.min_read_length"
        },
        {
          "id": "#GATK_BaseRecalibrator.memory_per_job"
        },
        {
          "id": "#GATK_BaseRecalibrator.memory_overhead_per_job"
        },
        {
          "id": "#GATK_BaseRecalibrator.maximum_mapping_quality"
        },
        {
          "id": "#GATK_BaseRecalibrator.maximum_cycle_value"
        },
        {
          "id": "#GATK_BaseRecalibrator.max_read_length"
        },
        {
          "id": "#GATK_BaseRecalibrator.max_fragment_length"
        },
        {
          "id": "#GATK_BaseRecalibrator.low_quality_tail"
        },
        {
          "id": "#GATK_BaseRecalibrator.library"
        },
        {
          "id": "#GATK_BaseRecalibrator.lenient"
        },
        {
          "source": [
            "#GATK_IndexFeatureFile.output_with_index",
            "#GATK_IndexFeatureFile_1.output_with_index",
            "#GATK_IndexFeatureFile_2.output_with_index"
          ],
          "id": "#GATK_BaseRecalibrator.known_sites"
        },
        {
          "id": "#GATK_BaseRecalibrator.keep_reverse"
        },
        {
          "id": "#GATK_BaseRecalibrator.keep_read_group"
        },
        {
          "id": "#GATK_BaseRecalibrator.intervals_string"
        },
        {
          "source": [
            "#intervals_file"
          ],
          "id": "#GATK_BaseRecalibrator.intervals_file"
        },
        {
          "id": "#GATK_BaseRecalibrator.interval_set_rule"
        },
        {
          "id": "#GATK_BaseRecalibrator.interval_merging_rule"
        },
        {
          "id": "#GATK_BaseRecalibrator.interval_exclusion_padding"
        },
        {
          "id": "#GATK_BaseRecalibrator.insertions_default_quality"
        },
        {
          "id": "#GATK_BaseRecalibrator.indels_context_size"
        },
        {
          "id": "#GATK_BaseRecalibrator.filter_too_short"
        },
        {
          "id": "#GATK_BaseRecalibrator.exclude_intervals_string"
        },
        {
          "id": "#GATK_BaseRecalibrator.exclude_intervals_file"
        },
        {
          "id": "#GATK_BaseRecalibrator.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#GATK_BaseRecalibrator.disable_tool_default_read_filters"
        },
        {
          "id": "#GATK_BaseRecalibrator.disable_sequence_dictionary_validation"
        },
        {
          "id": "#GATK_BaseRecalibrator.disable_read_filter"
        },
        {
          "id": "#GATK_BaseRecalibrator.disable_bam_index_caching"
        },
        {
          "id": "#GATK_BaseRecalibrator.deletions_default_quality"
        },
        {
          "id": "#GATK_BaseRecalibrator.default_base_qualities"
        },
        {
          "id": "#GATK_BaseRecalibrator.create_output_variant_md5"
        },
        {
          "id": "#GATK_BaseRecalibrator.create_output_variant_index"
        },
        {
          "id": "#GATK_BaseRecalibrator.create_output_bam_md5"
        },
        {
          "id": "#GATK_BaseRecalibrator.create_output_bam_index"
        },
        {
          "id": "#GATK_BaseRecalibrator.cloud_prefetch_buffer"
        },
        {
          "id": "#GATK_BaseRecalibrator.cloud_index_prefetch_buffer"
        },
        {
          "id": "#GATK_BaseRecalibrator.bqsr_baq_gap_open_penalty"
        },
        {
          "id": "#GATK_BaseRecalibrator.black_listed_lanes"
        },
        {
          "id": "#GATK_BaseRecalibrator.black_list"
        },
        {
          "id": "#GATK_BaseRecalibrator.binary_tag_name"
        },
        {
          "id": "#GATK_BaseRecalibrator.ambig_filter_frac"
        },
        {
          "id": "#GATK_BaseRecalibrator.ambig_filter_bases"
        },
        {
          "id": "#GATK_BaseRecalibrator.add_output_vcf_command_line"
        },
        {
          "id": "#GATK_BaseRecalibrator.add_output_sam_program_record"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_BaseRecalibrator.recalibration_file"
        },
        {
          "id": "#GATK_BaseRecalibrator.performance_summary"
        }
      ],
      "run": {
        "x": 998.8099151774204,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 23,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx4M\" BaseRecalibrator --input /path/to/reads-1.ext --input /path/to/reads-2.ext --reference /path/to/reference.ext  --output reads-1.recal_data.grp  --create-output-bam-index  --known-sites /path/to/known_sites-1.ext",
        "sbg:job": {
          "allocatedResources": {
            "mem": 5,
            "cpu": 1
          },
          "inputs": {
            "createOutputVariantIndex": 5.081587263149359,
            "useOriginalQualities": true,
            "secondsBetweenProgressUpdates": 1,
            "threads_per_job": 2,
            "memory_overhead_per_job": 1,
            "known_sites": [
              {
                "path": "/path/to/known_sites-1.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "exclude_intervals_file": {
              "path": "/path/to/exclude_intervals_file.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "use_jdk_inflater": true,
            "add_output_vcf_command_line": true,
            "QUIET": true,
            "lenient": true,
            "intervals_file": {
              "path": "/path/to/intervals_file.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "keepReverse": true,
            "memory_per_job": 4,
            "createOutputBamMD5": 1.7560880637573613,
            "createOutputBamIndex": 6.802465483383213,
            "use_jdk_deflater": true,
            "cpu_per_job": 2,
            "createOutputVariantMD5": 0.6317428673703886,
            "disableSequenceDictionaryValidation": true,
            "disableToolDefaultReadFilters": true,
            "no_cmdline_in_header": true,
            "exclude_intervals_string": "exclude_intervals_string-string-value",
            "addOutputSAMProgramRecord": true,
            "reference": {
              "path": "/path/to/reference.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "reads": [
              {
                "path": "/path/to/reads-1.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/reads-2.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "intervals_string": "intervals_string-string-value",
            "disableBamIndexCaching": true,
            "dontRequireSoftClipsBothEnds": true,
            "ambigFilterBases": 2,
            "interval_merging_rule": "interval_merging_rule-string-value"
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296554,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/16",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640330,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/17",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887417,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/20",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502111498,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/23",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718029,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/24",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503064609,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/31",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503064951,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/32",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405166,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/34",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105701,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/42",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504272902,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/44",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275139,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/45",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1504280144,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/46",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504789585,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/48",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1507625019,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/49",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522861,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/50",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786582,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/51",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587884,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/62",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590561,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/65",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515594349,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/66",
            "sbg:revision": 18
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599103,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/69",
            "sbg:revision": 19
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519396104,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/70",
            "sbg:revision": 20
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648152,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/71",
            "sbg:revision": 21
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946168,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_BaseRecalibrator/72",
            "sbg:revision": 22
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549037893,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 23
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  read_name = [].concat($job.inputs.reads)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  read_namebase = read_name.slice(0, read_name.length-1).join('.')\n  return '--output ' + read_namebase + '.recal_data.grp'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": ""
          },
          {
            "valueFrom": "--create-output-bam-index",
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  known_sites = [].concat($job.inputs.known_sites)\n\n  cmd = []\n\n  for (i = 0; i < known_sites.length; i++) {\n    cmd.push('--known-sites', known_sites[i].path)\n  }\n\n  return cmd.join(' ')\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "sbg:altPrefix": "",
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "id": "#verbosity",
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Original Qualities",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-original-qualities",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_original_qualities",
            "description": "Use the base quality scores from the OQ tag Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#seconds_between_progress_updates",
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#sample",
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "FASTA, FA",
            "label": "Reference",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "loadContents": true,
              "separate": true,
              "prefix": "--reference",
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "sbg:cmdInclude": true
            },
            "type": [
              "File"
            ],
            "required": true,
            "id": "#reference",
            "description": "Reference sequence file Required."
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "CRAM, BAM",
            "label": "Reads",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--input",
              "secondaryFiles": [
                ".bai"
              ],
              "itemSeparator": null
            },
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "required": true,
            "id": "#reads",
            "description": "BAM/SAM/CRAM file containing reads This argument must be specified at least once. Required.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "id": "#read_validation_stringency",
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#read_name",
            "description": "Keep only reads with this read name Required."
          },
          {
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#read_index",
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically.  This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "id": "#read_filter",
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Quantizing Levels",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quantizing-levels",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "sbg:toolDefaultValue": "16",
            "id": "#quantizing_levels",
            "description": "number of distinct quality scores in the quantized output  Default value: 16."
          },
          {
            "sbg:altPrefix": "",
            "label": "Preserve Qscores Less Than",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--preserve-qscores-less-than",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#preserve_qscores_less_than",
            "description": "Don't recalibrate bases with quality scores less than this threshold (with -bqsr) Default value: 6."
          },
          {
            "sbg:altPrefix": "",
            "label": "Pl Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pl-filter-name",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#pl_filter_name",
            "description": "Keep reads with RG:PL attribute containing this string This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Mismatches Default Quality",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mismatches-default-quality",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#mismatches_default_quality",
            "description": "Default quality for the base mismatches covariate Default value: -1."
          },
          {
            "sbg:altPrefix": "",
            "label": "Mismatches Context Size",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--mismatches-context-size",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#mismatches_context_size",
            "description": "Size of the k-mer context to be used for base mismatches Default value: 2."
          },
          {
            "sbg:altPrefix": "",
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#minimum_mapping_quality",
            "description": "Minimum mapping quality to keep (inclusive) Default value: 10."
          },
          {
            "sbg:altPrefix": "",
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#min_read_length",
            "description": "Keep only reads with length at least equal to the specified value Default value: 1."
          },
          {
            "id": "#memory_per_job",
            "type": [
              "null",
              "int"
            ],
            "label": "Memory Per Job",
            "description": "Memory per job",
            "sbg:stageInput": null
          },
          {
            "id": "#memory_overhead_per_job",
            "type": [
              "null",
              "int"
            ],
            "label": "Memory Overhead Per Job",
            "description": "Memory Overhead Per Job",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#maximum_mapping_quality",
            "description": "Maximum mapping quality to keep (inclusive) Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Maximum Cycle Value",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-cycle-value",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#maximum_cycle_value",
            "description": "The maximum cycle value permitted for the Cycle covariate Default value: 500."
          },
          {
            "sbg:altPrefix": "",
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#max_read_length",
            "description": "Keep only reads with length at most equal to the specified value Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#max_fragment_length",
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000."
          },
          {
            "sbg:altPrefix": "",
            "label": "Low Quality Tail",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--low-quality-tail",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#low_quality_tail",
            "description": "Minimum quality for the bases in the tail of the reads to be considered Default value: 2."
          },
          {
            "sbg:altPrefix": "",
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#library",
            "description": "The name of the library to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#lenient",
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "-knownSites",
            "sbg:fileTypes": "TXT, BED, VCF",
            "label": "Known Sites",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n\treturn ''\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "secondaryFiles": [
                ".idx"
              ]
            },
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "required": true,
            "id": "#known_sites",
            "description": "One or more databases of known polymorphic sites used to exclude regions around known polymorphisms from analysis. This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#keep_reverse",
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#keep_read_group",
            "description": "The name of the read group to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n    if ($job.inputs.reference && $job.inputs.intervals_string){\n        fasta = $job.inputs.reference.contents\n        interval = $job.inputs.intervals_string\n        // fasta - UCSC format\n        if (fasta.indexOf(\">chr\") != -1){\n            // INTERVAL - UCSC format, all w/ chr\n            if (interval.indexOf(\"chr\") != -1){\n                return interval\n            }// if (interval.indexOf(\"chr\") == -1)\n            // interval - 1000G format, convert to UCSC\n            else{\n                if (Number(interval) || interval == \"X\" || interval == \"Y\"){\n                    return \"chr\".concat(interval)\n                }// if (Number(interval)|| interval == \"X\" || interval == \"Y\")\n                else{\n                    if (interval == \"MT\"){\n                        return \"chrM\"\n                    }//if (interval == \"MT\")\n                    else{\n                        if(Number(interval.substr(2,6))<211){\n                            n = Number(interval.substr(2,6)) - 190;\n                            s = \"chr\";\n                            s = s.concat(n.toString());\n                            s = s.concat(\"_gl\");\n                            s = s.concat(interval.substr(2,6));\n                            s = s.concat(\"_random\");\n                            return s\n                        }// if(Number(interval.substr(2,interval.length-2))<211)\n                        else{\n                            if(Number(interval.substr(2,6))<250) {\n                                s = \"chrUn_gl\";\n                                s = s.concat(interval.substr(2,6));\n                                return s\n                            }//if(Number(interval.substr(2,interval.length-2))<250)\n                            else {\n                                return interval\n                            }//if(Number(interval.substr(2,interval.length-2))<250) - else\n                        }// if(Number(interval.substr(2,interval.length-2))<211) - else\n                    }//if (interval == \"MT\") - else\n                }//if (Number(interval)|| interval == \"X\" || interval == \"Y\") - else\n            }//if (interval.indexOf(\"chr\") == -1) - else\n        }//if (fasta.indexOf(\">chr\") == -1)\n        // fasta - 1000G format\n        else{\n            //interval - USCS format, all w/ chr, convert to 1000G\n            if(interval.indexOf(\"chr\") != -1){\n                if(Number(interval.substr(3,2)) && interval.length<6 || interval == \"chrX\" || interval == \"chrY\"){\n                    return interval.substr(3,2)\n                }//if(Number(interval.substr(3,interval.length)) != NaN || interval == \"chrX\" || bsqr == \"chrY\")\n                else{\n                    if (interval == \"chrM\") {\n                        return \"MT\"\n                    }//if (interval == \"chrM\")\n                    else{\n                        s = \"GL\";\n                        s = s.concat(interval.substr(8,6));\n                        s = s.concat(\".1\");\n                        return s\n                    }//if (interval == \"chrM\") - else\n                }//if(Number(interval.substr(3,interval.length)) != NaN || interval == \"chrX\" || bsqr == \"chrY\") - else\n            }//if($job.inputs.interval.indexOf(\"chr\") == -1)\n            // interval - 1000G format\n            else{\n                return interval\n            }//(interval.indexOf(\"chr\") == -1) - else\n        }//if (fasta.indexOf(\">chr\") == -1) - else\n    }//if ($job.inputs.fasta && $job.inputs.interval)\n}\n",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#intervals_string",
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#intervals_file",
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-set-rule",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "UNION",
                  "INTERSECTION"
                ],
                "type": "enum"
              }
            ],
            "id": "#interval_set_rule",
            "description": "Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION}."
          },
          {
            "label": "Interval merging rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-padding",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#interval_merging_rule",
            "description": "Interval merging rule for abutting intervals  Default value: ALL. Possible values: {ALL, OVERLAPPING_ONLY}",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#interval_exclusion_padding",
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Insertions Default Quality",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--insertions-default-quality",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#insertions_default_quality",
            "description": "Default quality for the base insertions covariate Default value: 45."
          },
          {
            "sbg:altPrefix": "",
            "label": "Indels Context Size",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--indels-context-size",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#indels_context_size",
            "description": "Size of the k-mer context to be used for base insertions and deletions Default value: 3."
          },
          {
            "sbg:altPrefix": "",
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#filter_too_short",
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#exclude_intervals_string",
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#exclude_intervals_file",
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#dont_require_soft_clips_both_ends",
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_tool_default_read_filters",
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_sequence_dictionary_validation",
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "id": "#disable_read_filter",
            "description": "Read filters to be disabled before analysis  This argument may be specified 0 or more                               times. Default value: null. Possible Values: {MappedReadFilter,                               MappingQualityAvailableReadFilter, MappingQualityNotZeroReadFilter,                               NotDuplicateReadFilter, NotSecondaryAlignmentReadFilter,                               PassesVendorQualityCheckReadFilter, WellformedReadFilter}"
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_bam_index_caching",
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Deletions Default Quality",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--deletions-default-quality",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#deletions_default_quality",
            "description": "Default quality for the base deletions covariate Default value: 45."
          },
          {
            "sbg:altPrefix": "",
            "label": "Default Base Qualities",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--default-base-qualities",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#default_base_qualities",
            "description": "Assign a default base quality Default value: -1."
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#create_output_variant_md5",
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#create_output_variant_index",
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#create_output_bam_md5",
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-index",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#create_output_bam_index",
            "description": "If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#cloud_prefetch_buffer",
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40."
          },
          {
            "sbg:altPrefix": "",
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#cloud_index_prefetch_buffer",
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1."
          },
          {
            "sbg:altPrefix": "",
            "label": "Bqsr Baq Gap Open Penalty",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--bqsr-baq-gap-open-penalty",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#bqsr_baq_gap_open_penalty",
            "description": "BQSR BAQ gap open penalty (Phred Scaled). Default value is 40. 30 is perhaps better for whole genome call sets Default value: 40.0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#black_listed_lanes",
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-list",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#black_list",
            "description": "This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Binary Tag Name",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--binary-tag-name",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#binary_tag_name",
            "description": "The binary tag covariate name if using it Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#ambig_filter_frac",
            "description": "Threshold fraction of non-regular bases (e.g. N) above which to filter Default value: 0.05."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#ambig_filter_bases",
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "label": "Adds a command line header line to created VCF file",
            "sbg:toolDefaultValue": "TRUE",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n  return ''\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": false,
              "prefix": "--add-output-vcf-command-line"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#add_output_vcf_command_line",
            "description": "If true, adds a command line header line to created VCF file. Default value: true.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#add_output_sam_program_record",
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          }
        ],
        "appUrl": "/u/vladimirk/gatk-3-7/apps/#vladimirk/gatk-3-7/gatk-3-7-baserecalibrator/5",
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "BaseRecalibrator"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "GRP",
            "label": "BQSR Table",
            "type": [
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#reads",
              "glob": "*.recal_data.grp"
            },
            "id": "#recalibration_file",
            "description": "The output recalibration table file to create."
          },
          {
            "id": "#performance_summary",
            "outputBinding": {
              "glob": "*.txt"
            },
            "type": [
              "null",
              "File"
            ],
            "label": "Performance Summary",
            "description": "Test"
          }
        ],
        "label": "GATK BaseRecalibrator",
        "sbg:createdOn": 1500296554,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 360.23835659974196,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-baserecalibrator/23",
        "description": "First pass of the base quality score recalibration -- Generates recalibration table based on various covariates (such as read group, reported quality score, machine cycle, and nucleotide context).\n\n###**Overview**  \n\nThis walker is designed to work as the first pass in a two-pass processing step. It does a by-locus traversal operating only at sites that are not in dbSNP. We assume that all reference mismatches we see are therefore errors and indicative of poor base quality. This walker generates tables based on various user-specified covariates (such as read group, reported quality score, cycle, and context). Since there is a large amount of data one can then calculate an empirical probability of error given the particular covariates seen at this site, where p(error) = num mismatches / num observations. The output file is a table (of the several covariate values, num observations, num mismatches, empirical quality score).\n\nNote: ReadGroupCovariate and QualityScoreCovariate are required covariates and will be added for the user regardless of whether or not they were specified.\n\n###**Inputs**  \n\nThe input read data whose base quality scores need to be assessed.\nA database of known polymorphic sites to skip over.\n\n###**Output**  \n\nA GATK Report file with many tables:\n\n- The list of arguments\n- The quantized qualities table\n- The recalibration table by read group\n- The recalibration table by quality score\n- The recalibration table for all the optional covariates\n\nThe GATK Report is intended to be easy to read by humans or computers. Check out the documentation of the GATKReport to learn how to manipulate this table.\n\n###**Usage example**  \n\n     ./gatk-launch BaseRecalibrator \\ \n     \t -R reference.fasta \\ \n         -I input.bam \\   \n         --knownSites latest_dbsnp.vcf \\  \n         -O recalibration.table \n\n###**Additional Notes**\n\n- By default, the tool works only with VCF resource files. To use VCF.GZ resource files, the tool wrapper needs to be modified.\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:content_hash": "aebfc4537c12c76bab4ce6a9908bedb940363006dd0a1b0a8b6eff1771821210a",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "sbg:revision": 23,
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549037893,
        "sbg:id": "h-84391d34/h-04e4ba8e/h-2a13208e/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_BaseRecalibrator",
      "sbg:y": 360.23835659974196
    },
    {
      "sbg:x": 731.0259079546089,
      "inputs": [
        {
          "id": "#GATK_IndexFeatureFile_2.verbosity"
        },
        {
          "id": "#GATK_IndexFeatureFile_2.use_jdk_inflater"
        },
        {
          "id": "#GATK_IndexFeatureFile_2.use_jdk_deflater"
        },
        {
          "id": "#GATK_IndexFeatureFile_2.quiet"
        },
        {
          "id": "#GATK_IndexFeatureFile_2.memory_per_job"
        },
        {
          "id": "#GATK_IndexFeatureFile_2.memory_overhead_per_job"
        },
        {
          "source": [
            "#indels_1000g_phase1"
          ],
          "id": "#GATK_IndexFeatureFile_2.feature_file"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_IndexFeatureFile_2.output_with_index"
        },
        {
          "id": "#GATK_IndexFeatureFile_2.index"
        }
      ],
      "run": {
        "x": 731.0259079546089,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 15,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx2048M\" IndexFeatureFile --feature-file /path/to/feature_file.vcf.gz --output feature_file.vcf.gz.tbi",
        "sbg:job": {
          "allocatedResources": {
            "mem": 2048,
            "cpu": 1
          },
          "inputs": {
            "memory_overhead_per_job": 0,
            "memory_per_job": 2048,
            "feature_file": {
              "path": "/path/to/feature_file.vcf.gz",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "use_jdk_inflater": false,
            "use_jdk_deflater": false,
            "QUIET": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296617,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/16",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500367649,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/17",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640357,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/18",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887430,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/20",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405190,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/21",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105732,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/22",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504108418,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/23",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504109513,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/24",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504273463,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/26",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275173,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/27",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1509714097,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/29",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522886,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/30",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587930,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/40",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590594,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/42",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946086,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/43",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549037925,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 15
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  \toutput_name = $job.inputs.feature_file.path.split('/').slice(-1)[0]\n    \n    if (output_name.endsWith('.gz')) {\n    \treturn output_name + '.tbi'\n    }\n  \telse {\n     \treturn output_name + '.idx'\n  \t}  \n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output"
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "sbg:altPrefix": "",
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "id": "#verbosity",
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "label": "Memory Per Job",
            "description": "Memory per job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "label": "Memory Overhead Per Job",
            "description": "Memory overhead per job",
            "sbg:category": "Execution"
          },
          {
            "sbg:altPrefix": "",
            "label": "Feature File",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--feature-file",
              "position": 0
            },
            "type": [
              "File"
            ],
            "required": true,
            "id": "#feature_file",
            "description": "Feature file (eg., VCF or BED file) to index. Must be in a tribble-supported format Required.",
            "sbg:stageInput": "link"
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "IndexFeatureFile"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF,BED,RECAL",
            "label": "Output file with index",
            "type": [
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#feature_file",
              "glob": {
                "class": "Expression",
                "script": "{\n  \treturn $job.inputs.feature_file.path.split('/').slice(-1)[0]\n}",
                "engine": "#cwl-js-engine"
              },
              "secondaryFiles": [
                ".idx"
              ]
            },
            "id": "#output_with_index",
            "description": "Output file with index."
          },
          {
            "sbg:fileTypes": "IDX",
            "label": "Index file",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "glob": {
                "class": "Expression",
                "script": "{\n  \toutput_name = $job.inputs.feature_file.path.split('/').slice(-1)[0]\n    \n    if (output_name.endsWith('.gz')) {\n    \treturn output_name + '.tbi'\n    }\n  \telse {\n     \treturn output_name + '.idx'\n  \t}  \n}",
                "engine": "#cwl-js-engine"
              }
            },
            "id": "#index",
            "description": "Index file"
          }
        ],
        "label": "GATK IndexFeatureFile",
        "sbg:createdOn": 1500296617,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 787.5645454551587,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-index-feature-file/15",
        "description": "Creates indices for Feature-containing files, such as VCF and BED files.\n\n###**Overview** \nCreates indices for Feature-containing files, such as VCF and BED files.\n\n###**Inputs**  \nA feature file to be indexed.  \n\n###**Outputs**  \nAn index file.\n\n###**Usage example**\n\n    java -Xmx4g -jar gatk.jar \\  \n         IndexFeatureFile \\  \n         --feature_file feature_file.vcf \\ \n         --output feature_file.vcf.idx",
        "sbg:content_hash": "af3015979706ca747d636a4dfa5f99cbd6178fdb365d1636631653c6dbab9c3d0",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "sbg:revision": 15,
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549037925,
        "sbg:id": "h-f38ccdb7/h-955ebf63/h-05467c5e/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_IndexFeatureFile_2",
      "sbg:y": 787.5645454551587
    },
    {
      "sbg:x": 1268.0774601465412,
      "inputs": [
        {
          "id": "#GATK_ApplyBQSR.verbosity"
        },
        {
          "id": "#GATK_ApplyBQSR.use_original_qualities"
        },
        {
          "id": "#GATK_ApplyBQSR.use_jdk_inflater"
        },
        {
          "id": "#GATK_ApplyBQSR.use_jdk_deflater"
        },
        {
          "id": "#GATK_ApplyBQSR.static_quantized_quals"
        },
        {
          "id": "#GATK_ApplyBQSR.seconds_between_progress_updates"
        },
        {
          "id": "#GATK_ApplyBQSR.sample"
        },
        {
          "id": "#GATK_ApplyBQSR.round_down_quantized"
        },
        {
          "id": "#GATK_ApplyBQSR.reference"
        },
        {
          "id": "#GATK_ApplyBQSR.read_validation_stringency"
        },
        {
          "id": "#GATK_ApplyBQSR.read_name"
        },
        {
          "id": "#GATK_ApplyBQSR.read_index"
        },
        {
          "id": "#GATK_ApplyBQSR.read_filter"
        },
        {
          "id": "#GATK_ApplyBQSR.quiet"
        },
        {
          "id": "#GATK_ApplyBQSR.quantize_quals"
        },
        {
          "id": "#GATK_ApplyBQSR.preserve_qscores_less_than"
        },
        {
          "id": "#GATK_ApplyBQSR.pl_filter_name"
        },
        {
          "id": "#GATK_ApplyBQSR.minimum_mapping_quality"
        },
        {
          "id": "#GATK_ApplyBQSR.min_read_length"
        },
        {
          "id": "#GATK_ApplyBQSR.memory_per_job"
        },
        {
          "id": "#GATK_ApplyBQSR.memory_overhead_per_job"
        },
        {
          "id": "#GATK_ApplyBQSR.maximum_mapping_quality"
        },
        {
          "id": "#GATK_ApplyBQSR.max_read_length"
        },
        {
          "id": "#GATK_ApplyBQSR.max_fragment_length"
        },
        {
          "id": "#GATK_ApplyBQSR.library"
        },
        {
          "id": "#GATK_ApplyBQSR.lenient"
        },
        {
          "id": "#GATK_ApplyBQSR.keep_reverse"
        },
        {
          "id": "#GATK_ApplyBQSR.keep_read_group"
        },
        {
          "id": "#GATK_ApplyBQSR.intervals_string"
        },
        {
          "source": [
            "#SBG_Prepare_Intervals.intervals"
          ],
          "id": "#GATK_ApplyBQSR.intervals_file"
        },
        {
          "id": "#GATK_ApplyBQSR.interval_set_rule"
        },
        {
          "id": "#GATK_ApplyBQSR.interval_merging_rule"
        },
        {
          "id": "#GATK_ApplyBQSR.interval_exclusion_padding"
        },
        {
          "id": "#GATK_ApplyBQSR.input_cram"
        },
        {
          "source": [
            "#BWA_MEM_Bundle.aligned_reads"
          ],
          "id": "#GATK_ApplyBQSR.input_bam"
        },
        {
          "id": "#GATK_ApplyBQSR.include_interval_name_in_output_name",
          "default": true
        },
        {
          "id": "#GATK_ApplyBQSR.global_q_score_prior"
        },
        {
          "id": "#GATK_ApplyBQSR.filter_too_short"
        },
        {
          "id": "#GATK_ApplyBQSR.exclude_intervas_string"
        },
        {
          "id": "#GATK_ApplyBQSR.exclude_intervals_file"
        },
        {
          "id": "#GATK_ApplyBQSR.emit_original_quals"
        },
        {
          "id": "#GATK_ApplyBQSR.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#GATK_ApplyBQSR.disable_tool_default_read_filters"
        },
        {
          "id": "#GATK_ApplyBQSR.disable_sequence_dictionary_validation"
        },
        {
          "id": "#GATK_ApplyBQSR.disable_read_filter"
        },
        {
          "id": "#GATK_ApplyBQSR.disable_bam_index_caching"
        },
        {
          "id": "#GATK_ApplyBQSR.create_output_variant_md5"
        },
        {
          "id": "#GATK_ApplyBQSR.create_output_variant_index"
        },
        {
          "id": "#GATK_ApplyBQSR.create_output_bam_md5"
        },
        {
          "id": "#GATK_ApplyBQSR.cloud_prefetch_buffer"
        },
        {
          "id": "#GATK_ApplyBQSR.cloud_index_prefetch_buffer"
        },
        {
          "source": [
            "#GATK_BaseRecalibrator.recalibration_file"
          ],
          "id": "#GATK_ApplyBQSR.bqsr_recal_file"
        },
        {
          "id": "#GATK_ApplyBQSR.black_listed_lanes"
        },
        {
          "id": "#GATK_ApplyBQSR.black_list"
        },
        {
          "id": "#GATK_ApplyBQSR.ambig_filter_frac"
        },
        {
          "id": "#GATK_ApplyBQSR.ambig_filter_bases"
        },
        {
          "id": "#GATK_ApplyBQSR.add_output_vcf_command_line"
        },
        {
          "id": "#GATK_ApplyBQSR.add_output_sam_program_record"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_ApplyBQSR.output"
        }
      ],
      "scatter": "#GATK_ApplyBQSR.intervals_file",
      "run": {
        "x": 1268.0774601465412,
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": ""
          }
        ],
        "sbg:latestRevision": 31,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx2048M\" ApplyBQSR --bqsr-recal-file /path/to/bqsr.grp --output input_cram-1_1.recalibrated.cram  --create-output-bam-index",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "createOutputVariantIndex": true,
            "input_cram": [
              {
                "path": "/path/to/input_cram-1.cram",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input_cram-2.ext",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "memory_overhead_per_job": 0,
            "disableSequenceDictionaryValidation": true,
            "use_jdk_inflater": false,
            "QUIET": true,
            "lenient": false,
            "intervals_file": {
              "path": "/path/to/1.bed",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "reference": {
              "path": "/path/to/reference.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "memory_per_job": 2048,
            "disableBamIndexCaching": true,
            "createOutputBamMD5": true,
            "createOutputBamIndex": true,
            "use_jdk_deflater": false,
            "createOutputVariantMD5": true,
            "bqsr_recal_file": {
              "path": "/path/to/bqsr.grp",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "disableToolDefaultReadFilters": true,
            "addOutputSAMProgramRecord": true,
            "input_bam": null,
            "emit_original_quals": false,
            "exclude_intervas_string": "",
            "intervals_string": "",
            "addOutputVCFCommandLine": true,
            "keepReverse": true,
            "useOriginalQualities": true,
            "interval_merging_rule": "",
            "dontRequireSoftClipsBothEnds": true,
            "ambigFilterBases": 4,
            "include_interval_name_in_output_name": true,
            "round_down_quantized": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296630,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/14",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640320,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/15",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887412,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/16",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1501605489,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/17",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1501610676,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/18",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502190441,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/19",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502283422,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/21",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502287200,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/22",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502287213,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/23",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502288276,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/24",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718016,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/25",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405145,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/26",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105684,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/27",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504272777,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/28",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275123,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/29",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504789528,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/30",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522826,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/31",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786566,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/32",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587867,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/44",
            "sbg:revision": 18
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590545,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/46",
            "sbg:revision": 19
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599120,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/49",
            "sbg:revision": 20
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516365801,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/50",
            "sbg:revision": 21
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516370357,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/51",
            "sbg:revision": 22
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516960377,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/52",
            "sbg:revision": 23
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516972151,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/54",
            "sbg:revision": 24
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648144,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/56",
            "sbg:revision": 25
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946186,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/57",
            "sbg:revision": 26
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1522248805,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/58",
            "sbg:revision": 27
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1531405403,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/62",
            "sbg:revision": 28
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1531407772,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/67",
            "sbg:revision": 29
          },
          {
            "sbg:modifiedBy": "nikola_jovanovic",
            "sbg:modifiedOn": 1535119074,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-applybqsr/68",
            "sbg:revision": 30
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549037862,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 31
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "script": "{\n  interval_name = ''\n  \n  if ($job.inputs.include_interval_name_in_output_name){\n    if($job.inputs.intervals_file){\n      interval_path = [].concat($job.inputs.intervals_file)[0].path\n      interval_name = interval_path.split('/')[interval_path.split('/').length - 1].split('.')\n      interval_name.pop()\n      interval_name = '_' + interval_name.join('')\n    }\n  }\n  input = ''\n  if($job.inputs.input_cram){\n    input = [].concat($job.inputs.input_cram)[0].path.split('/').slice(-1)[0]\n  }\n  if($job.inputs.input_bam){\n    input = [].concat($job.inputs.input_bam)[0].path.split('/').slice(-1)[0]\n  }\n  input = input.split('.')\n  input = input.slice(0, -1).join('.') + interval_name +  '.recalibrated.' + input.slice(-1)\n  return input\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output"
          },
          {
            "valueFrom": "--create-output-bam-index",
            "separate": true
          },
          {
            "valueFrom": {
              "script": "{\n  interval_name = ''\n  interval_name = ''\n  \n  if ($job.inputs.include_interval_name_in_output_name){\n    if($job.inputs.intervals_file){\n      interval_path = [].concat($job.inputs.intervals_file)[0].path\n      interval_name = interval_path.split('/')[interval_path.split('/').length - 1].split('.')\n      interval_name.pop()\n      interval_name = '_' + interval_name.join('')\n    }\n  }\n  ext = 'bam'\n  input = ''\n  if($job.inputs.input_cram){\n\treturn ''\n  }\n  if($job.inputs.input_bam){\n    input = [].concat($job.inputs.input_bam)[0].path.split('/').slice(-1)[0]\n    input = input.split('.')\n    input_bai = input.slice(0, -1).join('.') + interval_name +  '.recalibrated.bai'\n    input_bam_bai = input.slice(0, -1).join('.') + interval_name +  '.recalibrated.bam.bai'\n\n    return ' && mv ' + input_bai + ' ' + input_bam_bai\n  }\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": false,
            "position": 100
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}.",
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "id": "#verbosity",
            "sbg:toolDefaultValue": "INFO"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-original-qualities",
              "position": 0
            },
            "description": "Use the base quality scores from the OQ tag Default value: false. Possible values: {true, false}.",
            "label": "Use Original Qualities",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#use_original_qualities",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#use_jdk_inflater",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#use_jdk_deflater",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--static-quantized-quals",
              "position": 0
            },
            "description": "Use static quantized quality scores to a given number of levels (with -bqsr) This argument may be specified 0 or more times. Default value: null. Cannot be used in conjuction with argument(s) quantizationLevels (qq).",
            "label": "Static Quantized Quals",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#static_quantized_quals",
            "sbg:toolDefaultValue": "null"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0.",
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "float"
            ],
            "id": "#seconds_between_progress_updates",
            "sbg:toolDefaultValue": "10"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required.",
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#sample",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--round-down-quantized",
              "position": 0
            },
            "description": "Round quals down to nearest quantized qual Default value: false. Possible values: {true, false} Cannot be used in conjuction with argument(s) quantizationLevels (qq).",
            "label": "Round Down Quantized",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#round_down_quantized",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "sbg:fileTypes": "FASTA, FA",
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--reference",
              "position": 0
            },
            "id": "#reference",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}.",
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "id": "#read_validation_stringency",
            "sbg:toolDefaultValue": "SILENT"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "description": "Keep only reads with this read name Required.",
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#read_name",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null.",
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#read_index",
            "sbg:toolDefaultValue": "null"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null.",
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "id": "#read_filter",
            "sbg:toolDefaultValue": "null"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#quiet",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quantize-quals",
              "position": 0
            },
            "description": "Quantize quality scores to a given number of levels Default value: 0. Cannot be used in conjuction with argument(s) staticQuantizationQuals (SQQ) roundDown (RDQ).",
            "label": "Quantize Quals",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#quantize_quals",
            "sbg:toolDefaultValue": "0"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--preserve-qscores-less-than",
              "position": 0
            },
            "description": "Don't recalibrate bases with quality scores less than this threshold Default value: 6.",
            "label": "Preserve Qscores Less Than",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#preserve_qscores_less_than",
            "sbg:toolDefaultValue": "6"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pl-filter-name",
              "position": 0
            },
            "description": "Keep reads with RG:PL attribute containing this string This argument must be specified at least once. Required.",
            "label": "Pl Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#pl_filter_name",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "description": "Minimum mapping quality to keep (inclusive) Default value: 10.",
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#minimum_mapping_quality",
            "sbg:toolDefaultValue": "10"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "description": "Keep only reads with length at least equal to the specified value Default value: 1.",
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#min_read_length",
            "sbg:toolDefaultValue": "1"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "sbg:stageInput": null,
            "id": "#memory_per_job",
            "label": "Memory Per Job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "sbg:stageInput": null,
            "id": "#memory_overhead_per_job",
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "description": "Maximum mapping quality to keep (inclusive) Default value: null.",
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#maximum_mapping_quality",
            "sbg:toolDefaultValue": "null"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "description": "Keep only reads with length at most equal to the specified value Required.",
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#max_read_length",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000.",
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#max_fragment_length",
            "sbg:toolDefaultValue": "1000000"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "description": "The name of the library to keep Required.",
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#library",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#lenient",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#keep_reverse",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "description": "The name of the read group to keep Required.",
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#keep_read_group",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#intervals_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#intervals_file",
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-set-rule",
              "position": 0
            },
            "description": "Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION}.",
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "UNION",
                  "INTERSECTION"
                ],
                "type": "enum"
              }
            ],
            "id": "#interval_set_rule",
            "sbg:toolDefaultValue": "UNION"
          },
          {
            "description": "Interval merging rule for abutting intervals  Default value: ALL. Possible values: {ALL, OVERLAPPING_ONLY}",
            "label": "Interval Padding",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-merging-rule",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#interval_merging_rule",
            "sbg:toolDefaultValue": "0",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0.",
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#interval_exclusion_padding",
            "sbg:toolDefaultValue": "0"
          },
          {
            "sbg:fileTypes": "CRAM",
            "label": "Input cram",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "prefix": "--input",
              "secondaryFiles": [
                ".crai"
              ]
            },
            "id": "#input_cram",
            "required": false,
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "CRAM file containing reads This argument must be specified at least once."
          },
          {
            "sbg:fileTypes": "BAM",
            "label": "Input bam",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "position": 0,
              "itemSeparator": null,
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--input",
              "secondaryFiles": [
                ".bai"
              ]
            },
            "id": "#input_bam",
            "required": false,
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "BAM/SAM file containing reads This argument must be specified at least once."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Include Interval Name In Output Name",
            "sbg:toolDefaultValue": "FALSE",
            "id": "#include_interval_name_in_output_name",
            "description": "Include interval name in output name.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--global-q-score-prior",
              "position": 0
            },
            "description": "Global Qscore Bayesian prior to use for BQSR Default value: -1.0.",
            "label": "Global Q Score Prior",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "float"
            ],
            "id": "#global_q_score_prior",
            "sbg:toolDefaultValue": "-1"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30.",
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#filter_too_short",
            "sbg:toolDefaultValue": "30"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "label": "Exclude Intervas String",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#exclude_intervas_string",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#exclude_intervals_file",
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--emit-original-quals",
              "position": 0
            },
            "description": "Emit original base qualities under the OQ tag Default value: false. Possible values: {true, false}.",
            "label": "Emit Original Quals",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#emit_original_quals",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#dont_require_soft_clips_both_ends",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_tool_default_read_filters",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_sequence_dictionary_validation",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "sbg:toolDefaultValue": null,
            "id": "#disable_read_filter",
            "description": "Read filters to be disabled before analysis  This argument may be specified 0 or more times. Default value: null. Possible Values: {WellformedReadFilter}"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_bam_index_caching",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#create_output_variant_md5",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#create_output_variant_index",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "true",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}.",
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#create_output_bam_md5",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "false",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40.",
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#cloud_prefetch_buffer",
            "sbg:toolDefaultValue": "40"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1.",
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#cloud_index_prefetch_buffer",
            "sbg:toolDefaultValue": "-1"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--bqsr-recal-file",
              "position": 0
            },
            "description": "Input recalibration table for BQSR Required.",
            "label": "Bqsr Recal File",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "type": [
              "File"
            ],
            "required": true,
            "id": "#bqsr_recal_file",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required.",
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#black_listed_lanes",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-list",
              "position": 0
            },
            "description": "This argument must be specified at least once. Required.",
            "label": "Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#black_list",
            "sbg:toolDefaultValue": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "description": "Threshold fraction of ambiguous bases Default value: 0.05.",
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "float"
            ],
            "id": "#ambig_filter_frac",
            "sbg:toolDefaultValue": "0"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#ambig_filter_bases",
            "type": [
              "null",
              "int"
            ],
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-vcf-command-line",
              "position": 0
            },
            "description": "If true, adds a command line header line to created VCF files. Default value: true. Possible values: {true, false}.",
            "label": "Add Output Vcf Command Line",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#add_output_vcf_command_line",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "true",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#add_output_sam_program_record",
            "type": [
              "null",
              "boolean"
            ],
            "sbg:toolDefaultValue": "true",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          "ApplyBQSR"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "BAM,SAM,CRAM",
            "label": "Output",
            "id": "#output",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input_bam",
              "glob": {
                "script": "{\n  if($job.inputs.input_cram){\n  \tinput = [].concat($job.inputs.input_cram)[0].path.split('/').slice(-1)[0]    \n  }\n  if($job.inputs.input_bam){\n  \tinput = [].concat($job.inputs.input_bam)[0].path.split('/').slice(-1)[0]\n  }\n  input = input.split('.').slice(-1)[0]\n  \n  return '*.' + input\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              },
              "secondaryFiles": [
                ".bai",
                ".crai"
              ],
              "sbg:metadata": {
                "intervals_file": {
                  "script": "{ \n  if ($job.inputs.intervals_file)\n  \treturn $job.inputs.intervals_file.path.split('/').pop()\n  else\n  \treturn ''\n}",
                  "class": "Expression",
                  "engine": "#cwl-js-engine"
                }
              }
            },
            "type": [
              "null",
              "File"
            ],
            "description": "Recalibrated BAM/SAM/CRAM file"
          }
        ],
        "sbg:revision": 31,
        "sbg:createdOn": 1500296630,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 270.2566226756189,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:image_url": null,
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic",
          "nikola_jovanovic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-applybqsr/31",
        "description": "Apply base quality score recalibration.\n\n###**Overview**  \n\nThis tool performs the second pass in a two-stage process called Base Quality Score Recalibration (BQSR). Specifically, it recalibrates the base qualities of the input reads based on the recalibration table produced by the BaseRecalibrator tool, and outputs a recalibrated BAM or CRAM file.\n\n####**Summary of the BQSR procedure**\n\nThe goal of this procedure is to correct for systematic bias that affect the assignment of base quality scores by the sequencer. The first pass consists of calculating error empirically and finding patterns in how error varies with basecall features over all bases. The relevant observations are written to a recalibration table. The second pass consists of applying numerical corrections to each individual basecall based on the patterns identified in the first step (recorded in the recalibration table) and write out the recalibrated data to a new BAM or CRAM file.\n\n###**Inputs**  \n\n- A BAM or CRAM file containing input read data\n- The covariates table (= recalibration file) generated by BaseRecalibrator on the input BAM or CRAM file\n\n###**Output**  \n\nA BAM or CRAM file containing the recalibrated read data\n\n###**Usage example**  \n\n    ./gatk-launch ApplyBQSR \\   \n         -R reference.fasta \\ \n         -I input.bam \\  \n         -BQSR recalibration.table \\  \n         -O output.bam  \n\n###**Notes**\n\n- This tool replaces the use of PrintReads for the application of base quality score recalibration as practiced in earlier versions of GATK (2.x and 3.x).\n- You should only run ApplyBQSR with the covariates table created from the input BAM or CRAM file(s).\n- Original qualities can be retained in the output file under the \"OQ\" tag if desired. See the `--emit_original_quals` argument for details.  \n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:content_hash": "a5ce018863d19853b0f0ab2596dfe87cfd249927aff46a9a602d5bb839176df6f",
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "label": "GATK ApplyBQSR",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549037862,
        "sbg:id": "h-cf41801d/h-0226d3c3/h-5e241b6e/0",
        "temporaryFailCodes": [],
        "sbg:wrapperAuthor": "filip_tubic"
      },
      "id": "#GATK_ApplyBQSR",
      "sbg:y": 270.2566226756189
    },
    {
      "sbg:x": 1532.7304075849204,
      "inputs": [
        {
          "id": "#GATK_HaplotypeCaller.wgs_hg38_mode_memory"
        },
        {
          "id": "#GATK_HaplotypeCaller.verbosity"
        },
        {
          "id": "#GATK_HaplotypeCaller.use_new_qual_calculator"
        },
        {
          "id": "#GATK_HaplotypeCaller.use_jdk_inflater"
        },
        {
          "id": "#GATK_HaplotypeCaller.use_jdk_deflater"
        },
        {
          "id": "#GATK_HaplotypeCaller.use_filtered_reads_for_annotations"
        },
        {
          "id": "#GATK_HaplotypeCaller.use_alleles_trigger"
        },
        {
          "id": "#GATK_HaplotypeCaller.standard_min_confidence_threshold_for_calling"
        },
        {
          "id": "#GATK_HaplotypeCaller.smith_waterman"
        },
        {
          "id": "#GATK_HaplotypeCaller.seconds_between_progress_updates"
        },
        {
          "id": "#GATK_HaplotypeCaller.sample_ploidy"
        },
        {
          "id": "#GATK_HaplotypeCaller.sample_name"
        },
        {
          "id": "#GATK_HaplotypeCaller.sample"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#GATK_HaplotypeCaller.reference"
        },
        {
          "id": "#GATK_HaplotypeCaller.recover_dangling_heads"
        },
        {
          "source": [
            "#GATK_ApplyBQSR.output"
          ],
          "id": "#GATK_HaplotypeCaller.reads"
        },
        {
          "id": "#GATK_HaplotypeCaller.read_validation_stringency"
        },
        {
          "id": "#GATK_HaplotypeCaller.read_name"
        },
        {
          "id": "#GATK_HaplotypeCaller.read_index"
        },
        {
          "id": "#GATK_HaplotypeCaller.read_group_black_list"
        },
        {
          "id": "#GATK_HaplotypeCaller.read_filter"
        },
        {
          "id": "#GATK_HaplotypeCaller.quiet"
        },
        {
          "id": "#GATK_HaplotypeCaller.platform_filter_name"
        },
        {
          "id": "#GATK_HaplotypeCaller.phred_scaled_global_read_mismapping_rate"
        },
        {
          "id": "#GATK_HaplotypeCaller.pcr_indel_model"
        },
        {
          "id": "#GATK_HaplotypeCaller.pair_hmm_gap_continuation_penalty"
        },
        {
          "id": "#GATK_HaplotypeCaller.output_mode"
        },
        {
          "id": "#GATK_HaplotypeCaller.num_pruning_samples"
        },
        {
          "id": "#GATK_HaplotypeCaller.native_pair_hmm_use_double_precision"
        },
        {
          "id": "#GATK_HaplotypeCaller.native_pair_hmm_threads"
        },
        {
          "id": "#GATK_HaplotypeCaller.minimum_mapping_quality"
        },
        {
          "id": "#GATK_HaplotypeCaller.min_read_length"
        },
        {
          "id": "#GATK_HaplotypeCaller.min_pruning"
        },
        {
          "id": "#GATK_HaplotypeCaller.min_dangling_branch_length"
        },
        {
          "id": "#GATK_HaplotypeCaller.min_base_quality_score"
        },
        {
          "id": "#GATK_HaplotypeCaller.min_assembly_region_size"
        },
        {
          "id": "#GATK_HaplotypeCaller.memory_per_job",
          "default": 2048
        },
        {
          "id": "#GATK_HaplotypeCaller.memory_overhead_per_job",
          "default": 64
        },
        {
          "id": "#GATK_HaplotypeCaller.maximum_mapping_quality"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_reads_per_alignment_start"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_read_length"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_prob_propagation_distance"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_num_haplotypes_in_population"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_genotype_count"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_fragment_length"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_assembly_region_size"
        },
        {
          "id": "#GATK_HaplotypeCaller.max_alternate_alleles"
        },
        {
          "id": "#GATK_HaplotypeCaller.library"
        },
        {
          "id": "#GATK_HaplotypeCaller.lenient"
        },
        {
          "id": "#GATK_HaplotypeCaller.kmer_size"
        },
        {
          "id": "#GATK_HaplotypeCaller.keep_reverse"
        },
        {
          "id": "#GATK_HaplotypeCaller.keep_read_group"
        },
        {
          "id": "#GATK_HaplotypeCaller.intervals_string"
        },
        {
          "source": [
            "#SBG_Prepare_Intervals.intervals"
          ],
          "id": "#GATK_HaplotypeCaller.intervals_file"
        },
        {
          "id": "#GATK_HaplotypeCaller.interval_set_rule",
          "default": "UNION"
        },
        {
          "id": "#GATK_HaplotypeCaller.interval_padding"
        },
        {
          "id": "#GATK_HaplotypeCaller.interval_merging_rule"
        },
        {
          "id": "#GATK_HaplotypeCaller.interval_exclusion_padding"
        },
        {
          "id": "#GATK_HaplotypeCaller.input_prior"
        },
        {
          "id": "#GATK_HaplotypeCaller.indel_size_to_eliminate_in_ref_model"
        },
        {
          "id": "#GATK_HaplotypeCaller.indel_heterozygosity"
        },
        {
          "id": "#GATK_HaplotypeCaller.include_interval_name_in_output_name"
        },
        {
          "id": "#GATK_HaplotypeCaller.heterozygosity_stdev"
        },
        {
          "id": "#GATK_HaplotypeCaller.heterozygosity"
        },
        {
          "id": "#GATK_HaplotypeCaller.gvcf_gq_bands"
        },
        {
          "id": "#GATK_HaplotypeCaller.graph_output"
        },
        {
          "id": "#GATK_HaplotypeCaller.genotyping_mode",
          "default": "DISCOVERY"
        },
        {
          "id": "#GATK_HaplotypeCaller.filter_too_short"
        },
        {
          "id": "#GATK_HaplotypeCaller.exclude_intervals_string"
        },
        {
          "id": "#GATK_HaplotypeCaller.exclude_intervals_file"
        },
        {
          "id": "#GATK_HaplotypeCaller.emit_ref_confidence",
          "default": "GVCF"
        },
        {
          "id": "#GATK_HaplotypeCaller.dont_use_soft_clipped_bases"
        },
        {
          "id": "#GATK_HaplotypeCaller.dont_trim_active_regions"
        },
        {
          "id": "#GATK_HaplotypeCaller.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#GATK_HaplotypeCaller.dont_increase_kmer_sizes_for_cycles"
        },
        {
          "id": "#GATK_HaplotypeCaller.do_not_run_physical_phasing"
        },
        {
          "id": "#GATK_HaplotypeCaller.disable_tool_default_read_filters"
        },
        {
          "id": "#GATK_HaplotypeCaller.disable_tool_default_annotations"
        },
        {
          "id": "#GATK_HaplotypeCaller.disable_sequence_dictionary_validation"
        },
        {
          "id": "#GATK_HaplotypeCaller.disable_read_filter"
        },
        {
          "id": "#GATK_HaplotypeCaller.disable_optimizations"
        },
        {
          "id": "#GATK_HaplotypeCaller.disable_bam_index_caching"
        },
        {
          "id": "#GATK_HaplotypeCaller.debug"
        },
        {
          "id": "#GATK_HaplotypeCaller.dbsnp_gz"
        },
        {
          "source": [
            "#GATK_IndexFeatureFile.output_with_index"
          ],
          "id": "#GATK_HaplotypeCaller.db_snp"
        },
        {
          "id": "#GATK_HaplotypeCaller.create_output_variant_md5"
        },
        {
          "id": "#GATK_HaplotypeCaller.create_output_variant_index"
        },
        {
          "id": "#GATK_HaplotypeCaller.create_output_bam_md5"
        },
        {
          "id": "#GATK_HaplotypeCaller.create_output_bam_index"
        },
        {
          "id": "#GATK_HaplotypeCaller.cpus_per_job"
        },
        {
          "id": "#GATK_HaplotypeCaller.contamination_fraction_to_filter"
        },
        {
          "id": "#GATK_HaplotypeCaller.contamination_fraction_per_sample_file"
        },
        {
          "id": "#GATK_HaplotypeCaller.consensus"
        },
        {
          "id": "#GATK_HaplotypeCaller.comp"
        },
        {
          "id": "#GATK_HaplotypeCaller.cloud_prefetch_buffer"
        },
        {
          "id": "#GATK_HaplotypeCaller.cloud_index_prefetch_buffer"
        },
        {
          "id": "#GATK_HaplotypeCaller.black_listed_lanes"
        },
        {
          "id": "#GATK_HaplotypeCaller.base_quality_score_threshold"
        },
        {
          "id": "#GATK_HaplotypeCaller.bam_writer_type"
        },
        {
          "id": "#GATK_HaplotypeCaller.bam_output"
        },
        {
          "id": "#GATK_HaplotypeCaller.assembly_region_padding"
        },
        {
          "id": "#GATK_HaplotypeCaller.annotations_to_exclude"
        },
        {
          "id": "#GATK_HaplotypeCaller.annotation_group"
        },
        {
          "id": "#GATK_HaplotypeCaller.annotation"
        },
        {
          "id": "#GATK_HaplotypeCaller.annotate_nda"
        },
        {
          "id": "#GATK_HaplotypeCaller.ambig_filter_frac"
        },
        {
          "id": "#GATK_HaplotypeCaller.ambig_filter_bases"
        },
        {
          "id": "#GATK_HaplotypeCaller.allow_non_unique_kmers_in_ref"
        },
        {
          "id": "#GATK_HaplotypeCaller.alleles"
        },
        {
          "id": "#GATK_HaplotypeCaller.all_site_p_ls"
        },
        {
          "id": "#GATK_HaplotypeCaller.add_output_sam_program_record"
        },
        {
          "id": "#GATK_HaplotypeCaller.activity_profile_out"
        },
        {
          "id": "#GATK_HaplotypeCaller.active_probability_threshold"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_HaplotypeCaller.output_vcf"
        },
        {
          "id": "#GATK_HaplotypeCaller.output_bam"
        }
      ],
      "scatter": "#GATK_HaplotypeCaller.reads",
      "run": {
        "x": 1532.7304075849204,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  memory = 0\n  \n  if($job.inputs.memory_per_job){\n  \t memory = $job.inputs.memory_per_job\n  }\n  else{\n    if($job.inputs.wgs_hg38_mode_memory){\n      \treference_name = $job.inputs.reference.path.replace(/^.*[\\\\\\/]/, '')\n      \n       \tif(reference_name.indexOf('38') >-1){\n      \t\tmemory = $job.inputs.wgs_hg38_mode_memory\n    \t}\n        else{\n       \t\tmemory = 2048 \n        }\n    }\n  \telse{\n       memory = 2048\n  \t}\n  }\n       \n  if($job.inputs.memory_overhead_per_job){\n\treturn memory + $job.inputs.memory_overhead_per_job  \n  }\n  else{\n  \treturn memory\n  }\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 32,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx2048M\" HaplotypeCaller --input /path/to/input.bam --reference /path/to/reference.fa --output input.g.vcf",
        "sbg:job": {
          "allocatedResources": {
            "cpu": 1,
            "mem": 2048
          },
          "inputs": {
            "out_mode": null,
            "bqsr": {
              "path": "/path/to/bqsr.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "contamination_fraction": null,
            "activity_profile_out": "",
            "pcr_indel_model": null,
            "consensus": false,
            "ambigFilterBases": null,
            "emit_ref_confidence": "GVCF",
            "bamout": false,
            "dbsnp_gz": {
              "path": "/path/to/dbsnp_gz.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".tbi"
                }
              ]
            },
            "reference": {
              "path": "/path/to/reference.fa",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "memory_per_job": null,
            "cpus_per_job": null,
            "no_soft_clipped": false,
            "disableToolDefaultReadFilters": false,
            "db_snp": {
              "path": "/path/to/db_snp.vcf",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".idx"
                }
              ]
            },
            "memory_overhead_per_job": null,
            "annotation_group": "",
            "min_length": null,
            "gq_threshold": [
              null
            ],
            "doNotRunPhysicalPhasing": false,
            "disable_opt": false,
            "annotate_all_sites_PLs": false,
            "allow_non_unique_kmers": false,
            "output_raw_activity": "",
            "min_base_q_scores": null,
            "dontUseSoftClippedBases": false,
            "max_active_region_size": null,
            "allowNonUniqueKmersInRef": false,
            "useNewAFCalculator": false,
            "exclude_intervals_string": "",
            "use_allele_trigger": false,
            "use_jdk_deflater": false,
            "max_reads_active_reg": null,
            "force_active": false,
            "consensus_mode": false,
            "exclude_ann": [
              ""
            ],
            "keepReverse": false,
            "no_cmdline_in_header": false,
            "createOutputBamIndex": false,
            "min_pruning_threshold": "",
            "debug": false,
            "sample_name": "",
            "readShardPadding": null,
            "indel_size": null,
            "active_reg_ext": "",
            "heterozygosityStandardDeviation": null,
            "dont_increase_kmers": false,
            "gap_penalty": null,
            "dontIncreaseKmerSizesForCycles": false,
            "maxReadsInMemoryPerSample": null,
            "native_pair_hmm_use_double_precision": false,
            "interval_merging_rule": null,
            "no_active_region_trim": false,
            "useDoublePrecision": false,
            "use_jdk_inflater": false,
            "QUIET": false,
            "lenient": false,
            "allSitePLs": false,
            "disable_tool_default_annotations": true,
            "readShardSize": null,
            "createOutputBamMD5": false,
            "write_to_bam": null,
            "bam_out": "",
            "useFilteredReadsForAnnotations": false,
            "wgs_hg38_mode_memory": null,
            "mismapping_rate": null,
            "addOutputSAMProgramRecord": false,
            "recoverDanglingHeads": false,
            "smith_waterman": null,
            "reads": [
              {
                "path": "/path/to/input.bam",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "max_haplotypes": null,
            "secondsBetweenProgressUpdates": null,
            "disableBamIndexCaching": false,
            "dontTrimActiveRegions": false,
            "kmer_size": null,
            "createOutputVariantIndex": false,
            "disable_phasing": false,
            "active_reg_output_file_name": "",
            "disableOptimizations": false,
            "bamOutput": false,
            "max_genotype_count": null,
            "band_pass": "",
            "graph_file": "",
            "intervals_file": [
              {
                "path": "/path/to/1.bed",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "genotyping_mode": null,
            "annotation_groups": [
              ""
            ],
            "annotateNDA": false,
            "maxTotalReadsInMemory": null,
            "emitDroppedReads": false,
            "emitRefConfidence": null,
            "prob_threshold": null,
            "use_filtered_reads": false,
            "min_reads_per_algn": null,
            "intervals_string": "",
            "createOutputVariantMD5": false,
            "useAllelesTrigger": false,
            "min_graph_pruning": "",
            "disableSequenceDictionaryValidation": false,
            "dontRequireSoftClipsBothEnds": false,
            "include_interval_name_in_output_name": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296570,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/24",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640351,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/25",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887426,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/26",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502111506,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/27",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502190447,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/28",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718044,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/29",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405184,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/33",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105725,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/34",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504190940,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/35",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504264072,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/38",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504264485,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/39",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504264657,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/40",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504273058,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/41",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275166,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/42",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504789607,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/45",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1505823077,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/46",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1507566130,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/49",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1507625689,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/50",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522877,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/51",
            "sbg:revision": 18
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786609,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/52",
            "sbg:revision": 19
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587922,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/64",
            "sbg:revision": 20
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590582,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/66",
            "sbg:revision": 21
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599053,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/70",
            "sbg:revision": 22
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516365803,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/71",
            "sbg:revision": 23
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516373194,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/72",
            "sbg:revision": 24
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516899315,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/73",
            "sbg:revision": 25
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516960383,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/74",
            "sbg:revision": 26
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516968545,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/75",
            "sbg:revision": 27
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519225983,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/76",
            "sbg:revision": 28
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519900717,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/77",
            "sbg:revision": 29
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946125,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/78",
            "sbg:revision": 30
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1538570808,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/GATK_HaplotypeCaller/79",
            "sbg:revision": 31
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549028728,
            "sbg:revisionNotes": "Latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 32
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\t\n  interval_name = ''\n  \n  if ($job.inputs.include_interval_name_in_output_name){\n    if($job.inputs.intervals_file){\n      interval_path = [].concat($job.inputs.intervals_file)[0].path\n      interval_name = interval_path.split('/')[interval_path.split('/').length - 1].split('.')\n      interval_name.pop()\n      interval_name = '_' + interval_name.join('')\n    }\n  }\n  \n  read_name = [].concat($job.inputs.reads)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  \n  if (read_name[read_name.length - 2] == 'recalibrated')\n  \tread_namebase = read_name.slice(0, read_name.length - 2).join('.')\n  else\n    read_namebase = read_name.slice(0, read_name.length - 1).join('.')\n   \n  if($job.inputs.emit_ref_confidence == 'GVCF')\n  \treturn read_namebase + interval_name + '.g.vcf'\n  else\n  \treturn read_namebase + interval_name +  '.vcf'\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output"
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  reads = [].concat($job.inputs.reads)\n  \n  if ($job.inputs.bam_output) {\n    \n    return '--bam-output ' + reads[0].path.split('/').pop().split('.').slice(0,-1).join('.') + '.reassembled.bam'\n    \n  } else {\n    \n    return ''\n    \n  }\n  \n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "position": 100
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#wgs_hg38_mode_memory",
            "description": "Set recommended value for memory if reference v38 is used",
            "label": "Wgs Hg38 Mode Memory",
            "sbg:category": "Optional Arguments"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#verbosity",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "label": "Use New Qual Calculator",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-new-qual-calculator",
              "position": 0
            },
            "id": "#use_new_qual_calculator",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If provided, we will use the new qual model. Default value: false. Possible values: {true, false}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-filtered-reads-for-annotations",
              "position": 0
            },
            "label": "Use Filtered Reads For Annotations",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_filtered_reads_for_annotations",
            "description": "Use the contamination-filtered read maps for the purposes of annotating variants Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-alleles-trigger",
              "position": 0
            },
            "label": "Use Alleles Trigger",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_alleles_trigger",
            "description": "Use additional trigger on variants found in an external alleles file Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--standard-min-confidence-threshold-for-calling",
              "position": 0
            },
            "label": "Standard Min Confidence Threshold For Calling",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#standard_min_confidence_threshold_for_calling",
            "type": [
              "null",
              "float"
            ],
            "description": "The minimum phred-scaled confidence threshold at which variants should be called Default value: 10.0."
          },
          {
            "label": "Smith-Waterman",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--smith-waterman"
            },
            "type": [
              "null",
              {
                "name": "smith_waterman",
                "symbols": [
                  "FASTEST_AVAILABLE",
                  "AVX_ENABLED",
                  "JAVA"
                ],
                "type": "enum"
              }
            ],
            "id": "#smith_waterman",
            "description": "Which Smith-Waterman implementation to use, generally FASTEST_AVAILABLE is the right choice  Default value: JAVA.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#seconds_between_progress_updates",
            "type": [
              "null",
              "float"
            ],
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-ploidy",
              "position": 0
            },
            "label": "Sample Ploidy",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_ploidy",
            "type": [
              "null",
              "int"
            ],
            "description": "Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy). Default value: 2."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-name",
              "position": 0
            },
            "label": "Sample Name",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#sample_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Name of single sample to use from a multi-sample bam Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#sample",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--reference",
              "position": 0
            },
            "label": "Reference",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "id": "#reference",
            "required": true,
            "type": [
              "File"
            ],
            "description": "Reference sequence file Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--recover-dangling-heads",
              "position": 0
            },
            "label": "Recover Dangling Heads",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#recover_dangling_heads",
            "description": "This argument is deprecated since version 3.3 Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "position": 0,
              "sbg:cmdInclude": true,
              "itemSeparator": null,
              "separate": true,
              "prefix": "--input",
              "secondaryFiles": [
                ".bai"
              ]
            },
            "sbg:fileTypes": "BAM",
            "label": "Reads",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "",
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "required": true,
            "id": "#reads",
            "description": "BAM/SAM/CRAM file containing reads This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_validation_stringency",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#read_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep only reads with this read name Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_index",
            "type": [
              "null",
              "string"
            ],
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "label": "Read Group Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-group-black-list",
              "position": 0
            },
            "id": "#read_group_black_list",
            "type": [
              "null",
              "string"
            ],
            "description": "This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Platform Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--platform-filter-name",
              "position": 0
            },
            "id": "#platform_filter_name",
            "type": [
              "null",
              "string"
            ],
            "description": "Platform attribute (PL) to match. This argument must be specified at least once."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--phred-scaled-global-read-mismapping-rate",
              "position": 0
            },
            "label": "Phred Scaled Global Read Mismapping Rate",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#phred_scaled_global_read_mismapping_rate",
            "type": [
              "null",
              "int"
            ],
            "description": "The global assumed mismapping rate for reads Default value: 45."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pcr-indel-model",
              "position": 0
            },
            "label": "Pcr Indel Model",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#pcr_indel_model",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "NONE",
                  "HOSTILE",
                  "AGGRESSIVE",
                  "CONSERVATIVE"
                ],
                "type": "enum"
              }
            ],
            "description": "The PCR indel model to use Default value: CONSERVATIVE. Possible values: {NONE, HOSTILE, AGGRESSIVE, CONSERVATIVE}."
          },
          {
            "label": "Pair HMM Gap Continuation Penalty",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pair-hmm-gap-continuation-penalty",
              "position": 0
            },
            "id": "#pair_hmm_gap_continuation_penalty",
            "type": [
              "null",
              "int"
            ],
            "description": "Flat gap continuation penalty for use in the Pair HMM Default value: 10."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--output-mode",
              "position": 0
            },
            "label": "Output Mode",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#output_mode",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "EMIT_VARIANTS_ONLY",
                  "EMIT_ALL_CONFIDENT_SITES",
                  "EMIT_ALL_SITES"
                ],
                "type": "enum"
              }
            ],
            "description": "Specifies which type of calls we should output Default value: EMIT_VARIANTS_ONLY. Possible values: {EMIT_VARIANTS_ONLY, EMIT_ALL_CONFIDENT_SITES, EMIT_ALL_SITES}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--num-pruning-samples",
              "position": 0
            },
            "label": "Num Pruning Samples",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#num_pruning_samples",
            "type": [
              "null",
              "int"
            ],
            "description": "Number of samples that must pass the minPruning threshold Default value: 1."
          },
          {
            "label": "Native Pair Hmm Use Double Precision",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--native-pair-hmm-use-double-precision"
            },
            "id": "#native_pair_hmm_use_double_precision",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Use double precision in the native pairHmm. This is slower but matches the java implementation better. Default value: false."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--native-pair-hmm-threads",
              "position": 0
            },
            "label": "Native Pair Hmm Threads",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#native_pair_hmm_threads",
            "type": [
              "null",
              "int"
            ],
            "description": "How many threads should a native pairHMM implementation use Default value: 1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#minimum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum mapping quality to keep (inclusive) Default value: 20."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#min_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at least equal to the specified value Default value: 1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-pruning",
              "position": 0
            },
            "label": "Min Pruning",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#min_pruning",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum support to not prune paths in the graph Default value: 2."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-dangling-branch-length",
              "position": 0
            },
            "label": "Min Dangling Branch Length",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#min_dangling_branch_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum length of a dangling branch to attempt recovery Default value: 4."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-base-quality-score",
              "position": 0
            },
            "label": "Min Base Quality Score",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_base_quality_score",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum base quality required to consider a base for calling Default value: 10."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-assembly-region-size",
              "position": 0
            },
            "label": "Min Assembly Region Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#min_assembly_region_size",
            "type": [
              "null",
              "int"
            ],
            "description": "Minimum size of an assembly region Default value: 50."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "description": "Amount of RAM memory to be used per job. Defaults to 2048MB for Single threaded jobs,and all of the available memory on the instance for multi-threaded jobs.",
            "label": "Memory Per Job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "description": "Memory overhead per job. By default this parameter value is set to '0' (zero megabytes). This parameter value is added to the Memory per job parameter value. This results in the allocation of the sum total (Memory per job and Memory overhead per job) amount of memory per job. By default the memory per job parameter value is set to 2048 megabytes, unless specified otherwise.",
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#maximum_mapping_quality",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum mapping quality to keep (inclusive) Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-reads-per-alignment-start",
              "position": 0
            },
            "label": "Max Reads Per Alignment Start",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_reads_per_alignment_start",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of reads to retain per alignment start position. Reads above this threshold will be downsampled. Set to 0 to disable. Default value: 50."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_read_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only reads with length at most equal to the specified value Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-prob-propagation-distance",
              "position": 0
            },
            "label": "Max Prob Propagation Distance",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#max_prob_propagation_distance",
            "type": [
              "null",
              "int"
            ],
            "description": "Upper limit on how many bases away probability mass can be moved around when calculating the boundaries between active and inactive assembly regions Default value: 50."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-num-haplotypes-in-population",
              "position": 0
            },
            "label": "Max Num Haplotypes In Population",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#max_num_haplotypes_in_population",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of haplotypes to consider for your population Default value: 128."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-genotype-count",
              "position": 0
            },
            "label": "Max Genotype Count",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#max_genotype_count",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of genotypes to consider at any site Default value: 1024."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#max_fragment_length",
            "type": [
              "null",
              "int"
            ],
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-assembly-region-size",
              "position": 0
            },
            "label": "Max Assembly Region Size",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#max_assembly_region_size",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum size of an assembly region Default value: 300."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-alternate-alleles",
              "position": 0
            },
            "label": "Max Alternate Alleles",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#max_alternate_alleles",
            "type": [
              "null",
              "int"
            ],
            "description": "Maximum number of alternate alleles to genotype Default value: 6."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#library",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the library to keep Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#lenient",
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--kmer-size",
              "position": 0
            },
            "label": "Kmer Size",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#kmer_size",
            "type": [
              "null",
              "int"
            ],
            "description": "Kmer size to use in the read threading assembler This argument may be specified 0 or more times. Default value: [10, 25]."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#keep_reverse",
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#keep_read_group",
            "type": [
              "null",
              "string"
            ],
            "description": "The name of the read group to keep Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#intervals_string",
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n  if($job.inputs.intervals_file){\n    if($job.inputs.intervals_file instanceof Array){\n      if($job.inputs.intervals_file.length > 1){\n        if([].concat($job.inputs.reads)[0].metadata)\n          if([].concat($job.inputs.reads)[0].metadata.intervals_file)\n            return '--intervals ' + [].concat($job.inputs.reads)[0].metadata.intervals_file\n      } else return '--intervals ' + [].concat($job.inputs.intervals_file)[0].path\n    } else return '--intervals ' + [].concat($job.inputs.intervals_file)[0].path\n  } else\n    return ''\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": false,
              "itemSeparator": " "
            },
            "type": [
              "null",
              {
                "items": "File",
                "type": "array"
              }
            ],
            "required": false,
            "id": "#intervals_file",
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": "link"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-set-rule",
              "position": 0
            },
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_set_rule",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "UNION",
                  "INTERSECTION"
                ],
                "type": "enum"
              }
            ],
            "description": "Set merging approach to use for combining interval inputs Default value: UNION. Possible values: {UNION, INTERSECTION}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-padding",
              "position": 0
            },
            "label": "Interval Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are including. Default value: 0."
          },
          {
            "label": "Interval Merging Rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-merging-rule"
            },
            "type": [
              "null",
              {
                "name": "interval_merging_rule",
                "symbols": [
                  "ALL",
                  "OVERLAPPING_ONLY"
                ],
                "type": "enum"
              }
            ],
            "id": "#interval_merging_rule",
            "description": "Interval merging rule for abutting intervals. Default value: ALL.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#interval_exclusion_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--input-prior",
              "position": 0
            },
            "label": "Input Prior",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#input_prior",
            "type": [
              "null",
              "float"
            ],
            "description": "Input prior for calls This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--indel-size-to-eliminate-in-ref-model",
              "position": 0
            },
            "label": "Indel Size To Eliminate In Ref Model",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#indel_size_to_eliminate_in_ref_model",
            "type": [
              "null",
              "int"
            ],
            "description": "The size of an indel to check for in the reference model Default value: 10."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--indel-heterozygosity",
              "position": 0
            },
            "label": "Indel Heterozygosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#indel_heterozygosity",
            "type": [
              "null",
              "float"
            ],
            "description": "Heterozygosity for indel calling. See the GATKDocs for heterozygosity for full details on the meaning of this population genetics concept Default value: 1.25E-4."
          },
          {
            "label": "Include Interval Name In Output Name",
            "sbg:toolDefaultValue": "FALSE",
            "id": "#include_interval_name_in_output_name",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Include interval name in output name.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--heterozygosity-stdev",
              "position": 0
            },
            "label": "Heterozygosity Stdev",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#heterozygosity_stdev",
            "type": [
              "null",
              "float"
            ],
            "description": "Standard deviation of eterozygosity for SNP and indel calling. Default value: 0.01."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--heterozygosity",
              "position": 0
            },
            "label": "Heterozygosity",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#heterozygosity",
            "type": [
              "null",
              "float"
            ],
            "description": "Heterozygosity value used to compute prior likelihoods for any locus. See the GATKDocs for full details on the meaning of this population genetics concept Default value: 0.001."
          },
          {
            "label": "Gvcf GQ Bands",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--gvcf-gq-bands",
              "position": 0
            },
            "id": "#gvcf_gq_bands",
            "type": [
              "null",
              "int"
            ],
            "description": "GQ thresholds for reference confidence bands This argument may be specified 0 or more times. Default value: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 70, 80, 90, 99]."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--graph-output",
              "position": 0
            },
            "label": "Graph Output",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#graph_output",
            "type": [
              "null",
              "string"
            ],
            "description": "Write debug assembly graph information to this file Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--genotyping-mode",
              "position": 0
            },
            "label": "Genotyping Mode",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#genotyping_mode",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "DISCOVERY",
                  "GENOTYPE_GIVEN_ALLELES"
                ],
                "type": "enum"
              }
            ],
            "description": "Specifies how to determine the alternate alleles to use for genotyping Default value: DISCOVERY. Possible values: {DISCOVERY, GENOTYPE_GIVEN_ALLELES}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#filter_too_short",
            "type": [
              "null",
              "int"
            ],
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "label": "Exclude Intervals String",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "string"
            ],
            "id": "#exclude_intervals_string",
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#exclude_intervals_file",
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--emit-ref-confidence",
              "position": 0
            },
            "label": "Emit Ref Confidence",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#emit_ref_confidence",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "NONE",
                  "BP_RESOLUTION",
                  "GVCF"
                ],
                "type": "enum"
              }
            ],
            "description": "Mode for emitting reference confidence scores Default value: NONE. Possible values: {NONE, BP_RESOLUTION, GVCF}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-use-soft-clipped-bases",
              "position": 0
            },
            "label": "Dont Use Soft Clipped Bases",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#dont_use_soft_clipped_bases",
            "description": "Do not analyze soft clipped bases in the reads Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-trim-active-regions",
              "position": 0
            },
            "label": "Dont Trim Active Regions",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#dont_trim_active_regions",
            "description": "If specified, we will not trim down the active region from the full region (active + extension) to just the active interval for genotyping Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#dont_require_soft_clips_both_ends",
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-increase-kmer-sizes-for-cycles",
              "position": 0
            },
            "label": "Dont Increase Kmer Sizes For Cycles",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#dont_increase_kmer_sizes_for_cycles",
            "description": "Disable iterating over kmer sizes when graph cycles are detected Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--do-not-run-physical-phasing",
              "position": 0
            },
            "label": "Do Not Run Physical Phasing",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#do_not_run_physical_phasing",
            "description": "Disable physical phasing Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_tool_default_read_filters",
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Disable Tool Default Annotations",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-annotations"
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_tool_default_annotations",
            "description": "Disable all tool default annotations.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_sequence_dictionary_validation",
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#disable_read_filter",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "description": "Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-optimizations",
              "position": 0
            },
            "label": "Disable Optimizations",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_optimizations",
            "description": "Don't skip calculations in ActiveRegions with no variants Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_bam_index_caching",
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--debug",
              "position": 0
            },
            "label": "Debug",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#debug",
            "description": "Print out very verbose debug information about each triggering active region Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:fileTypes": "GZ",
            "label": "dbsnp gzipped",
            "required": false,
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n  if($job.inputs.dbsnp_gz)\n    return '--dbsnp ' + [].concat($job.inputs.dbsnp_gz)[0].path\n  else return ''\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".tbi"
              ]
            },
            "id": "#dbsnp_gz",
            "type": [
              "null",
              "File"
            ],
            "description": "dbsnp gzipped"
          },
          {
            "inputBinding": {
              "valueFrom": {
                "class": "Expression",
                "script": "{\n  if($job.inputs.db_snp)\n    return '--dbsnp ' + [].concat($job.inputs.db_snp)[0].path\n  else return ''\n}",
                "engine": "#cwl-js-engine"
              },
              "sbg:cmdInclude": true,
              "separate": true,
              "secondaryFiles": [
                ".idx"
              ],
              "position": 0
            },
            "sbg:fileTypes": "VCF",
            "label": "Db Snp",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "-D",
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#db_snp",
            "description": "DbSNP file Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_variant_md5",
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_variant_index",
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_bam_md5",
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-index",
              "position": 0
            },
            "label": "Create Output Bam Index",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_bam_index",
            "description": "If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#cpus_per_job",
            "description": "For tools which support multiprocessing, this value can be used to set the number of threads to be used. Set to 0 for auto-detect (use with caution,as auto-detect will find the optimal value in most cases).",
            "label": "Cpus Per Job"
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--contamination-fraction-to-filter",
              "position": 0
            },
            "label": "Contamination Fraction To Filter",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#contamination_fraction_to_filter",
            "type": [
              "null",
              "float"
            ],
            "description": "Fraction of contamination in sequencing data (for all samples) to aggressively remove Default value: 0.0."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--contamination-fraction-per-sample-file",
              "position": 0
            },
            "label": "Contamination Fraction Per Sample File",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#contamination_fraction_per_sample_file",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Tab-separated File containing fraction of contamination in sequencing data (per sample) to aggressively remove. Format should be \"<SampleID><TAB><Contamination>\" (Contamination is double) per line; No header. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--consensus",
              "position": 0
            },
            "label": "Consensus",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#consensus",
            "description": "Consensus mode Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--comp",
              "position": 0
            },
            "label": "Comp",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#comp",
            "type": [
              "null",
              "string"
            ],
            "description": "Comparison VCF file(s) This argument may be specified 0 or more times. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#cloud_index_prefetch_buffer",
            "type": [
              "null",
              "int"
            ],
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#black_listed_lanes",
            "type": [
              "null",
              "string"
            ],
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--base-quality-score-threshold",
              "position": 0
            },
            "label": "Base Quality Score Threshold",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#base_quality_score_threshold",
            "type": [
              "null",
              "int"
            ],
            "description": "Base qualities below this threshold will be reduced to the minimum (6) Default value: 18."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--bam-writer-type",
              "position": 0
            },
            "label": "Bam Writer Type",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#bam_writer_type",
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ALL_POSSIBLE_HAPLOTYPES",
                  "CALLED_HAPLOTYPES"
                ],
                "type": "enum"
              }
            ],
            "description": "Which haplotypes should be written to the BAM Default value: CALLED_HAPLOTYPES. Possible values: {ALL_POSSIBLE_HAPLOTYPES, CALLED_HAPLOTYPES}."
          },
          {
            "label": "Bam Output",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--bam-output"
            },
            "id": "#bam_output",
            "type": [
              "null",
              "boolean"
            ],
            "description": "File to which assembled haplotypes should be written Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--assembly-region-padding",
              "position": 0
            },
            "label": "Assembly Region Padding",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "id": "#assembly_region_padding",
            "type": [
              "null",
              "int"
            ],
            "description": "Number of additional bases of context to include around each assembly region Default value: 100."
          },
          {
            "label": "Annotations To Exclude",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--annotations-to-exclude",
              "position": 0
            },
            "id": "#annotations_to_exclude",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more specific annotations to exclude from variant calls  This argument may be specified 0 or more times. Default value: null."
          },
          {
            "label": "Annotation Group",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--annotation-group"
            },
            "id": "#annotation_group",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more groups of annotations to apply to variant calls  This argument may be specified 0 or more times. Default value: [StandardAnnotation, StandardHCAnnotation]."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--annotation",
              "position": 0
            },
            "label": "Annotation",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#annotation",
            "type": [
              "null",
              "string"
            ],
            "description": "One or more specific annotations to apply to variant calls This argument may be specified 0 or more times. Default value: null."
          },
          {
            "label": "Annotate Nda",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--annotate-with-num-discovered-alleles",
              "position": 0
            },
            "id": "#annotate_nda",
            "type": [
              "null",
              "boolean"
            ],
            "description": "If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site Default value: false. Possible values: {true, false}."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "id": "#ambig_filter_frac",
            "type": [
              "null",
              "float"
            ],
            "description": "Threshold fraction of non-regular bases (e.g. N) above which to filter Default value: 0.05."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "int"
            ],
            "id": "#ambig_filter_bases",
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--allow-non-unique-kmers-in-ref",
              "position": 0
            },
            "label": "Allow Non Unique Kmers In Ref",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#allow_non_unique_kmers_in_ref",
            "description": "Allow graphs that have non-unique kmers in the reference Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Alleles",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "secondaryFiles": [
                ".idx"
              ],
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--alleles",
              "position": 0
            },
            "id": "#alleles",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "The set of alleles at which to genotype when --genotyping_mode is GENOTYPE_GIVEN_ALLELES Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--all-site-p-ls",
              "position": 0
            },
            "label": "All Site P Ls",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#all_site_p_ls",
            "description": "Annotate all sites with PLs Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "sbg:altPrefix": "",
            "type": [
              "null",
              "boolean"
            ],
            "id": "#add_output_sam_program_record",
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "label": "Activity Profile Out",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--activity-profile-out"
            },
            "id": "#activity_profile_out",
            "type": [
              "null",
              "string"
            ],
            "description": "Output the raw activity profile results in IGV format. Default value: null."
          },
          {
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--active-probability-threshold",
              "position": 0
            },
            "label": "Active Probability Threshold",
            "sbg:category": "Advanced Arguments",
            "sbg:altPrefix": "",
            "id": "#active_probability_threshold",
            "type": [
              "null",
              "float"
            ],
            "description": "Minimum probability for a locus to be considered active. Default value: 0.002."
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  memory = 0\n  \n  if($job.inputs.memory_per_job){\n  \t memory = $job.inputs.memory_per_job\n  }\n  else{\n    if($job.inputs.wgs_hg38_mode_memory){\n      \treference_name = $job.inputs.reference.path.replace(/^.*[\\\\\\/]/, '')\n      \n       \tif(reference_name.indexOf('38') >-1){\n      \t\tmemory = $job.inputs.wgs_hg38_mode_memory\n    \t}\n        else{\n       \t\tmemory = 2048 \n        }\n    }\n  \telse{\n       memory = 2048\n  \t}\n  }\n  \n  return '\\\"-Xmx'.concat(memory, 'M') + '\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "HaplotypeCaller"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "VCF",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#reads",
              "glob": "*.vcf",
              "secondaryFiles": [
                ".idx"
              ]
            },
            "id": "#output_vcf",
            "description": "A raw, unfiltered, highly specific callset in VCF format."
          },
          {
            "sbg:fileTypes": "BAM",
            "label": "Output BAM",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#reads",
              "glob": "*.bam",
              "secondaryFiles": [
                ".bai"
              ]
            },
            "id": "#output_bam",
            "description": "Reassembled BAM outputted if the appropriate flag is set."
          }
        ],
        "label": "GATK HaplotypeCaller",
        "sbg:createdOn": 1500296570,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 315.842745364086,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:image_url": null,
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-haplotypecaller/32",
        "description": "Call germline SNPs and indels via local re-assembly of haplotypes.\n\n###**Overview**  \n\nThe HaplotypeCaller is capable of calling SNPs and indels simultaneously via local de-novo assembly of haplotypes in an active region. In other words, whenever the program encounters a region showing signs of variation, it discards the existing mapping information and completely reassembles the reads in that region. This allows the HaplotypeCaller to be more accurate when calling regions that are traditionally difficult to call, for example when they contain different types of variants close to each other. It also makes the HaplotypeCaller much better at calling indels than position-based callers like UnifiedGenotyper.\n\nIn the GVCF workflow used for scalable variant calling in DNA sequence data, HaplotypeCaller runs per-sample to generate an intermediate GVCF (not to be used in final analysis), which can then be used in GenotypeGVCFs for joint genotyping of multiple samples in a very efficient way. The GVCF workflow enables rapid incremental processing of samples as they roll off the sequencer, as well as scaling to very large cohort sizes (e.g. the 92K exomes of ExAC).\n\nIn addition, HaplotypeCaller is able to handle non-diploid organisms as well as pooled experiment data. Note however that the algorithms used to calculate variant likelihoods is not well suited to extreme allele frequencies (relative to ploidy) so its use is not recommended for somatic (cancer) variant discovery. For that purpose, use Mutect2 instead.\n\nFinally, HaplotypeCaller is also able to correctly handle the splice junctions that make RNAseq a challenge for most variant callers, on the condition that the input read data has previously been processed according to our recommendations as documented here. \n\n###**Input**  \nInput bam file(s) from which to make variant calls\n\n###**Output**  \nEither a VCF or GVCF file with raw, unfiltered SNP and indel calls. Regular VCFs must be filtered either by variant recalibration (Best Practice) or hard-filtering before use in downstream analyses. If using the GVCF workflow, the output is a GVCF file that must first be run through GenotypeGVCFs and then filtering before further analysis.\n\n###**Usage examples**  \nThese are example commands that show how to run HaplotypeCaller for typical use cases. Have a look at the method documentation for the basic GVCF workflow.\n\n####**Single-sample GVCF calling (outputs intermediate GVCF)**\n\n     gatk-launch --javaOptions \"-Xmx4g\" HaplotypeCaller  \\\n       -R reference.fasta \\\n       -I input.bam \\\n       -O output.g.vcf \\\n       -ERC GVCF\n\n####**Single-sample GVCF calling with allele-specific annotations**\n\n     gatk-launch --javaOptions \"-Xmx4g\" HaplotypeCaller  \\\n       -R reference.fasta \\\n       -I input.bam \\\n       -O output.g.vcf \\\n       -ERC GVCF \\\n       -G Standard \\\n       -G AS_Standard\n\n####**Variant calling with bamout to show realigned reads**\n\n     gatk-launch --javaOptions \"-Xmx4g\" HaplotypeCaller  \\\n       -R reference.fasta \\\n       -I input.bam \\\n       -O output.vcf \\\n       -bamout bamout.bam\n\n###**Caveats**\n\n- We have not yet fully tested the interaction between the GVCF-based calling or the multisample calling and the RNAseq-specific functionalities. Use those in combination at your own risk.\n\n###**Special note on ploidy**\n\nThis tool is able to handle many non-diploid use cases; the desired ploidy can be specified using the -ploidy argument. Note however that very high ploidies (such as are encountered in large pooled experiments) may cause performance challenges including excessive slowness. We are working on resolving these limitations.\n\n###**Additional Notes**\n- When working with PCR-free data, be sure to set `-pcr_indel_model NONE` (see argument below).\n- When running in `-ERC GVCF` or `-ERC BP_RESOLUTION` modes, the confidence threshold is automatically set to 0. This cannot be overridden by the command line. The threshold can be set manually to the desired level in the next step of the workflow (GenotypeGVCFs)\n- We recommend using a list of intervals to speed up analysis. See this document for details.\n- When using genotype given alleles mode, GATK HaplotypeCaller will try to confirm mutations in a given BAM file. If there are no reads for a position given in the alleles file, the output VCF will not contain that position.\n- By default, the tool works only with VCF resource files. To use VCF.GZ resource files, the tool wrapper needs to be modified.\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:content_hash": "afac20e2c9606ccb630707d26f06ba58fba2bb07526ee0d2cc05d7fe80770433e",
        "sbg:revisionNotes": "Latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "sbg:revision": 32,
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549028728,
        "sbg:id": "h-1a5ef24d/h-31e1d117/h-ad0ac52e/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_HaplotypeCaller",
      "sbg:y": 315.842745364086
    },
    {
      "sbg:x": 1701.9638875893365,
      "inputs": [
        {
          "id": "#GATK_MergeVcfs_1.verbosity"
        },
        {
          "id": "#GATK_MergeVcfs_1.validation_stringency"
        },
        {
          "id": "#GATK_MergeVcfs_1.use_jdk_inflater"
        },
        {
          "id": "#GATK_MergeVcfs_1.use_jdk_deflater"
        },
        {
          "id": "#GATK_MergeVcfs_1.reference"
        },
        {
          "id": "#GATK_MergeVcfs_1.quiet"
        },
        {
          "id": "#GATK_MergeVcfs_1.memory_per_job"
        },
        {
          "id": "#GATK_MergeVcfs_1.memory_overhead_per_job"
        },
        {
          "id": "#GATK_MergeVcfs_1.max_records_in_ram"
        },
        {
          "source": [
            "#GATK_HaplotypeCaller.output_vcf"
          ],
          "id": "#GATK_MergeVcfs_1.input"
        },
        {
          "id": "#GATK_MergeVcfs_1.create_md5_file"
        },
        {
          "id": "#GATK_MergeVcfs_1.create_index"
        },
        {
          "id": "#GATK_MergeVcfs_1.compression_level"
        },
        {
          "id": "#GATK_MergeVcfs_1.clip_intervals",
          "default": true
        }
      ],
      "outputs": [
        {
          "id": "#GATK_MergeVcfs_1.output"
        }
      ],
      "run": {
        "x": 1701.9638875893365,
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": ""
          }
        ],
        "sbg:latestRevision": 16,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx1M\" MergeVcfs --OUTPUT input-1.vcf  --INPUT /path/to/input-1.vcf --INPUT /path/to/input-2.vcf --INPUT /path/to/input-3.vcf",
        "sbg:job": {
          "allocatedResources": {
            "mem": 6,
            "cpu": 1
          },
          "inputs": {
            "verbosity": null,
            "create_index": false,
            "create_md5_file": false,
            "memory_overhead_per_job": 5,
            "input": [
              {
                "path": "/path/to/input-1.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input-2.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input-3.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "validation_stringency": null,
            "QUIET": false,
            "CREATE_MD5_FILE": false,
            "clip_intervals": false,
            "quiet": false,
            "memory_per_job": 1,
            "max_records_in_ram": null,
            "compression_level": null,
            "CREATE_INDEX": false,
            "use_jdk_deflater": false,
            "use_jdk_inflater": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1506343410,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/5",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488837,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/6",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522896,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/7",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511529512,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/8",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511787087,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/9",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511797504,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/10",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786620,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/11",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587940,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/21",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590601,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/23",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599046,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/24",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516963239,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/25",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516968554,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/26",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519225872,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/28",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648172,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/29",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946084,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/30",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530615364,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/31",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549038024,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 16
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "script": "{\n  function find_prefix(variants)\n  {\n    var prefix = ''\n    var first = variants[0].path.replace(/^.*[\\\\\\/]/, '')\n    \n    // Finds longest common prefix between variant names\n    for (var i = 1; i < variants.length; ++i)\n    {\n      var j = 0;\n      var current = variants[i].path.replace(/^.*[\\\\\\/]/, '')\n      \n      while(first[j] == current[j] && \n            j < (first.length - 1) && \n            j < (current.length - 1)) ++j\n      \n      // Inits prefixs or shortens it\n      if (i == 1 || prefix.length > j)\n      \tprefix = first.slice(0, j)\n    }\n    \n    // Clips trailing characters\n    while (prefix.endsWith('.') || prefix.endsWith('_') || prefix.endsWith('-'))\n      prefix = prefix.slice(0, prefix.length - 1)\n      \n    return prefix\n  }\n  \n  \n  var variants = [].concat($job.inputs.input)\n  \n  if ($job.inputs.clip_intervals && variants.length > 1)\n  {\n    var first = variants[0].path.replace(/^.*[\\\\\\/]/, '')\n    \n    var extensions = ''\n    \n    if (first.endsWith('.g.vcf'))\n      extensions = '.g.vcf'\n    else if (first.endsWith('.vcf'))\n      extensions = '.vcf'\n    else if (first.endsWith('.g.vcf.gz'))\n      extensions = '.g.vcf.gz'\n    else if (first.endsWith('.vcf.gz'))\n      extensions = '.vcf.gz'\n    \n    var prefix = find_prefix(variants)\n    \n    if (prefix.length > 0)\n      return prefix + extensions\n    else \n      return variants[0].path.replace(/^.*[\\\\\\/]/, '')\n  }\n  else\n    return variants[0].path.replace(/^.*[\\\\\\/]/, '')\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--OUTPUT"
          },
          {
            "valueFrom": {
              "script": "{\n  inputs = $job.inputs.input\n\n  cmd = []\n\n  for (i = 0; i < inputs.length; i++) {\n    cmd.push('--INPUT', inputs[i].path)\n  }\n\n  return cmd.join(' ')\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "type": [
              "null",
              {
                "name": "verbosity",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VERBOSITY",
              "position": 0
            },
            "sbg:toolDefaultValue": "INFO",
            "id": "#verbosity",
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "type": [
              "null",
              {
                "name": "validation_stringency",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "label": "Validation Stringency",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VALIDATION_STRINGENCY",
              "position": 0
            },
            "sbg:toolDefaultValue": "STRICT",
            "id": "#validation_stringency",
            "description": "Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_INFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_DEFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}."
          },
          {
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 0,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "prefix": "--REFERENCE_SEQUENCE"
            },
            "id": "#reference",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence file. Default value: null."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--QUIET",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Memory per job in MB",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "2048",
            "id": "#memory_per_job",
            "description": "Memory per job in MB.",
            "sbg:stageInput": null
          },
          {
            "label": "Memory overhead per jobin MB",
            "sbg:category": "Execution",
            "id": "#memory_overhead_per_job",
            "type": [
              "null",
              "int"
            ],
            "description": "Memory overhead per job.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Max Records In Ram",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MAX_RECORDS_IN_RAM",
              "position": 0
            },
            "sbg:toolDefaultValue": "500000",
            "id": "#max_records_in_ram",
            "description": "When writing SAM files that need to be sorted, this will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort a SAM file, and increases the amount of RAM needed. Default value: 500000."
          },
          {
            "label": "Input",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "-I",
            "id": "#input",
            "required": true,
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "VCF input files File format is determined by file extension. This argument must be specified at least once. Required.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Create Md5 File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_MD5_FILE",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#create_md5_file",
            "description": "Whether to create an MD5 digest for any BAM or FASTQ files created. Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Create Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_INDEX",
              "position": 0
            },
            "sbg:toolDefaultValue": "true",
            "id": "#create_index",
            "description": "Whether to create a BAM index when writing a coordinate-sorted BAM file. Default value: true. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Compression Level",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--COMPRESSION_LEVEL",
              "position": 0
            },
            "sbg:toolDefaultValue": "5",
            "id": "#compression_level",
            "description": "Compression level for all compressed files created (e.g. BAM and GELI). Default value: 5."
          },
          {
            "label": "Clip Intervals",
            "sbg:category": "Optional Arguments",
            "id": "#clip_intervals",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Clip intervals name from output file name",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "stdin": "",
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          "MergeVcfs"
        ],
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "The merged VCF file.",
            "id": "#output",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input",
              "glob": {
                "script": "{\n  inputs = [].concat($job.inputs.input)\n  \n  if (inputs[0].path.endsWith('.gz'))\n    return '*.vcf.gz'\n  else\n    return '*.vcf'\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              }
            },
            "type": [
              "null",
              "File"
            ],
            "description": "The merged VCF file. File format is determined by file extension."
          }
        ],
        "sbg:revision": 16,
        "sbg:createdOn": 1506343410,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 442.14276546878887,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-mergevcfs/16",
        "description": "Merges multiple VCF files into one VCF file. Input files must be sorted by their contigs and, within contigs, by start position. The input files must have the same sample and contig lists. An index file is created and a sequence dictionary is required by default.",
        "sbg:content_hash": "a58f7e73227e60848abbcc3784b1a9bd9ddd17d8e4476ae09f40ed923a5453f36",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "label": "GATK MergeVcfs",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549038024,
        "sbg:id": "h-a77dea53/h-d198de5a/h-f0c98c69/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_MergeVcfs_1",
      "sbg:y": 442.14276546878887
    },
    {
      "sbg:x": 2703.333440621696,
      "inputs": [
        {
          "id": "#GATK_MergeVcfs_2.verbosity"
        },
        {
          "id": "#GATK_MergeVcfs_2.validation_stringency"
        },
        {
          "id": "#GATK_MergeVcfs_2.use_jdk_inflater"
        },
        {
          "id": "#GATK_MergeVcfs_2.use_jdk_deflater"
        },
        {
          "id": "#GATK_MergeVcfs_2.reference"
        },
        {
          "id": "#GATK_MergeVcfs_2.quiet"
        },
        {
          "id": "#GATK_MergeVcfs_2.memory_per_job"
        },
        {
          "id": "#GATK_MergeVcfs_2.memory_overhead_per_job"
        },
        {
          "id": "#GATK_MergeVcfs_2.max_records_in_ram"
        },
        {
          "source": [
            "#INDEL_GATK_VariantFiltration.filtered_vcf",
            "#SNP_GATK_VariantFiltration.filtered_vcf"
          ],
          "id": "#GATK_MergeVcfs_2.input"
        },
        {
          "id": "#GATK_MergeVcfs_2.create_md5_file"
        },
        {
          "id": "#GATK_MergeVcfs_2.create_index"
        },
        {
          "id": "#GATK_MergeVcfs_2.compression_level"
        },
        {
          "id": "#GATK_MergeVcfs_2.clip_intervals"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_MergeVcfs_2.output"
        }
      ],
      "run": {
        "x": 2703.333440621696,
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": ""
          }
        ],
        "sbg:latestRevision": 16,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx1M\" MergeVcfs --OUTPUT input-1.vcf  --INPUT /path/to/input-1.vcf --INPUT /path/to/input-2.vcf --INPUT /path/to/input-3.vcf",
        "sbg:job": {
          "allocatedResources": {
            "mem": 6,
            "cpu": 1
          },
          "inputs": {
            "verbosity": null,
            "create_index": false,
            "create_md5_file": false,
            "memory_overhead_per_job": 5,
            "input": [
              {
                "path": "/path/to/input-1.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input-2.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input-3.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "validation_stringency": null,
            "QUIET": false,
            "CREATE_MD5_FILE": false,
            "clip_intervals": false,
            "quiet": false,
            "memory_per_job": 1,
            "max_records_in_ram": null,
            "compression_level": null,
            "CREATE_INDEX": false,
            "use_jdk_deflater": false,
            "use_jdk_inflater": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1506343410,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/5",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488837,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/6",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522896,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/7",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511529512,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/8",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511787087,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/9",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511797504,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/10",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786620,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/11",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587940,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/21",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590601,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/23",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599046,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/24",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516963239,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/25",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516968554,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/26",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519225872,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/28",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648172,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/29",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946084,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/30",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530615364,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/31",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549038024,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 16
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "script": "{\n  function find_prefix(variants)\n  {\n    var prefix = ''\n    var first = variants[0].path.replace(/^.*[\\\\\\/]/, '')\n    \n    // Finds longest common prefix between variant names\n    for (var i = 1; i < variants.length; ++i)\n    {\n      var j = 0;\n      var current = variants[i].path.replace(/^.*[\\\\\\/]/, '')\n      \n      while(first[j] == current[j] && \n            j < (first.length - 1) && \n            j < (current.length - 1)) ++j\n      \n      // Inits prefixs or shortens it\n      if (i == 1 || prefix.length > j)\n      \tprefix = first.slice(0, j)\n    }\n    \n    // Clips trailing characters\n    while (prefix.endsWith('.') || prefix.endsWith('_') || prefix.endsWith('-'))\n      prefix = prefix.slice(0, prefix.length - 1)\n      \n    return prefix\n  }\n  \n  \n  var variants = [].concat($job.inputs.input)\n  \n  if ($job.inputs.clip_intervals && variants.length > 1)\n  {\n    var first = variants[0].path.replace(/^.*[\\\\\\/]/, '')\n    \n    var extensions = ''\n    \n    if (first.endsWith('.g.vcf'))\n      extensions = '.g.vcf'\n    else if (first.endsWith('.vcf'))\n      extensions = '.vcf'\n    else if (first.endsWith('.g.vcf.gz'))\n      extensions = '.g.vcf.gz'\n    else if (first.endsWith('.vcf.gz'))\n      extensions = '.vcf.gz'\n    \n    var prefix = find_prefix(variants)\n    \n    if (prefix.length > 0)\n      return prefix + extensions\n    else \n      return variants[0].path.replace(/^.*[\\\\\\/]/, '')\n  }\n  else\n    return variants[0].path.replace(/^.*[\\\\\\/]/, '')\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--OUTPUT"
          },
          {
            "valueFrom": {
              "script": "{\n  inputs = $job.inputs.input\n\n  cmd = []\n\n  for (i = 0; i < inputs.length; i++) {\n    cmd.push('--INPUT', inputs[i].path)\n  }\n\n  return cmd.join(' ')\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "type": [
              "null",
              {
                "name": "verbosity",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VERBOSITY",
              "position": 0
            },
            "sbg:toolDefaultValue": "INFO",
            "id": "#verbosity",
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "type": [
              "null",
              {
                "name": "validation_stringency",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "label": "Validation Stringency",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VALIDATION_STRINGENCY",
              "position": 0
            },
            "sbg:toolDefaultValue": "STRICT",
            "id": "#validation_stringency",
            "description": "Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_INFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_DEFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}."
          },
          {
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 0,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "prefix": "--REFERENCE_SEQUENCE"
            },
            "id": "#reference",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence file. Default value: null."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--QUIET",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Memory per job in MB",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "2048",
            "id": "#memory_per_job",
            "description": "Memory per job in MB.",
            "sbg:stageInput": null
          },
          {
            "label": "Memory overhead per jobin MB",
            "sbg:category": "Execution",
            "id": "#memory_overhead_per_job",
            "type": [
              "null",
              "int"
            ],
            "description": "Memory overhead per job.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Max Records In Ram",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MAX_RECORDS_IN_RAM",
              "position": 0
            },
            "sbg:toolDefaultValue": "500000",
            "id": "#max_records_in_ram",
            "description": "When writing SAM files that need to be sorted, this will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort a SAM file, and increases the amount of RAM needed. Default value: 500000."
          },
          {
            "label": "Input",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "-I",
            "id": "#input",
            "required": true,
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "VCF input files File format is determined by file extension. This argument must be specified at least once. Required.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Create Md5 File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_MD5_FILE",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#create_md5_file",
            "description": "Whether to create an MD5 digest for any BAM or FASTQ files created. Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Create Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_INDEX",
              "position": 0
            },
            "sbg:toolDefaultValue": "true",
            "id": "#create_index",
            "description": "Whether to create a BAM index when writing a coordinate-sorted BAM file. Default value: true. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Compression Level",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--COMPRESSION_LEVEL",
              "position": 0
            },
            "sbg:toolDefaultValue": "5",
            "id": "#compression_level",
            "description": "Compression level for all compressed files created (e.g. BAM and GELI). Default value: 5."
          },
          {
            "label": "Clip Intervals",
            "sbg:category": "Optional Arguments",
            "id": "#clip_intervals",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Clip intervals name from output file name",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "stdin": "",
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          "MergeVcfs"
        ],
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "The merged VCF file.",
            "id": "#output",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input",
              "glob": {
                "script": "{\n  inputs = [].concat($job.inputs.input)\n  \n  if (inputs[0].path.endsWith('.gz'))\n    return '*.vcf.gz'\n  else\n    return '*.vcf'\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              }
            },
            "type": [
              "null",
              "File"
            ],
            "description": "The merged VCF file. File format is determined by file extension."
          }
        ],
        "sbg:revision": 16,
        "sbg:createdOn": 1506343410,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 266.6927176062019,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-mergevcfs/16",
        "description": "Merges multiple VCF files into one VCF file. Input files must be sorted by their contigs and, within contigs, by start position. The input files must have the same sample and contig lists. An index file is created and a sequence dictionary is required by default.",
        "sbg:content_hash": "a58f7e73227e60848abbcc3784b1a9bd9ddd17d8e4476ae09f40ed923a5453f36",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "label": "GATK MergeVcfs",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549038024,
        "sbg:id": "h-fd7a19ec/h-4b978128/h-e8b3f6e2/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_MergeVcfs_2",
      "sbg:y": 266.6927176062019
    },
    {
      "sbg:x": 1900.130568668466,
      "inputs": [
        {
          "id": "#GATK_MergeVcfs.verbosity"
        },
        {
          "id": "#GATK_MergeVcfs.validation_stringency"
        },
        {
          "id": "#GATK_MergeVcfs.use_jdk_inflater"
        },
        {
          "id": "#GATK_MergeVcfs.use_jdk_deflater"
        },
        {
          "id": "#GATK_MergeVcfs.reference"
        },
        {
          "id": "#GATK_MergeVcfs.quiet"
        },
        {
          "id": "#GATK_MergeVcfs.memory_per_job"
        },
        {
          "id": "#GATK_MergeVcfs.memory_overhead_per_job"
        },
        {
          "id": "#GATK_MergeVcfs.max_records_in_ram"
        },
        {
          "source": [
            "#GATK_GenotypeGVCFs.vcf"
          ],
          "id": "#GATK_MergeVcfs.input"
        },
        {
          "id": "#GATK_MergeVcfs.create_md5_file"
        },
        {
          "id": "#GATK_MergeVcfs.create_index"
        },
        {
          "id": "#GATK_MergeVcfs.compression_level"
        },
        {
          "id": "#GATK_MergeVcfs.clip_intervals",
          "default": true
        }
      ],
      "outputs": [
        {
          "id": "#GATK_MergeVcfs.output"
        }
      ],
      "run": {
        "x": 1900.130568668466,
        "hints": [
          {
            "class": "sbg:CPURequirement",
            "value": 1
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": ""
          }
        ],
        "sbg:latestRevision": 16,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx1M\" MergeVcfs --OUTPUT input-1.vcf  --INPUT /path/to/input-1.vcf --INPUT /path/to/input-2.vcf --INPUT /path/to/input-3.vcf",
        "sbg:job": {
          "allocatedResources": {
            "mem": 6,
            "cpu": 1
          },
          "inputs": {
            "verbosity": null,
            "create_index": false,
            "create_md5_file": false,
            "memory_overhead_per_job": 5,
            "input": [
              {
                "path": "/path/to/input-1.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input-2.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              },
              {
                "path": "/path/to/input-3.vcf",
                "class": "File",
                "size": 0,
                "secondaryFiles": []
              }
            ],
            "validation_stringency": null,
            "QUIET": false,
            "CREATE_MD5_FILE": false,
            "clip_intervals": false,
            "quiet": false,
            "memory_per_job": 1,
            "max_records_in_ram": null,
            "compression_level": null,
            "CREATE_INDEX": false,
            "use_jdk_deflater": false,
            "use_jdk_inflater": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1506343410,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/5",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488837,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/6",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522896,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/7",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511529512,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/8",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511787087,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/9",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511797504,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/10",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786620,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/11",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587940,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/21",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590601,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/23",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599046,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/24",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516963239,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/25",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516968554,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/26",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519225872,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/28",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648172,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/29",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946084,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/30",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1530615364,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-mergevcfs/31",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549038024,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 16
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "script": "{\n  function find_prefix(variants)\n  {\n    var prefix = ''\n    var first = variants[0].path.replace(/^.*[\\\\\\/]/, '')\n    \n    // Finds longest common prefix between variant names\n    for (var i = 1; i < variants.length; ++i)\n    {\n      var j = 0;\n      var current = variants[i].path.replace(/^.*[\\\\\\/]/, '')\n      \n      while(first[j] == current[j] && \n            j < (first.length - 1) && \n            j < (current.length - 1)) ++j\n      \n      // Inits prefixs or shortens it\n      if (i == 1 || prefix.length > j)\n      \tprefix = first.slice(0, j)\n    }\n    \n    // Clips trailing characters\n    while (prefix.endsWith('.') || prefix.endsWith('_') || prefix.endsWith('-'))\n      prefix = prefix.slice(0, prefix.length - 1)\n      \n    return prefix\n  }\n  \n  \n  var variants = [].concat($job.inputs.input)\n  \n  if ($job.inputs.clip_intervals && variants.length > 1)\n  {\n    var first = variants[0].path.replace(/^.*[\\\\\\/]/, '')\n    \n    var extensions = ''\n    \n    if (first.endsWith('.g.vcf'))\n      extensions = '.g.vcf'\n    else if (first.endsWith('.vcf'))\n      extensions = '.vcf'\n    else if (first.endsWith('.g.vcf.gz'))\n      extensions = '.g.vcf.gz'\n    else if (first.endsWith('.vcf.gz'))\n      extensions = '.vcf.gz'\n    \n    var prefix = find_prefix(variants)\n    \n    if (prefix.length > 0)\n      return prefix + extensions\n    else \n      return variants[0].path.replace(/^.*[\\\\\\/]/, '')\n  }\n  else\n    return variants[0].path.replace(/^.*[\\\\\\/]/, '')\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--OUTPUT"
          },
          {
            "valueFrom": {
              "script": "{\n  inputs = $job.inputs.input\n\n  cmd = []\n\n  for (i = 0; i < inputs.length; i++) {\n    cmd.push('--INPUT', inputs[i].path)\n  }\n\n  return cmd.join(' ')\n}",
              "class": "Expression",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "type": [
              "null",
              {
                "name": "verbosity",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VERBOSITY",
              "position": 0
            },
            "sbg:toolDefaultValue": "INFO",
            "id": "#verbosity",
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "type": [
              "null",
              {
                "name": "validation_stringency",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "label": "Validation Stringency",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--VALIDATION_STRINGENCY",
              "position": 0
            },
            "sbg:toolDefaultValue": "STRICT",
            "id": "#validation_stringency",
            "description": "Validation stringency for all SAM files read by this program. Setting stringency to SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: STRICT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_INFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--USE_JDK_DEFLATER",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}."
          },
          {
            "label": "Reference",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 0,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "prefix": "--REFERENCE_SEQUENCE"
            },
            "id": "#reference",
            "required": false,
            "type": [
              "null",
              "File"
            ],
            "description": "Reference sequence file. Default value: null."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--QUIET",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Memory per job in MB",
            "sbg:category": "Execution",
            "sbg:toolDefaultValue": "2048",
            "id": "#memory_per_job",
            "description": "Memory per job in MB.",
            "sbg:stageInput": null
          },
          {
            "label": "Memory overhead per jobin MB",
            "sbg:category": "Execution",
            "id": "#memory_overhead_per_job",
            "type": [
              "null",
              "int"
            ],
            "description": "Memory overhead per job.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Max Records In Ram",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--MAX_RECORDS_IN_RAM",
              "position": 0
            },
            "sbg:toolDefaultValue": "500000",
            "id": "#max_records_in_ram",
            "description": "When writing SAM files that need to be sorted, this will specify the number of records stored in RAM before spilling to disk. Increasing this number reduces the number of file handles needed to sort a SAM file, and increases the amount of RAM needed. Default value: 500000."
          },
          {
            "label": "Input",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "-I",
            "id": "#input",
            "required": true,
            "type": [
              {
                "items": "File",
                "type": "array"
              }
            ],
            "description": "VCF input files File format is determined by file extension. This argument must be specified at least once. Required.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Create Md5 File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_MD5_FILE",
              "position": 0
            },
            "sbg:toolDefaultValue": "false",
            "id": "#create_md5_file",
            "description": "Whether to create an MD5 digest for any BAM or FASTQ files created. Default value: false. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "boolean"
            ],
            "label": "Create Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--CREATE_INDEX",
              "position": 0
            },
            "sbg:toolDefaultValue": "true",
            "id": "#create_index",
            "description": "Whether to create a BAM index when writing a coordinate-sorted BAM file. Default value: true. Possible values: {true, false}."
          },
          {
            "type": [
              "null",
              "int"
            ],
            "label": "Compression Level",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--COMPRESSION_LEVEL",
              "position": 0
            },
            "sbg:toolDefaultValue": "5",
            "id": "#compression_level",
            "description": "Compression level for all compressed files created (e.g. BAM and GELI). Default value: 5."
          },
          {
            "label": "Clip Intervals",
            "sbg:category": "Optional Arguments",
            "id": "#clip_intervals",
            "type": [
              "null",
              "boolean"
            ],
            "description": "Clip intervals name from output file name",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "stdin": "",
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "class": "Expression",
            "engine": "#cwl-js-engine"
          },
          "MergeVcfs"
        ],
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "The merged VCF file.",
            "id": "#output",
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#input",
              "glob": {
                "script": "{\n  inputs = [].concat($job.inputs.input)\n  \n  if (inputs[0].path.endsWith('.gz'))\n    return '*.vcf.gz'\n  else\n    return '*.vcf'\n}",
                "class": "Expression",
                "engine": "#cwl-js-engine"
              }
            },
            "type": [
              "null",
              "File"
            ],
            "description": "The merged VCF file. File format is determined by file extension."
          }
        ],
        "sbg:revision": 16,
        "sbg:createdOn": 1506343410,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 220.63094443603117,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-mergevcfs/16",
        "description": "Merges multiple VCF files into one VCF file. Input files must be sorted by their contigs and, within contigs, by start position. The input files must have the same sample and contig lists. An index file is created and a sequence dictionary is required by default.",
        "sbg:content_hash": "a58f7e73227e60848abbcc3784b1a9bd9ddd17d8e4476ae09f40ed923a5453f36",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "label": "GATK MergeVcfs",
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549038024,
        "sbg:id": "h-8ce23013/h-7918f8f9/h-9cc83c78/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_MergeVcfs",
      "sbg:y": 220.63094443603117
    },
    {
      "sbg:x": 1687.0880797341679,
      "inputs": [
        {
          "source": [
            "#GATK_HaplotypeCaller.output_vcf"
          ],
          "id": "#GATK_GenotypeGVCFs.variants"
        },
        {
          "id": "#GATK_GenotypeGVCFs.use_new_af_calculator"
        },
        {
          "id": "#GATK_GenotypeGVCFs.use_jdk_inflater"
        },
        {
          "id": "#GATK_GenotypeGVCFs.use_jdk_deflater"
        },
        {
          "id": "#GATK_GenotypeGVCFs.standard_min_confidence_threshold_for_calling"
        },
        {
          "id": "#GATK_GenotypeGVCFs.seconds_between_progress_updates"
        },
        {
          "id": "#GATK_GenotypeGVCFs.sample_ploidy"
        },
        {
          "id": "#GATK_GenotypeGVCFs.sample"
        },
        {
          "source": [
            "#SBG_FASTA_Indices.fasta_reference"
          ],
          "id": "#GATK_GenotypeGVCFs.reference"
        },
        {
          "id": "#GATK_GenotypeGVCFs.read_validation_stringency"
        },
        {
          "id": "#GATK_GenotypeGVCFs.read_name"
        },
        {
          "id": "#GATK_GenotypeGVCFs.read_index"
        },
        {
          "id": "#GATK_GenotypeGVCFs.read_filter"
        },
        {
          "id": "#GATK_GenotypeGVCFs.quiet"
        },
        {
          "id": "#GATK_GenotypeGVCFs.pl_filter_name"
        },
        {
          "id": "#GATK_GenotypeGVCFs.minimum_mapping_quality"
        },
        {
          "id": "#GATK_GenotypeGVCFs.min_read_length"
        },
        {
          "id": "#GATK_GenotypeGVCFs.memory_per_job"
        },
        {
          "id": "#GATK_GenotypeGVCFs.memory_overhead_per_job"
        },
        {
          "id": "#GATK_GenotypeGVCFs.maximum_mapping_quality"
        },
        {
          "id": "#GATK_GenotypeGVCFs.max_read_length"
        },
        {
          "id": "#GATK_GenotypeGVCFs.max_genotype_count"
        },
        {
          "id": "#GATK_GenotypeGVCFs.max_fragment_length"
        },
        {
          "id": "#GATK_GenotypeGVCFs.max_alternate_alleles"
        },
        {
          "id": "#GATK_GenotypeGVCFs.library"
        },
        {
          "id": "#GATK_GenotypeGVCFs.lenient"
        },
        {
          "id": "#GATK_GenotypeGVCFs.keep_reverse"
        },
        {
          "id": "#GATK_GenotypeGVCFs.keep_read_group"
        },
        {
          "id": "#GATK_GenotypeGVCFs.intervals_string"
        },
        {
          "id": "#GATK_GenotypeGVCFs.intervals_file"
        },
        {
          "id": "#GATK_GenotypeGVCFs.interval_padding"
        },
        {
          "id": "#GATK_GenotypeGVCFs.interval_merging_rule"
        },
        {
          "id": "#GATK_GenotypeGVCFs.interval_exclusion_padding"
        },
        {
          "id": "#GATK_GenotypeGVCFs.input_prior"
        },
        {
          "id": "#GATK_GenotypeGVCFs.indel_heterozygosity"
        },
        {
          "id": "#GATK_GenotypeGVCFs.heterozygosity_stdev"
        },
        {
          "id": "#GATK_GenotypeGVCFs.heterozygosity"
        },
        {
          "id": "#GATK_GenotypeGVCFs.group"
        },
        {
          "id": "#GATK_GenotypeGVCFs.filter_too_short"
        },
        {
          "id": "#GATK_GenotypeGVCFs.exclude_intervals_string"
        },
        {
          "id": "#GATK_GenotypeGVCFs.exclude_intervals_file"
        },
        {
          "id": "#GATK_GenotypeGVCFs.dont_require_soft_clips_both_ends"
        },
        {
          "id": "#GATK_GenotypeGVCFs.disable_tool_default_read_filters"
        },
        {
          "id": "#GATK_GenotypeGVCFs.disable_sequence_dictionary_validation"
        },
        {
          "id": "#GATK_GenotypeGVCFs.disable_read_filter"
        },
        {
          "id": "#GATK_GenotypeGVCFs.disable_bam_index_caching"
        },
        {
          "id": "#GATK_GenotypeGVCFs.dbsnp"
        },
        {
          "id": "#GATK_GenotypeGVCFs.create_output_variant_md5"
        },
        {
          "id": "#GATK_GenotypeGVCFs.create_output_variant_index"
        },
        {
          "id": "#GATK_GenotypeGVCFs.create_output_bam_md5"
        },
        {
          "id": "#GATK_GenotypeGVCFs.create_output_bam_index"
        },
        {
          "id": "#GATK_GenotypeGVCFs.cloud_prefetch_buffer"
        },
        {
          "id": "#GATK_GenotypeGVCFs.cloud_index_prefetch_buffer"
        },
        {
          "id": "#GATK_GenotypeGVCFs.black_listed_lanes"
        },
        {
          "id": "#GATK_GenotypeGVCFs.black_list"
        },
        {
          "id": "#GATK_GenotypeGVCFs.annotations_to_exclude"
        },
        {
          "id": "#GATK_GenotypeGVCFs.annotation"
        },
        {
          "id": "#GATK_GenotypeGVCFs.annotate_nda"
        },
        {
          "id": "#GATK_GenotypeGVCFs.ambig_filter_frac"
        },
        {
          "id": "#GATK_GenotypeGVCFs.ambig_filter_bases"
        },
        {
          "id": "#GATK_GenotypeGVCFs.add_output_sam_program_record"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_GenotypeGVCFs.vcf"
        }
      ],
      "scatter": "#GATK_GenotypeGVCFs.variants",
      "run": {
        "x": 1687.0880797341679,
        "hints": [
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": ""
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 21,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx2048M\" GenotypeGVCFs --reference /path/to/reference.ext  --output variants.ext  --variant /path/to/variants.ext",
        "sbg:job": {
          "allocatedResources": {
            "mem": 2048,
            "cpu": 1
          },
          "inputs": {
            "createOutputVariantIndex": true,
            "memory_overhead_per_job": 0,
            "exclude_intervals_string": "",
            "use_jdk_inflater": true,
            "QUIET": true,
            "lenient": true,
            "disableSequenceDictionaryValidation": true,
            "memory_per_job": 2048,
            "disableBamIndexCaching": true,
            "variants": {
              "path": "/path/to/variants.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "createOutputBamMD5": true,
            "createOutputBamIndex": true,
            "use_jdk_deflater": true,
            "createOutputVariantMD5": true,
            "disableToolDefaultReadFilters": true,
            "addOutputSAMProgramRecord": true,
            "annotateNDA": true,
            "intervals_string": "",
            "useNewAFCalculator": true,
            "keepReverse": true,
            "reference": {
              "path": "/path/to/reference.ext",
              "class": "File",
              "size": 0,
              "secondaryFiles": [
                {
                  "path": ".fai"
                },
                {
                  "path": "^.dict"
                }
              ]
            },
            "dontRequireSoftClipsBothEnds": true,
            "ambigFilterBases": 2,
            "interval_merging_rule": "interval_merging_rule-string-value"
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296429,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/12",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640346,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/13",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500888771,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/14",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1502718039,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/15",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405179,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/16",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105716,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/17",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504273013,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/18",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275157,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/19",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504539153,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/20",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504789598,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/22",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1508488829,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/23",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522870,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/24",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513597901,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/26",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1513786603,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/27",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587916,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/37",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590570,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/39",
            "sbg:revision": 15
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515599084,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/42",
            "sbg:revision": 16
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516899308,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/43",
            "sbg:revision": 17
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1516899356,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/44",
            "sbg:revision": 18
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1519648161,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/45",
            "sbg:revision": 19
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946137,
            "sbg:revisionNotes": "Copy of vladimirk/whole-genome-sequencing-gatk-4-0/gatk-4-0-genotypegvcfs/46",
            "sbg:revision": 20
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549037998,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 21
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  variant_name = [].concat($job.inputs.variants)[0].path.replace(/^.*[\\\\\\/]/, '').split('.')\n  variant_namebase = variant_name.slice(0, variant_name.length).join('.')\n  variant_namebase = variant_namebase.replace('.g.vcf', '.vcf')\n  return '--output ' + variant_namebase\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          },
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  variants = [].concat($job.inputs.variants)\n\n  cmd = []\n\n  for (i = 0; i < variants.length; i++) {\n    cmd.push('--variant', variants[i].path)\n  }\n\n  return cmd.join(' ')\n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "sbg:fileTypes": "G.VCF",
            "label": "Variants",
            "sbg:category": "Required Arguments",
            "sbg:altPrefix": "-V",
            "type": [
              "File"
            ],
            "required": true,
            "id": "#variants",
            "description": "A VCF file containing variants Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use New Af Calculator",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-new-af-calculator",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_new_af_calculator",
            "description": "If provided, we will use the new AF model instead of the so-called exact model Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Standard Min Confidence Threshold For Calling",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--standard-min-confidence-threshold-for-calling",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#standard_min_confidence_threshold_for_calling",
            "description": "The minimum phred-scaled confidence threshold at which variants should be called Default value: 10.0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Seconds Between Progress Updates",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--seconds-between-progress-updates",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#seconds_between_progress_updates",
            "description": "Output traversal statistics every time this many seconds elapse Default value: 10.0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Sample Ploidy",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample-ploidy",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#sample_ploidy",
            "description": "Ploidy (number of chromosomes) per sample. For pooled data, set to (Number of samples in each pool * Sample Ploidy). Default value: 2."
          },
          {
            "sbg:altPrefix": "",
            "label": "Sample",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--sample",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#sample",
            "description": "The name of the sample(s) to keep, filtering out all others This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Reference",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 0,
              "secondaryFiles": [
                ".fai",
                "^.dict"
              ],
              "prefix": "--reference"
            },
            "type": [
              "File"
            ],
            "required": true,
            "id": "#reference",
            "description": "Reference sequence file Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Read Validation Stringency",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-validation-stringency",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "STRICT",
                  "LENIENT",
                  "SILENT"
                ],
                "type": "enum"
              }
            ],
            "id": "#read_validation_stringency",
            "description": "Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded. Default value: SILENT. Possible values: {STRICT, LENIENT, SILENT}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Read Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-name",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#read_name",
            "description": "Keep only reads with this read name Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Read Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-index",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#read_index",
            "description": "Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Read Filter",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--read-filter",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "AlignmentAgreesWithHeaderReadFilter",
                  "AllowAllReadsReadFilter",
                  "AmbiguousBaseReadFilter",
                  "CigarContainsNoNOperator",
                  "FirstOfPairReadFilter",
                  "FragmentLengthReadFilter",
                  "GoodCigarReadFilter",
                  "HasReadGroupReadFilter",
                  "LibraryReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityNotZeroReadFilter",
                  "MappingQualityReadFilter",
                  "MatchingBasesAndQualsReadFilter",
                  "MateDifferentStrandReadFilter",
                  "MateOnSameContigOrNoMappedMateReadFilter",
                  "MetricsReadFilter",
                  "NonZeroFragmentLengthReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotOpticalDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "NotSupplementaryAlignmentReadFilter",
                  "OverclippedReadFilter",
                  "PairedReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "PlatformReadFilter",
                  "PlatformUnitReadFilter",
                  "PrimaryLineReadFilter",
                  "ProperlyPairedReadFilter",
                  "ReadGroupBlackListReadFilter",
                  "ReadGroupReadFilter",
                  "ReadLengthEqualsCigarLengthReadFilter",
                  "ReadLengthReadFilter",
                  "ReadNameReadFilter",
                  "ReadStrandFilter",
                  "SampleReadFilter",
                  "SecondOfPairReadFilter",
                  "SeqIsStoredReadFilter",
                  "ValidAlignmentEndReadFilter",
                  "ValidAlignmentStartReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "id": "#read_filter",
            "description": "Read filters to be applied before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Pl Filter Name",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--pl-filter-name",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#pl_filter_name",
            "description": "Keep reads with RG:PL attribute containing this string This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Minimum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--minimum-mapping-quality",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#minimum_mapping_quality",
            "description": "Minimum mapping quality to keep (inclusive) Default value: 10."
          },
          {
            "sbg:altPrefix": "",
            "label": "Min Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--min-read-length",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#min_read_length",
            "description": "Keep only reads with length at least equal to the specified value Default value: 1."
          },
          {
            "label": "Memory Per Job",
            "sbg:category": "Execution",
            "type": [
              "null",
              "int"
            ],
            "sbg:toolDefaultValue": "2048",
            "id": "#memory_per_job",
            "description": "Memory per job in MB.",
            "sbg:stageInput": null
          },
          {
            "label": "Memory Overhead Per Job",
            "sbg:category": "Execution",
            "type": [
              "null",
              "int"
            ],
            "sbg:toolDefaultValue": "64",
            "id": "#memory_overhead_per_job",
            "description": "Memory overhead per job.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Maximum Mapping Quality",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--maximum-mapping-quality",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#maximum_mapping_quality",
            "description": "Maximum mapping quality to keep (inclusive) Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Max Read Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-read-length",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#max_read_length",
            "description": "Keep only reads with length at most equal to the specified value Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Max Genotype Count",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-genotype-count",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#max_genotype_count",
            "description": "Maximum number of genotypes to consider at any site Default value: 1024."
          },
          {
            "sbg:altPrefix": "",
            "label": "Max Fragment Length",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-fragment-length",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#max_fragment_length",
            "description": "Keep only read pairs with fragment length at most equal to the given value Default value: 1000000."
          },
          {
            "sbg:altPrefix": "",
            "label": "Max Alternate Alleles",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--max-alternate-alleles",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#max_alternate_alleles",
            "description": "Maximum number of alternate alleles to genotype Default value: 6."
          },
          {
            "sbg:altPrefix": "",
            "label": "Library",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--library",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#library",
            "description": "The name of the library to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Lenient",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--lenient",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#lenient",
            "description": "Lenient processing of VCF files Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Reverse",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-reverse",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#keep_reverse",
            "description": "Keep only reads on the reverse strand Required. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Keep Read Group",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--keep-read-group",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#keep_read_group",
            "description": "The name of the read group to keep Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals",
              "itemSeparator": null
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#intervals_string",
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "TXT, BED",
            "label": "Intervals File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--intervals"
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#intervals_file",
            "description": "One or more genomic intervals over which to operate This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Interval Padding",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-padding",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#interval_padding",
            "description": "Amount of padding (in bp) to add to each interval you are including. Default value: 0."
          },
          {
            "label": "Interval Set Rule",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-merging-rule",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#interval_merging_rule",
            "description": "Interval merging rule for abutting intervals  Default value: ALL. Possible values: {ALL, OVERLAPPING_ONLY}",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Interval Exclusion Padding",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--interval-exclusion-padding",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#interval_exclusion_padding",
            "description": "Amount of padding (in bp) to add to each interval you are excluding. Default value: 0."
          },
          {
            "sbg:altPrefix": "",
            "label": "Input Prior",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--input-prior",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#input_prior",
            "description": "Input prior for calls This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Indel Heterozygosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--indel-heterozygosity",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#indel_heterozygosity",
            "description": "Heterozygosity for indel calling. See the GATKDocs for heterozygosity for full details on the meaning of this population genetics concept Default value: 1.25E-4."
          },
          {
            "sbg:altPrefix": "",
            "label": "Heterozygosity Stdev",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--heterozygosity-stdev",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#heterozygosity_stdev",
            "description": "Standard deviation of eterozygosity for SNP and indel calling. Default value: 0.01."
          },
          {
            "sbg:altPrefix": "",
            "label": "Heterozygosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--heterozygosity",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#heterozygosity",
            "description": "Heterozygosity value used to compute prior likelihoods for any locus. See the GATKDocs for full details on the meaning of this population genetics concept Default value: 0.001."
          },
          {
            "sbg:altPrefix": "",
            "label": "Group",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--group",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#group",
            "description": "One or more classes/groups of annotations to apply to variant calls This argument may be specified 0 or more times. Default value: [StandardAnnotation]."
          },
          {
            "sbg:altPrefix": "",
            "label": "Filter Too Short",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--filter-too-short",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#filter_too_short",
            "description": "Value for which reads with less than this number of aligned bases is considered too short Default value: 30."
          },
          {
            "sbg:altPrefix": "",
            "label": "Exclude Intervals String",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#exclude_intervals_string",
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "sbg:fileTypes": "TXT, BED",
            "label": "Exclude Intervals File",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--exclude-intervals"
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#exclude_intervals_file",
            "description": "One or more genomic intervals to exclude from processing This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Dont Require Soft Clips Both Ends",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--dont-require-soft-clips-both-ends",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#dont_require_soft_clips_both_ends",
            "description": "Allow a read to be filtered out based on having only 1 soft-clipped block. By default, both ends must have a soft-clipped block, setting this flag requires only 1 soft-clipped block. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Tool Default Read Filters",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-tool-default-read-filters",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_tool_default_read_filters",
            "description": "Disable all tool default read filters Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Sequence Dictionary Validation",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-sequence-dictionary-validation",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_sequence_dictionary_validation",
            "description": "If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk! Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Read Filter",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-read-filter",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "GoodCigarReadFilter",
                  "MappedReadFilter",
                  "MappingQualityAvailableReadFilter",
                  "MappingQualityReadFilter",
                  "NonZeroReferenceLengthAlignmentReadFilter",
                  "NotDuplicateReadFilter",
                  "NotSecondaryAlignmentReadFilter",
                  "PassesVendorQualityCheckReadFilter",
                  "WellformedReadFilter"
                ],
                "type": "enum"
              }
            ],
            "id": "#disable_read_filter",
            "description": "Read filters to be disabled before analysis This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Disable Bam Index Caching",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--disable-bam-index-caching",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#disable_bam_index_caching",
            "description": "If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:fileTypes": "VCF,VCF.GZ",
            "label": "Dbsnp",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "position": 0,
              "secondaryFiles": [
                ".idx"
              ],
              "prefix": "--dbsnp"
            },
            "type": [
              "null",
              "File"
            ],
            "required": false,
            "id": "#dbsnp",
            "description": "DbSNP file Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-md5",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_variant_md5",
            "description": "If true, create a a MD5 digest any VCF file created. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Variant Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-variant-index",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_variant_index",
            "description": "If true, create a VCF index when writing a coordinate-sorted VCF file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Md5",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-md5",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_bam_md5",
            "description": "If true, create a MD5 digest for any BAM/SAM/CRAM file created Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Create Output Bam Index",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--create-output-bam-index",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#create_output_bam_index",
            "description": "If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Cloud Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-prefetch-buffer",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#cloud_prefetch_buffer",
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Default value: 40."
          },
          {
            "sbg:altPrefix": "",
            "label": "Cloud Index Prefetch Buffer",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--cloud-index-prefetch-buffer",
              "position": 0
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#cloud_index_prefetch_buffer",
            "description": "Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset. Default value: -1."
          },
          {
            "sbg:altPrefix": "",
            "label": "Black Listed Lanes",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-listed-lanes",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#black_listed_lanes",
            "description": "Keep reads with platform units not on the list This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Black List",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--black-list",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#black_list",
            "description": "This argument must be specified at least once. Required."
          },
          {
            "sbg:altPrefix": "",
            "label": "Annotations To Exclude",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--annotations-to-exclude",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#annotations_to_exclude",
            "description": "One or more specific annotations to exclude from recomputation. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "sbg:altPrefix": "",
            "label": "Annotation",
            "sbg:category": "Advanced Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--annotation",
              "position": 0
            },
            "type": [
              "null",
              "string"
            ],
            "id": "#annotation",
            "description": "One or more specific annotations to recompute. This argument may be specified 0 or more times. Default value: null."
          },
          {
            "label": "Annotate Nda",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--annotate-with-num-discovered-alleles",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#annotate_nda",
            "description": "If provided, we will annotate records with the number of alternate alleles that were discovered (but not necessarily genotyped) at a given site Default value: false. Possible values: {true, false}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Frac",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-frac",
              "position": 0
            },
            "type": [
              "null",
              "float"
            ],
            "id": "#ambig_filter_frac",
            "description": "Threshold fraction of non-regular bases (e.g. N) above which to filter Default value: 0.05."
          },
          {
            "sbg:altPrefix": "",
            "label": "Ambig Filter Bases",
            "sbg:category": "Conditional Arguments for readFilter",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--ambig-filter-bases"
            },
            "type": [
              "null",
              "int"
            ],
            "id": "#ambig_filter_bases",
            "description": "Threshold number of ambiguous bases. If null, uses threshold fraction; otherwise, overrides threshold fraction. Cannot be used in conjunction with argument(s) maxAmbiguousBaseFraction.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Add Output Sam Program Record",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--add-output-sam-program-record",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#add_output_sam_program_record",
            "description": "If true, adds a PG tag to created SAM/BAM/CRAM files. Default value: true. Possible values: {true, false}.",
            "sbg:stageInput": null
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "GenotypeGVCFs"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF",
            "label": "Output VCF",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#variants",
              "glob": "*.vcf"
            },
            "id": "#vcf",
            "description": "Output VCF."
          }
        ],
        "label": "GATK GenotypeGVCFs",
        "sbg:createdOn": 1500296429,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 207.62366547678548,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:image_url": null,
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-genotypegvcfs/21",
        "description": "Perform joint genotyping on one or more samples pre-called with HaplotypeCaller.\n\n###**Overview**  \nThis tool is designed to perform joint genotyping on multiple samples pre-called with HaplotypeCaller to produce a multi-sample callset in a highly scalable manner. However it can also be run on a single sample at a time to produce a single-sample callset. In any case, the input samples must possess genotype likelihoods produced by HaplotypeCaller with `-ERC GVCF` or `-ERC BP_RESOLUTION`.re-genotype the newly merged record, and then re-annotate it.\n\n###**Input**  \nOne or more GVCFs produced by in HaplotypeCaller with the `-ERC GVCF` or `-ERC BP_RESOLUTION` settings, containing the samples to joint-genotype. \n\n###**Output**  \nA final VCF in which all samples have been jointly genotyped. \n\n###**Usage example**   \n\n####**Perform joint genotyping on a set of GVCFs enumerated in the command line**\n\n     gatk-launch --javaOptions \"-Xmx4g\" GenotypeGVCFs \\\n       -R reference.fasta \\\n       -V input1.g.vcf \\\n       -V input2.g.vcf \\\n       -V input3.g.vcf \\\n       -O output.vcf\n\n####**Perform joint genotyping on a set of GVCFs listed in a text file, one per line**\n\n     gatk-launch --javaOptions \"-Xmx4g\" GenotypeGVCFs \\\n       -R reference.fasta \\\n       -V input_gvcfs.list \\\n       -O output.vcf\n \n###**Caveat**  \nOnly GVCF files produced by HaplotypeCaller (or CombineGVCFs) can be used as input for this tool. Some other programs produce files that they call GVCFs but those lack some important information (accurate genotype likelihoods for every position) that GenotypeGVCFs requires for its operation. \n\n###**Special note on ploidy**  \nThis tool is able to handle any ploidy (or mix of ploidies) intelligently; there is no need to specify ploidy for non-diploid organisms.  \n\n###**Additional Notes**\n- By default, the tool works only with VCF resource files. To use VCF.GZ resource files, the tool wrapper needs to be modified.\n\n###**IMPORTANT NOTICE**  \n\nTools in GATK that require a fasta reference file also look for the reference file's corresponding *.fai* (fasta index) and *.dict* (fasta dictionary) files. The fasta index file allows random access to reference bases and the dictionary file is a dictionary of the contig names and sizes contained within the fasta reference. These two secondary files are essential for GATK to work properly. To append these two files to your fasta reference please use the '***SBG FASTA Indices***' tool within your GATK based workflow before using any of the GATK tools.",
        "sbg:toolkit": "GATK",
        "sbg:content_hash": "a179a4be55f88eaa446a9937ba43d8cf44ab2f4eff97685676538af0e98eaaaec",
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "sbg:revision": 21,
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549037998,
        "sbg:id": "h-901215e8/h-26a3ecb9/h-63d3b6ee/0",
        "temporaryFailCodes": [],
        "sbg:wrapperAuthor": "filip_tubic"
      },
      "id": "#GATK_GenotypeGVCFs",
      "sbg:y": 207.62366547678548
    },
    {
      "sbg:x": 737.3081347667422,
      "inputs": [
        {
          "id": "#GATK_IndexFeatureFile_1.verbosity"
        },
        {
          "id": "#GATK_IndexFeatureFile_1.use_jdk_inflater"
        },
        {
          "id": "#GATK_IndexFeatureFile_1.use_jdk_deflater"
        },
        {
          "id": "#GATK_IndexFeatureFile_1.quiet"
        },
        {
          "id": "#GATK_IndexFeatureFile_1.memory_per_job"
        },
        {
          "id": "#GATK_IndexFeatureFile_1.memory_overhead_per_job"
        },
        {
          "source": [
            "#mills"
          ],
          "id": "#GATK_IndexFeatureFile_1.feature_file"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_IndexFeatureFile_1.output_with_index"
        },
        {
          "id": "#GATK_IndexFeatureFile_1.index"
        }
      ],
      "run": {
        "x": 737.3081347667422,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 15,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx2048M\" IndexFeatureFile --feature-file /path/to/feature_file.vcf.gz --output feature_file.vcf.gz.tbi",
        "sbg:job": {
          "allocatedResources": {
            "mem": 2048,
            "cpu": 1
          },
          "inputs": {
            "memory_overhead_per_job": 0,
            "memory_per_job": 2048,
            "feature_file": {
              "path": "/path/to/feature_file.vcf.gz",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "use_jdk_inflater": false,
            "use_jdk_deflater": false,
            "QUIET": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296617,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/16",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500367649,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/17",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640357,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/18",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887430,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/20",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405190,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/21",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105732,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/22",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504108418,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/23",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504109513,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/24",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504273463,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/26",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275173,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/27",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1509714097,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/29",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522886,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/30",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587930,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/40",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590594,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/42",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946086,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/43",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549037925,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 15
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  \toutput_name = $job.inputs.feature_file.path.split('/').slice(-1)[0]\n    \n    if (output_name.endsWith('.gz')) {\n    \treturn output_name + '.tbi'\n    }\n  \telse {\n     \treturn output_name + '.idx'\n  \t}  \n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output"
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "sbg:altPrefix": "",
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "id": "#verbosity",
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "label": "Memory Per Job",
            "description": "Memory per job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "label": "Memory Overhead Per Job",
            "description": "Memory overhead per job",
            "sbg:category": "Execution"
          },
          {
            "sbg:altPrefix": "",
            "label": "Feature File",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--feature-file",
              "position": 0
            },
            "type": [
              "File"
            ],
            "required": true,
            "id": "#feature_file",
            "description": "Feature file (eg., VCF or BED file) to index. Must be in a tribble-supported format Required.",
            "sbg:stageInput": "link"
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "IndexFeatureFile"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF,BED,RECAL",
            "label": "Output file with index",
            "type": [
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#feature_file",
              "glob": {
                "class": "Expression",
                "script": "{\n  \treturn $job.inputs.feature_file.path.split('/').slice(-1)[0]\n}",
                "engine": "#cwl-js-engine"
              },
              "secondaryFiles": [
                ".idx"
              ]
            },
            "id": "#output_with_index",
            "description": "Output file with index."
          },
          {
            "sbg:fileTypes": "IDX",
            "label": "Index file",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "glob": {
                "class": "Expression",
                "script": "{\n  \toutput_name = $job.inputs.feature_file.path.split('/').slice(-1)[0]\n    \n    if (output_name.endsWith('.gz')) {\n    \treturn output_name + '.tbi'\n    }\n  \telse {\n     \treturn output_name + '.idx'\n  \t}  \n}",
                "engine": "#cwl-js-engine"
              }
            },
            "id": "#index",
            "description": "Index file"
          }
        ],
        "label": "GATK IndexFeatureFile",
        "sbg:createdOn": 1500296617,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 962.3083878480738,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-index-feature-file/15",
        "description": "Creates indices for Feature-containing files, such as VCF and BED files.\n\n###**Overview** \nCreates indices for Feature-containing files, such as VCF and BED files.\n\n###**Inputs**  \nA feature file to be indexed.  \n\n###**Outputs**  \nAn index file.\n\n###**Usage example**\n\n    java -Xmx4g -jar gatk.jar \\  \n         IndexFeatureFile \\  \n         --feature_file feature_file.vcf \\ \n         --output feature_file.vcf.idx",
        "sbg:content_hash": "af3015979706ca747d636a4dfa5f99cbd6178fdb365d1636631653c6dbab9c3d0",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "sbg:revision": 15,
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549037925,
        "sbg:id": "h-db71d0c6/h-ebcf8b1a/h-74e8a611/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_IndexFeatureFile_1",
      "sbg:y": 962.3083878480738
    },
    {
      "sbg:x": 737.0517058525492,
      "inputs": [
        {
          "id": "#GATK_IndexFeatureFile.verbosity"
        },
        {
          "id": "#GATK_IndexFeatureFile.use_jdk_inflater"
        },
        {
          "id": "#GATK_IndexFeatureFile.use_jdk_deflater"
        },
        {
          "id": "#GATK_IndexFeatureFile.quiet"
        },
        {
          "id": "#GATK_IndexFeatureFile.memory_per_job"
        },
        {
          "id": "#GATK_IndexFeatureFile.memory_overhead_per_job"
        },
        {
          "source": [
            "#dbsnp"
          ],
          "id": "#GATK_IndexFeatureFile.feature_file"
        }
      ],
      "outputs": [
        {
          "id": "#GATK_IndexFeatureFile.output_with_index"
        },
        {
          "id": "#GATK_IndexFeatureFile.index"
        }
      ],
      "run": {
        "x": 737.0517058525492,
        "hints": [
          {
            "class": "DockerRequirement",
            "dockerPull": "images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "dockerImageId": "3c3b8e0ed4e5"
          },
          {
            "class": "sbg:MemRequirement",
            "value": {
              "class": "Expression",
              "script": "{\n  if($job.inputs.memory_per_job){\n    if($job.inputs.memory_overhead_per_job){\n    \treturn $job.inputs.memory_per_job + $job.inputs.memory_overhead_per_job\n    }\n    else\n  \t\treturn $job.inputs.memory_per_job\n  }\n  else if(!$job.inputs.memory_per_job && $job.inputs.memory_overhead_per_job){\n\t\treturn 2048 + $job.inputs.memory_overhead_per_job  \n  }\n  else\n  \treturn 2048\n}",
              "engine": "#cwl-js-engine"
            }
          },
          {
            "class": "sbg:CPURequirement",
            "value": 1
          }
        ],
        "sbg:latestRevision": 15,
        "sbg:cmdPreview": "/gatk/gatk --java-options \"-Xmx2048M\" IndexFeatureFile --feature-file /path/to/feature_file.vcf.gz --output feature_file.vcf.gz.tbi",
        "sbg:job": {
          "allocatedResources": {
            "mem": 2048,
            "cpu": 1
          },
          "inputs": {
            "memory_overhead_per_job": 0,
            "memory_per_job": 2048,
            "feature_file": {
              "path": "/path/to/feature_file.vcf.gz",
              "class": "File",
              "size": 0,
              "secondaryFiles": []
            },
            "use_jdk_inflater": false,
            "use_jdk_deflater": false,
            "QUIET": false
          }
        },
        "sbg:sbgMaintained": false,
        "sbg:revisionsInfo": [
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500296617,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/16",
            "sbg:revision": 0
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500367649,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/17",
            "sbg:revision": 1
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500640357,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/18",
            "sbg:revision": 2
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1500887430,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/20",
            "sbg:revision": 3
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1503405190,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/21",
            "sbg:revision": 4
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504105732,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/22",
            "sbg:revision": 5
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504108418,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/23",
            "sbg:revision": 6
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504109513,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/24",
            "sbg:revision": 7
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504273463,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/26",
            "sbg:revision": 8
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1504275173,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/27",
            "sbg:revision": 9
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1509714097,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/29",
            "sbg:revision": 10
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1511522886,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/30",
            "sbg:revision": 11
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515587930,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/40",
            "sbg:revision": 12
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1515590594,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/42",
            "sbg:revision": 13
          },
          {
            "sbg:modifiedBy": "teodora.aleksic",
            "sbg:modifiedOn": 1520946086,
            "sbg:revisionNotes": "Copy of vladimirk/whole-exome-pipeline-bwa-gatk-4-0-with-metrics-demo/gatk-index-feature-file/43",
            "sbg:revision": 14
          },
          {
            "sbg:modifiedBy": "vladimirk",
            "sbg:modifiedOn": 1549037925,
            "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
            "sbg:revision": 15
          }
        ],
        "arguments": [
          {
            "valueFrom": {
              "class": "Expression",
              "script": "{\n  \toutput_name = $job.inputs.feature_file.path.split('/').slice(-1)[0]\n    \n    if (output_name.endsWith('.gz')) {\n    \treturn output_name + '.tbi'\n    }\n  \telse {\n     \treturn output_name + '.idx'\n  \t}  \n}",
              "engine": "#cwl-js-engine"
            },
            "separate": true,
            "prefix": "--output"
          }
        ],
        "sbg:project": "vladimirk/gatk-4-0-demo-1",
        "inputs": [
          {
            "sbg:altPrefix": "",
            "label": "Verbosity",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--verbosity",
              "position": 0
            },
            "type": [
              "null",
              {
                "name": "null",
                "symbols": [
                  "ERROR",
                  "WARNING",
                  "INFO",
                  "DEBUG"
                ],
                "type": "enum"
              }
            ],
            "id": "#verbosity",
            "description": "Control verbosity of logging. Default value: INFO. Possible values: {ERROR, WARNING, INFO, DEBUG}."
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Inflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-inflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_inflater",
            "description": "Whether to use the JdkInflater (as opposed to IntelInflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Use Jdk Deflater",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--use-jdk-deflater",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#use_jdk_deflater",
            "description": "Whether to use the JdkDeflater (as opposed to IntelDeflater) Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "sbg:altPrefix": "",
            "label": "Quiet",
            "sbg:category": "Optional Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--quiet",
              "position": 0
            },
            "type": [
              "null",
              "boolean"
            ],
            "id": "#quiet",
            "description": "Whether to suppress job-summary info on System.err. Default value: false. Possible values: {true, false}.",
            "sbg:stageInput": null
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_per_job",
            "label": "Memory Per Job",
            "description": "Memory per job",
            "sbg:category": "Execution"
          },
          {
            "type": [
              "null",
              "int"
            ],
            "id": "#memory_overhead_per_job",
            "label": "Memory Overhead Per Job",
            "description": "Memory overhead per job",
            "sbg:category": "Execution"
          },
          {
            "sbg:altPrefix": "",
            "label": "Feature File",
            "sbg:category": "Required Arguments",
            "inputBinding": {
              "sbg:cmdInclude": true,
              "separate": true,
              "prefix": "--feature-file",
              "position": 0
            },
            "type": [
              "File"
            ],
            "required": true,
            "id": "#feature_file",
            "description": "Feature file (eg., VCF or BED file) to index. Must be in a tribble-supported format Required.",
            "sbg:stageInput": "link"
          }
        ],
        "class": "CommandLineTool",
        "sbg:publisher": "sbg",
        "sbg:links": [
          {
            "id": "https://software.broadinstitute.org/gatk/",
            "label": "Homepage"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/documentation/tooldocs/current/",
            "label": "Documentation"
          },
          {
            "id": "https://software.broadinstitute.org/gatk/download/",
            "label": "Download"
          }
        ],
        "sbg:modifiedBy": "vladimirk",
        "sbg:toolkitVersion": "4.0.2.0",
        "requirements": [
          {
            "class": "ExpressionEngineRequirement",
            "id": "#cwl-js-engine",
            "requirements": [
              {
                "class": "DockerRequirement",
                "dockerPull": "rabix/js-engine"
              }
            ]
          }
        ],
        "sbg:toolAuthor": "Broad Institute",
        "sbg:projectName": "GATK 4.0 - Demo",
        "baseCommand": [
          "/gatk/gatk",
          "--java-options",
          {
            "class": "Expression",
            "script": "{\n  if($job.inputs.memory_per_job){\n  \treturn '\\\"-Xmx'.concat($job.inputs.memory_per_job, 'M') + '\\\"'\n  }\n  \treturn '\\\"-Xmx2048M\\\"'\n}",
            "engine": "#cwl-js-engine"
          },
          "IndexFeatureFile"
        ],
        "stdin": "",
        "$namespaces": {
          "sbg": "https://sevenbridges.com"
        },
        "sbg:createdBy": "teodora.aleksic",
        "outputs": [
          {
            "sbg:fileTypes": "VCF,BED,RECAL",
            "label": "Output file with index",
            "type": [
              "File"
            ],
            "outputBinding": {
              "sbg:inheritMetadataFrom": "#feature_file",
              "glob": {
                "class": "Expression",
                "script": "{\n  \treturn $job.inputs.feature_file.path.split('/').slice(-1)[0]\n}",
                "engine": "#cwl-js-engine"
              },
              "secondaryFiles": [
                ".idx"
              ]
            },
            "id": "#output_with_index",
            "description": "Output file with index."
          },
          {
            "sbg:fileTypes": "IDX",
            "label": "Index file",
            "type": [
              "null",
              "File"
            ],
            "outputBinding": {
              "glob": {
                "class": "Expression",
                "script": "{\n  \toutput_name = $job.inputs.feature_file.path.split('/').slice(-1)[0]\n    \n    if (output_name.endsWith('.gz')) {\n    \treturn output_name + '.tbi'\n    }\n  \telse {\n     \treturn output_name + '.idx'\n  \t}  \n}",
                "engine": "#cwl-js-engine"
              }
            },
            "id": "#index",
            "description": "Index file"
          }
        ],
        "label": "GATK IndexFeatureFile",
        "sbg:createdOn": 1500296617,
        "successCodes": [],
        "sbg:validationErrors": [],
        "y": 1128.3337852690124,
        "sbg:license": "Open source BSD (3-clause) license",
        "sbg:contributors": [
          "vladimirk",
          "teodora.aleksic"
        ],
        "sbg:appVersion": [
          "sbg:draft-2"
        ],
        "stdout": "",
        "id": "vladimirk/gatk-4-0-demo-1/gatk-4-0-index-feature-file/15",
        "description": "Creates indices for Feature-containing files, such as VCF and BED files.\n\n###**Overview** \nCreates indices for Feature-containing files, such as VCF and BED files.\n\n###**Inputs**  \nA feature file to be indexed.  \n\n###**Outputs**  \nAn index file.\n\n###**Usage example**\n\n    java -Xmx4g -jar gatk.jar \\  \n         IndexFeatureFile \\  \n         --feature_file feature_file.vcf \\ \n         --output feature_file.vcf.idx",
        "sbg:content_hash": "af3015979706ca747d636a4dfa5f99cbd6178fdb365d1636631653c6dbab9c3d0",
        "sbg:toolkit": "GATK",
        "sbg:image_url": null,
        "sbg:revisionNotes": "latest docker images.sbgenomics.com/vladimirk/gatk:4.1.0.0",
        "sbg:revision": 15,
        "sbg:categories": [
          "GATK-4"
        ],
        "cwlVersion": "sbg:draft-2",
        "sbg:modifiedOn": 1549037925,
        "sbg:id": "h-bc6280ca/h-5e88d2c4/h-300c5be0/0",
        "temporaryFailCodes": []
      },
      "id": "#GATK_IndexFeatureFile",
      "sbg:y": 1128.3337852690124
    }
  ],
  "class": "Workflow",
  "sbg:batchInput": "#fastq",
  "description": "This Whole Exome Sequencing (WES) workflow identifies variants from a human exome experiment by using the [Broad Institute's](https://software.broadinstitute.org/gatk/best-practices/) best-practices workflow for alignment and variant calling.\n\nThe WES workflos analyzes all protein-coding genes in a genome, known as the exome. The exome is estimated to comprise ~1-2% of the genome yet contains ~85% of recognized disease-causing mutations.\n\nExome sequencing achieves better coverage compared to whole genome sequencing. However, variations affecting a gene\u2019s coding regions can leave potential effects on regulatory regions and various control mechanisms undetected. As such, the WES workflow is optimally applied to areas where changes in proteins are expected with a greater probability or are of a higher significance. For example, WES can be used for detecting variants (i.e. mutations) in known disease-causing genes as well as for the detection of novel gene-disease associations.\n\n##Workflow structure\n\nThe workflow follows the Broad Institute\u2019s best practices and utilizes the Broad Institute's GATK tools with additional quality metrics reporting tools. Sequenced reads are first aligned with the BWA-MEM Bundle tool, which optionally removes duplicates and sorts BAM files. In parallel with the alignment the assessment of the quality of sequenced reads is performed using Babraham Institute's tool, FastQC. The next step uses algorithms developed by the Broad Institute to improve the qualities of sequenced bases (Base Quality Score Recalibration - BQSR). Generated BAM files are passed to GATK HaplotypeCaller for variant calling.  Detected variants are subjected to filtering with predefined hard thresholds and annotation (SnpEff).  For more information on how variant calling is performed, please refer to the [Broad Institute's web site](https://software.broadinstitute.org/gatk/best-practices/).\n\nThe WES workflow utilizes human reference genome hg19, hg37, and hg38, as well as several public databases. All reference files must correspond to the same reference genome (HG19, GRCh 37, HG38, etc.). If some of the reference files have contigs not listed in the reference genome, the workflow cannot be executed.\n\n## Required inputs\n\n- Reference genome or TAR with BWA reference indices\n- FASTQ reads Illumina paired-end reads from the sequencer\n- Target exome BED file\n- DBSNP database - Database with known variants from the population used with BQSR and for annotation in variant calling (HaplotypeCaller)\n- Mills indel database used for BQSR (VCF)\n- Known indels 1000g for BQSR\n- SnpEff database archive used for variant annotation (ZIP)\n\n\n## Outputs\n- Coverage metrics showing the distribution of the number of reads covering regions of the exome\n- Alignment metrics with statistics about the quality of the alignment\n- Aligned Reads from BWA-MEM (BAM)\n- Annotated and filtered variant calling format file (VCF)\n- Raw variant calling format file (VCF)\n- Genomic variant calling format file (gVCF)\n- FastQC Report containing reports about quality of the sequenced data (adapter contamination, quality distribution, GC content,...)\n\n## Expected workflow performance\n\nBelow, we present three benchmarks showcasing the expected variant detection and run-time performance of the WES workflow.\n \nWe use the [Genome in a bottle](ftp://ftp-trace.ncbi.nlm.nih.gov/giab/ftp/release) truth dataset and the [hap.py](https://github.com/Illumina/hap.py) variant evaluation tool to determine the sensitivity and precision of the workflow for both SNPs and Indels following the GA4GH recommended practices. We note that the observed precision and sensitivity measures are in line with the expected performance for this sample. Further, we observe that both the transition to transversion ratio for SNPs and the ratio of heterozygous to homozygous indels calls are in the expected ranges for a whole-genome context. Only the calls that have the PASS flag in the VCF filter column were used for calculating the reported performance metrics, reflecting the performance that can be expected when the workflow is used in a production scenario.\n\n| Sample            | SNP Precision | SNP Recall | SNP F-measure | INDEL Precision | INDEL Recall | INDEL F-measure |\n|-------------------|---------------|------------|---------------|-----------------|--------------|-----------------|\n| HG001 TruSeq 135x | 99.3156       | 96.4127    | 97.8426       | 77.8433         | 79.5941      | 78.709          |\n| HG002 Oslo 190x   | 99.828        | 99.4878    | 99.6576       | 92.88           | 90.3208      | 91.5825         |\n\n\nFinally, we measured the end-to-end run-time of the workflow. The total execution time for 135x sample is 2 hours and 53 minutes on the C4.2xlarge AWS instance.\n\n| Sample-coverage | Size of Gzipped FASTQs [Gb] | Alignment and BAM preparation | Variant calling | Variant filtering and annotation | TotalCost (AWS spot instance) |\n|-----------------|-----------------------------|-------------------------------|-----------------|-------------------|-------------------------------|\n| NA12878-135x    | 7.6                         | 2h 14m                        | 30m             | 6m                | 0.40                          |\n| HG002 Oslo 190x | 7.2                          | 2h 21m                         | 26m             | 6m                | 0.47                          |\n\n## Important issues\n\n- In order to complete the execution of the workflow, the following fields in the metadata of FASTQ files must be set: **Paired-end, Sample ID, Platform and Library**.\n- BWA-MEM index files are packed together with the reference genome in the TAR files which are available on SBG Public files. With that indexing step in the pipeline can be skipped and its total execution will be faster.\n- If HG38 reference and high-coverage FASTQ files (e.g. larger than 150x) are used the GATK HaplotypeCaller might fail due to lack of memory. Providing more memory to its Java virtual machine and larger instance for the workflow should be done in that case.\n- If HG38 is used it will automatically perform alt contig processing from [Broad](https://gatkforums.broadinstitute.org/gatk/discussion/8017/how-to-map-reads-to-a-reference-with-alternate-contigs-like-grch38) by including additional alt index from bwa.kit. The alignments on primary assembly reference will be done correctly and for proper alignment on alt contigs please run additional post processing.",
  "sbg:toolkit": "GATK",
  "sbg:toolkitVersion": "4.1.0.0",
  "requirements": [],
  "sbg:toolAuthor": "Broad Institute",
  "sbg:categories": [
    "WES-(WXS)",
    "GATK-4"
  ],
  "cwlVersion": "sbg:draft-2",
  "sbg:canvas_zoom": 0.6499999999999997,
  "sbg:appVersion": [
    "sbg:draft-2"
  ],
  "id": "https://api.sbgenomics.com/v2/apps/admin/sbg-public-data/whole-exome-sequencing-bwa-gatk-4-0/38/raw/",
  "sbg:id": "admin/sbg-public-data/whole-exome-sequencing-bwa-gatk-4-0/38",
  "sbg:revision": 38,
  "sbg:revisionNotes": "revision in description 4.1.0.0",
  "sbg:modifiedOn": 1551696933,
  "sbg:modifiedBy": "admin",
  "sbg:createdOn": 1509554705,
  "sbg:createdBy": "admin",
  "sbg:project": "admin/sbg-public-data",
  "sbg:sbgMaintained": false,
  "sbg:validationErrors": [],
  "sbg:contributors": [
    "admin"
  ],
  "sbg:latestRevision": 38,
  "sbg:publisher": "sbg",
  "sbg:content_hash": "a4ab3fa1a6e019a2ef48e5195ee60d408f86d4cb267bfd81a2fb6a95de7655fa9"
}