{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "cellsnp",
  "description": "cellSNP aims to pileup the expressed alleles in single-cell or bulk RNA-seq data. It can be directly used for donor deconvolution in multiplexed single-cell RNA-seq data, particularly with vireo.",
  "type": "object",
  "$defs": {
    "input": {
      "title": "Input",
      "type": "object",
      "description": "No description",
      "properties": {
        "sam_file": {
          "type": "string",
          "format": "path",
          "description": "Indexed sam/bam file(s), comma separated multiple samples",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"input.bam\"`. "
        },
        "sam_index_file": {
          "type": "string",
          "format": "path",
          "description": "Input SAM/BAM Index file, problem with samFileList.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"input.bai\"`. "
        },
        "sam_fileList": {
          "type": "string",
          "format": "path",
          "description": "A list file containing bam files, each per line, for Mode 1b & 2b.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"file_list.txt\"`. "
        },
        "regions_vcf": {
          "type": "string",
          "format": "path",
          "description": "A vcf file listing all candidate SNPs, for fetch each variants",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"regions.vcf\"`. "
        },
        "targets_vcf": {
          "type": "string",
          "format": "path",
          "description": "Similar as --regions_vcf, but the next position is accessed by streaming rather than indexing/jumping (like -T in samtools/bcftools mpileup).",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"targets.vcf\"`. "
        },
        "barcode_file": {
          "type": "string",
          "format": "path",
          "description": "A plain file listing all effective cell barcode.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"barcodes.tsv\"`. "
        },
        "sample_list": {
          "type": "string",
          "format": "path",
          "description": "A list file containing sample IDs, each per line.",
          "help_text": "Type: `file`, multiple: `False`, direction: `input`, example: `\"samples.txt\"`. "
        },
        "sample_ids": {
          "type": "string",
          "description": "Comma separated sample ids.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "genotype": {
          "type": "boolean",
          "description": "If use, do genotyping in addition to counting.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "gzip": {
          "type": "boolean",
          "description": "If use, the output files will be zipped into BGZF format.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "print_skip_snps": {
          "type": "boolean",
          "description": "If use, the SNPs skipped when loading VCF will be printed.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "chrom": {
          "type": "string",
          "description": "The chromosomes to use in integer format 1-22, comma separated",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "cell_tag": {
          "type": "string",
          "description": "Tag for cell barcodes, turn off with None.",
          "help_text": "Type: `string`, multiple: `False`, default: `\"CB\"`. ",
          "default": "CB"
        },
        "umi_tag": {
          "type": "string",
          "description": "Tag for UMI: UR, Auto, None",
          "help_text": "Type: `string`, multiple: `False`, default: `\"Auto\"`. ",
          "default": "Auto"
        },
        "min_count": {
          "type": "integer",
          "description": "Minimum aggragated count.",
          "help_text": "Type: `integer`, multiple: `False`, default: `20`. ",
          "default": 20
        },
        "min_maf": {
          "type": "number",
          "description": "Minimum minor allele frequency.",
          "help_text": "Type: `double`, multiple: `False`, default: `0.0`. ",
          "default": 0.0
        },
        "doublet_gl": {
          "type": "boolean",
          "description": "If use, keep doublet GT likelihood, i.e., GT=0.5 and GT=1.5.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "incl_flag": {
          "type": "string",
          "description": "Required flags: skip reads with all mask bits unset.",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "excl_flag": {
          "type": "string",
          "description": "Filter flags: skip reads with any mask bits set [UNMAP,SECONDARY,QCFAIL (when use UMI) or UNMAP,SECONDARY,QCFAIL,DUP (otherwise)]",
          "help_text": "Type: `string`, multiple: `False`. "
        },
        "count_orphan": {
          "type": "boolean",
          "description": "If use, do not skip anomalous read pairs.",
          "help_text": "Type: `boolean_true`, multiple: `False`, default: `false`. ",
          "default": false
        },
        "min_mapq": {
          "type": "integer",
          "description": "Minimum MAPQ for read filtering.",
          "help_text": "Type: `integer`, multiple: `False`, default: `20`. ",
          "default": 20
        },
        "min_len": {
          "type": "integer",
          "description": "Minimum mapped length for read filtering.",
          "help_text": "Type: `integer`, multiple: `False`, default: `30`. ",
          "default": 30
        }
      }
    },
    "output": {
      "title": "Output",
      "type": "object",
      "description": "No description",
      "properties": {
        "output": {
          "type": "string",
          "format": "path",
          "description": "Output directory for VCF and sparse matrices.",
          "help_text": "Type: `file`, multiple: `False`, default: `\"$id.$key.output\"`, direction: `output`, example: `\"cellsnp_out\"`. ",
          "default": "$id.$key.output"
        }
      }
    },
    "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"
    }
  ]
}
