{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "sgdemux",
"description": "Demultiplex sequence data generated on Singular Genomics\u0027 sequencing instruments.\n",
"type": "object",
"definitions": {

    
    
    "arguments" : {
    "title": "Arguments",
    "type": "object",
    "description": "No description",
    "properties": {
    
        
                "read_structures": {
                "type":
                "string",
                "description": "Type: List of `string`, multiple_sep: `\";\"`. Read structures, one per input FASTQ",
                "help_text": "Type: List of `string`, multiple_sep: `\";\"`. Read structures, one per input FASTQ. Do not provide when using a path prefix for FASTQs"
            
            }
    

        ,
                "allowed_mismatches": {
                "type":
                "integer",
                "description": "Type: `integer`, example: `1`. Number of allowed mismatches between the observed barcode and the expected barcode",
                "help_text": "Type: `integer`, example: `1`. Number of allowed mismatches between the observed barcode and the expected barcode"
            
            }
    

        ,
                "min_delta": {
                "type":
                "integer",
                "description": "Type: `integer`, example: `2`. The minimum allowed difference between an observed barcode and the second closest expected barcode",
                "help_text": "Type: `integer`, example: `2`. The minimum allowed difference between an observed barcode and the second closest expected barcode"
            
            }
    

        ,
                "free_ns": {
                "type":
                "integer",
                "description": "Type: `integer`, example: `1`. Number of N\u0027s to allow in a barcode without counting against the allowed_mismatches",
                "help_text": "Type: `integer`, example: `1`. Number of N\u0027s to allow in a barcode without counting against the allowed_mismatches"
            
            }
    

        ,
                "max_no_calls": {
                "type":
                "integer",
                "description": "Type: `integer`. Max no-calls (N\u0027s) in a barcode before it is considered unmatchable",
                "help_text": "Type: `integer`. Max no-calls (N\u0027s) in a barcode before it is considered unmatchable.\nA barcode with total N\u0027s greater than \u0027max_no_call\u0027 will be considered unmatchable.\n"
            
            }
    

        ,
                "quality_mask_threshold": {
                "type":
                "string",
                "description": "Type: List of `integer`, multiple_sep: `\";\"`. Mask template bases with quality scores less than specified value(s)",
                "help_text": "Type: List of `integer`, multiple_sep: `\";\"`. Mask template bases with quality scores less than specified value(s).\nSample barcode/index and UMI bases are never masked. If provided either a single value,\nor one value per FASTQ must be provided.\n"
            
            }
    

        ,
                "filter_control_reads": {
                "type":
                "boolean",
                "description": "Type: `boolean_true`, default: `false`. Filter out control reads",
                "help_text": "Type: `boolean_true`, default: `false`. Filter out control reads"
            ,
                "default": "False"
            }
    

        ,
                "filter_failing_quality": {
                "type":
                "boolean",
                "description": "Type: `boolean_true`, default: `false`. Filter reads failing quality filter\n",
                "help_text": "Type: `boolean_true`, default: `false`. Filter reads failing quality filter\n"
            ,
                "default": "False"
            }
    

        ,
                "output_types": {
                "type":
                "string",
                "description": "Type: List of `string`, example: `T`, multiple_sep: `\";\"`, choices: ``T`, `B`, `S`, `M``. The types of output FASTQs to write",
                "help_text": "Type: List of `string`, example: `T`, multiple_sep: `\";\"`, choices: ``T`, `B`, `S`, `M``. The types of output FASTQs to write.\nFor each read structure, all segment types listed will be output to a FASTQ file.\n\nThese may be any of the following:\n - `T` - Template bases\n - `B` - Sample barcode bases\n - `M` - Molecular barcode bases\n - `S` - Skip bases\n",
                "enum": ["T", "B", "S", "M"]
            
            
            }
    

        ,
                "undetermined_sample_name": {
                "type":
                "string",
                "description": "Type: `string`, example: `Undetermined`. The sample name for undetermined reads (reads that do not match an expected barcode)\n",
                "help_text": "Type: `string`, example: `Undetermined`. The sample name for undetermined reads (reads that do not match an expected barcode)\n"
            
            }
    

        ,
                "most_unmatched_to_output": {
                "type":
                "integer",
                "description": "Type: `integer`, example: `1000`. Output the most frequent \"unmatched\" barcodes up to this number",
                "help_text": "Type: `integer`, example: `1000`. Output the most frequent \"unmatched\" barcodes up to this number.\nIf set to 0 unmatched barcodes will not be collected, improving overall performance.\n"
            
            }
    

        ,
                "override_matcher": {
                "type":
                "string",
                "description": "Type: `string`, choices: ``cached-hamming-distance`, `pre-compute``. If the sample barcodes are \u003e 12 bp long, a cached hamming distance matcher is used",
                "help_text": "Type: `string`, choices: ``cached-hamming-distance`, `pre-compute``. If the sample barcodes are \u003e 12 bp long, a cached hamming distance matcher is used.\nIf the barcodes are less than or equal to 12 bp long, all possible matches are precomputed.\nThis option allows for overriding that heuristic.\n",
                "enum": ["cached-hamming-distance", "pre-compute"]
            
            
            }
    

        ,
                "skip_read_name_check": {
                "type":
                "boolean",
                "description": "Type: `boolean_true`, default: `false`. If this is true, then all the read names across FASTQs will not be enforced to be the same",
                "help_text": "Type: `boolean_true`, default: `false`. If this is true, then all the read names across FASTQs will not be enforced to be the same.\nThis may be useful when the read names are known to be the same and performance matters.\nRegardless, the first read name in each FASTQ will always be checked.\n"
            ,
                "default": "False"
            }
    

        ,
                "sample_barcode_in_fastq_header": {
                "type":
                "boolean",
                "description": "Type: `boolean_true`, default: `false`. If this is true, then the sample barcode is expected to be in the FASTQ read header",
                "help_text": "Type: `boolean_true`, default: `false`. If this is true, then the sample barcode is expected to be in the FASTQ read header.\nFor dual indexed data, the barcodes must be `+` (plus) delimited.  Additionally, if true,\nthen neither index FASTQ files nor sample barcode segments in the read structure may be specified.\n"
            ,
                "default": "False"
            }
    

        ,
                "metric_prefix": {
                "type":
                "string",
                "description": "Type: `string`. Prepend this prefix to all output metric file names\n",
                "help_text": "Type: `string`. Prepend this prefix to all output metric file names\n"
            
            }
    

        ,
                "lane": {
                "type":
                "string",
                "description": "Type: List of `integer`, multiple_sep: `\";\"`. Select a subset of lanes to demultiplex",
                "help_text": "Type: List of `integer`, multiple_sep: `\";\"`. Select a subset of lanes to demultiplex.  Will cause only samples and input FASTQs with\nthe given `Lane`(s) to be demultiplexed. Samples without a lane will be ignored, and\nFASTQs without lane information will be ignored\n"
            
            }
    

}
},
    
    
    "input" : {
    "title": "Input",
    "type": "object",
    "description": "No description",
    "properties": {
    
        
                "fastqs": {
                "type":
                "string",
                "description": "Type: List of `file`, required, example: `sample1_r1.fq;sample1_r2.fq;sample2_r1.fq;sample2_r2.fq`, multiple_sep: `\";\"`. Path to the input FASTQs, or path prefix if not a file",
                "help_text": "Type: List of `file`, required, example: `sample1_r1.fq;sample1_r2.fq;sample2_r1.fq;sample2_r2.fq`, multiple_sep: `\";\"`. Path to the input FASTQs, or path prefix if not a file"
            
            }
    

        ,
                "sample_metadata": {
                "type":
                "string",
                "description": "Type: `file`, required. Path to the sample metadata CSV file including sample names and barcode sequences",
                "help_text": "Type: `file`, required. Path to the sample metadata CSV file including sample names and barcode sequences"
            
            }
    

}
},
    
    
    "output" : {
    "title": "Output",
    "type": "object",
    "description": "No description",
    "properties": {
    
        
                "sample_fastq": {
                "type":
                "string",
                "description": "Type: `file`, required, default: `$id.$key.sample_fastq.sample_fastq`, example: `output`. The directory containing demultiplexed sample FASTQ files",
                "help_text": "Type: `file`, required, default: `$id.$key.sample_fastq.sample_fastq`, example: `output`. The directory containing demultiplexed sample FASTQ files."
            ,
                "default": "$id.$key.sample_fastq.sample_fastq"
            }
    

        ,
                "metrics": {
                "type":
                "string",
                "description": "Type: `file`, default: `$id.$key.metrics.tsv`, example: `metrics.tsv`. Demultiplexing summary statisitcs:\n  - control_reads_omitted: The number of reads that were omitted for being control reads",
                "help_text": "Type: `file`, default: `$id.$key.metrics.tsv`, example: `metrics.tsv`. Demultiplexing summary statisitcs:\n  - control_reads_omitted: The number of reads that were omitted for being control reads.\n  - failing_reads_omitted: The number of reads that were omitted for having failed QC.\n  - total_templates: The total number of template reads that were output.\n"
            ,
                "default": "$id.$key.metrics.tsv"
            }
    

        ,
                "most_frequent_unmatched": {
                "type":
                "string",
                "description": "Type: `file`, default: `$id.$key.most_frequent_unmatched.tsv`, example: `most_frequent_unmatched.tsv`. It contains the (approximate) counts of the most prevelant observed barcode sequences\nthat did not match to one of the expected barcodes",
                "help_text": "Type: `file`, default: `$id.$key.most_frequent_unmatched.tsv`, example: `most_frequent_unmatched.tsv`. It contains the (approximate) counts of the most prevelant observed barcode sequences\nthat did not match to one of the expected barcodes. Can only be created when \u0027most_unmatched_to_output\u0027\nis not set to 0.\n"
            ,
                "default": "$id.$key.most_frequent_unmatched.tsv"
            }
    

        ,
                "sample_barcode_hop_metrics": {
                "type":
                "string",
                "description": "Type: `file`, default: `$id.$key.sample_barcode_hop_metrics.tsv`, example: `sample_barcode_hop_metrics.tsv`. File containing the frequently observed barcodes that are unexpected\ncombinations of expected barcodes in a dual-indexed run",
                "help_text": "Type: `file`, default: `$id.$key.sample_barcode_hop_metrics.tsv`, example: `sample_barcode_hop_metrics.tsv`. File containing the frequently observed barcodes that are unexpected\ncombinations of expected barcodes in a dual-indexed run.\n"
            ,
                "default": "$id.$key.sample_barcode_hop_metrics.tsv"
            }
    

        ,
                "per_project_metrics": {
                "type":
                "string",
                "description": "Type: `file`, default: `$id.$key.per_project_metrics.tsv`, example: `per_project_metrics.tsv`. Aggregates the metrics by project (aggregates the metrics across samples with the same project) and\nhas the same columns as `--metrics`",
                "help_text": "Type: `file`, default: `$id.$key.per_project_metrics.tsv`, example: `per_project_metrics.tsv`. Aggregates the metrics by project (aggregates the metrics across samples with the same project) and\nhas the same columns as `--metrics`. In this case, sample_ID will contain the project name (or None if no project is given).\nTHe barcode will contain all Ns. The undetermined sample will not be aggregated with any other sample.\n"
            ,
                "default": "$id.$key.per_project_metrics.tsv"
            }
    

        ,
                "per_sample_metrics": {
                "type":
                "string",
                "description": "Type: `file`, default: `$id.$key.per_sample_metrics.tsv`, example: `per_sample_metrics.tsv`. Tab-separated file containing statistics per sample",
                "help_text": "Type: `file`, default: `$id.$key.per_sample_metrics.tsv`, example: `per_sample_metrics.tsv`. Tab-separated file containing statistics per sample.\n"
            ,
                "default": "$id.$key.per_sample_metrics.tsv"
            }
    

}
},
    
    
    "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": "Type: `string`, required, example: `output/`. Path to an output directory",
                "help_text": "Type: `string`, required, example: `output/`. Path to an output directory."
            
            }
    

        ,
                "param_list": {
                "type":
                "string",
                "description": "Type: `string`, example: `my_params.yaml`. Allows inputting multiple parameter sets to initialise a Nextflow channel",
                "help_text": "Type: `string`, example: `my_params.yaml`. Allows inputting multiple parameter sets to initialise a Nextflow channel. A `param_list` can either be a list of maps, a csv file, a json file, a yaml file, or simply a yaml blob.\n\n* A list of maps (as-is) where the keys of each map corresponds to the arguments of the pipeline. Example: in a `nextflow.config` file: `param_list: [ [\u0027id\u0027: \u0027foo\u0027, \u0027input\u0027: \u0027foo.txt\u0027], [\u0027id\u0027: \u0027bar\u0027, \u0027input\u0027: \u0027bar.txt\u0027] ]`.\n* A csv file should have column names which correspond to the different arguments of this pipeline. Example: `--param_list data.csv` with columns `id,input`.\n* A json or a yaml file should be a list of maps, each of which has keys corresponding to the arguments of the pipeline. Example: `--param_list data.json` with contents `[ {\u0027id\u0027: \u0027foo\u0027, \u0027input\u0027: \u0027foo.txt\u0027}, {\u0027id\u0027: \u0027bar\u0027, \u0027input\u0027: \u0027bar.txt\u0027} ]`.\n* A yaml blob can also be passed directly as a string. Example: `--param_list \"[ {\u0027id\u0027: \u0027foo\u0027, \u0027input\u0027: \u0027foo.txt\u0027}, {\u0027id\u0027: \u0027bar\u0027, \u0027input\u0027: \u0027bar.txt\u0027} ]\"`.\n\nWhen passing a csv, json or yaml file, relative path names are relativized to the location of the parameter file. No relativation is performed when `param_list` is a list of maps (as-is) or a yaml blob.",
                "hidden": true
            
            }
    

}
}
},
"allOf": [

    {
    "$ref": "#/definitions/arguments"
    },

    {
    "$ref": "#/definitions/input"
    },

    {
    "$ref": "#/definitions/output"
    },

    {
    "$ref": "#/definitions/nextflow input-output arguments"
    }
]
}
