{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://raw.githubusercontent.com/nf-core/pixelator/master/assets/schema_input.json",
    "title": "nf-core/pixelator pipeline - params.input schema",
    "description": "Schema for the file provided with params.input",
    "type": "array",
    "items": {
        "type": "object",
        "required": ["sample", "design", "fastq_1"],
        "properties": {
            "sample": {
                "type": "string",
                "pattern": "^\\S+$",
                "errorMessage": "Sample name must be provided and cannot contain spaces",
                "meta": ["id"]
            },
            "design": {
                "type": "string",
                "meta": ["design"],
                "errorMessage": "Design must be specified"
            },
            "panel": {
                "errorMessage": "Panel name must be specified",
                "type": "string",
                "meta": ["panel"]
            },
            "panel_file": {
                "errorMessage": "Panel file must either be left empty or cannot contain spaces and must have extension '.csv', '.tsv' or '.yaml'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+.(csv|tsv|ya?ml)$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "fastq_1": {
                "type": "string",
                "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'"
            },
            "fastq_2": {
                "errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+\\.f(ast)?q\\.gz$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            }
        }
    }
}
