{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://raw.githubusercontent.com/nf-core/sarek/master/assets/schema_input.json",
    "title": "nf-core/sarek pipeline - params.input schema",
    "description": "Schema for the file provided with params.input",
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "patient": {
                "type": "string",
                "pattern": "^\\S+$",
                "errorMessage": "ID name must be provided and cannot contain spaces"
            },
            "sample": {
                "type": "string",
                "pattern": "^\\S+$",
                "errorMessage": "Sample name must be provided and cannot contain spaces"
            },
            "sex": {
                "errorMessage": "Sex cannot contain spaces",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "status": {
                "errorMessage": "Status can only be 0 or 1",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^(0|1)*$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "lane": {
                "errorMessage": "Lane cannot contain spaces",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "fastq_1": {
                "errorMessage": "FastQ file for reads 1 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
                    }
                ]
            },
            "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
                    }
                ]
            },
            "table": {
                "errorMessage": "Recalibration table cannot contain spaces and must have extension '.table'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+\\.table$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "cram": {
                "errorMessage": "CRAM file cannot contain spaces and must have extension '.cram'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+\\.cram$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "crai": {
                "errorMessage": "CRAM index file cannot contain spaces and must have extension '.crai'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+\\.crai$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "bam": {
                "errorMessage": "BAM file cannot contain spaces and must have extension '.bam'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+\\.bam$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "bai": {
                "errorMessage": "BAM index file cannot contain spaces and must have extension '.bai'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+\\.bai$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            },
            "vcf": {
                "errorMessage": "VCF file for reads 1 cannot contain spaces and must have extension '.vcf' or '.vcf.gz'",
                "anyOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+\\.vcf(\\.gz)?$"
                    },
                    {
                        "type": "string",
                        "maxLength": 0
                    }
                ]
            }
        },
        "required": ["patient", "sample"]
    }
}
