{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://raw.githubusercontent.com/nf-core/ampliseq/master/assets/schema_input.json",
    "title": "nf-core/ampliseq pipeline - params.input schema",
    "description": "Schema for the file provided with params.input",
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "sampleID": {
                "type": "string",
                "pattern": "^[a-zA-Z][a-zA-Z0-9_]+$",
                "errorMessage": "Unique sample ID must be provided: Must start with a letter, and can only contain letters, numbers or underscores; Regex: '^[a-zA-Z][a-zA-Z0-9_]+$'",
                "meta": ["sample"]
            },
            "forwardReads": {
                "type": "string",
                "format": "file-path",
                "exists": true,
                "pattern": "^\\S+\\.f(ast)?q\\.gz$",
                "errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
            },
            "reverseReads": {
                "type": "string",
                "format": "file-path",
                "exists": true,
                "pattern": "^\\S+\\.f(ast)?q\\.gz$",
                "errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'"
            },
            "run": {
                "type": "string",
                "pattern": "^\\S+$",
                "errorMessage": "Run name cannot contain spaces",
                "meta": ["run"],
                "default": "1"
            }
        },
        "required": ["sampleID", "forwardReads"]
    },
    "uniqueEntries": ["sampleID"]
}
