{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "dsc_pileup",
  "description": "Dsc-pileup is a software tool to pileup reads and corresponding base quality \nfor each overlapping SNPs and each barcode. By using pileup files,\nit would allow us to run demuxlet/freemuxlet pretty fast multiple times\nwithout going over the BAM file again.\n",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "sam": {
          "type": "string",
          "format": "path",
          "description": "Input SAM/BAM/CRAM file",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"input.sam\"`. "
        },
        "tag_group": {
          "type": "string",
          "description": "Tag representing readgroup or cell barcodes, in the case to partition the BAM file into multiple groups",
          "help_text": "Type: `string`, multiple: `False`, default: `\"CB\"`. ",
          "default": "CB"
        },
        "tag_umi": {
          "type": "string",
          "description": "Tag representing UMIs",
          "help_text": "Type: `string`, multiple: `False`, default: `\"UB\"`. ",
          "default": "UB"
        },
        "exclude_flag": {
          "type": "integer",
          "description": "SAM/BAM FLAGs to be excluded.",
          "help_text": "Type: `integer`, multiple: `False`, default: `1796`. ",
          "default": 1796
        },
        "vcf": {
          "type": "string",
          "format": "path",
          "description": "Input VCF/BCF file for dsc-pileup, containing the AC and AN field.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"input.vcf\"`. "
        },
        "sm": {
          "type": "string",
          "description": "List of sample IDs to compare to (default: use all).",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "sm_list": {
          "type": "string",
          "description": "File containing the list of sample IDs to compare.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "sam_verbose": {
          "type": "integer",
          "description": "Verbose message frequency for SAM/BAM/CRAM.",
          "help_text": "Type: `integer`, multiple: `False`, default: `1000000`. ",
          "default": 1000000
        },
        "vcf_verbose": {
          "type": "integer",
          "description": "Verbose message frequency for VCF/BCF.",
          "help_text": "Type: `integer`, multiple: `False`, default: `1000`. ",
          "default": 1000
        },
        "skip_umi": {
          "type": "boolean",
          "description": "Do not generate [prefix].umi.gz file, which stores the regions covered by each barcode/UMI pair.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "cap_bq": {
          "type": "integer",
          "description": "Maximum base quality (higher BQ will be capped).",
          "help_text": "Type: `integer`, multiple: `False`, default: `40`. ",
          "default": 40
        },
        "min_bq": {
          "type": "integer",
          "description": "Minimum base quality to consider (lower BQ will be skipped).",
          "help_text": "Type: `integer`, multiple: `False`, default: `13`. ",
          "default": 13
        },
        "min_mq": {
          "type": "integer",
          "description": "Minimum mapping quality to consider (lower MQ will be ignored).",
          "help_text": "Type: `integer`, multiple: `False`, default: `20`. ",
          "default": 20
        },
        "min_td": {
          "type": "integer",
          "description": "Minimum distance to the tail (lower will be ignored).",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "excl_flag": {
          "type": "integer",
          "description": "SAM/BAM FLAGs to be excluded for SNP overlapping Read filtering Options.",
          "help_text": "Type: `integer`, multiple: `False`, default: `3844`. ",
          "default": 3844
        },
        "group_list": {
          "type": "string",
          "description": "List of tag readgroup/cell barcode to consider in this run",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "min_total": {
          "type": "integer",
          "description": "Minimum number of total reads for a droplet/cell to be considered.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "min_uniq": {
          "type": "integer",
          "description": "Minimum number of unique reads (determined by UMI/SNP pair) for a droplet/cell to be considered.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        },
        "min_snp": {
          "type": "integer",
          "description": "Minimum number of SNPs with coverage for a droplet/cell to be considered.",
          "help_text": "Type: `integer`, multiple: `False`, default: `0`. ",
          "default": 0
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output directory",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output\"`, direction: `output`, example: `\"demux\"`. ",
          "default": "$id.$key.output"
        },
        "out": {
          "type": "string",
          "description": "dsc-pileup output file prefix",
          "help_text": "Type: `string`, multiple: `False`, example: `\"demuxlet_dsc\"`. "
        }
      }
    },
    "nextflow input-output arguments": {
      "title": "Nextflow input-output arguments",
      "type": "object",
      "description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.",
      "properties": {
        "publish_dir": {
          "type": "string",
          "description": "Path to an output directory.",
          "help_text": "Type: `string`, multiple: `False`, required, example: `\"output/\"`. "
        }
      }
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/input"
    },
    {
      "$ref": "#/$defs/output"
    },
    {
      "$ref": "#/$defs/nextflow input-output arguments"
    }
  ]
}
