From c55a854345b1d2f1b8f3f4dbd5a09e9fb5e2a122 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:45:52 -0500 Subject: [PATCH] feat: Add input schema --- assets/schema_input.json | 23 +++++++++++++++++++++++ nextflow_schema.json | 3 +-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 assets/schema_input.json diff --git a/assets/schema_input.json b/assets/schema_input.json new file mode 100644 index 0000000..80cf68b --- /dev/null +++ b/assets/schema_input.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://raw.githubusercontent.com/nf-core/taxprofiler/master/assets/schema_input.json", + "title": "haplotyper battle royale pipeline - params.input schema", + "description": "Schema for the file provided with params.input", + "type": "array", + "items": { + "type": "object", + "properties": { + "sample": { + "type": "string", + "pattern": "^\\S+$", + "errorMessage": "Sample name must be provided and cannot contain spaces" + }, + "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'" + } + }, + "required": ["sample", "fastq_1"] + } +} diff --git a/nextflow_schema.json b/nextflow_schema.json index d4c5c27..9871a3d 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -25,8 +25,7 @@ "reference": { "type": "string", "fa_icon": "fas fa-dna", - "description": "NCBI accession number of the reference genome to align reads against", - "pattern": "^[:upper:]{2}_[:digit:]{6}\\.[:digit:]+$" + "description": "NCBI accession number of the reference genome to align reads against" }, "outdir": { "type": "string",