diff --git a/assets/schema_counts_design.json b/assets/schema_counts_design.json index 081b6d7..2caca7b 100644 --- a/assets/schema_counts_design.json +++ b/assets/schema_counts_design.json @@ -9,21 +9,27 @@ "properties": { "sample": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Sample name must be provided and cannot contain spaces", - "meta": ["id"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Sample name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "id" + ] }, "condition": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Condition name must be provided and cannot contain spaces", - "meta": ["condition"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Condition name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "condition" + ] }, "batch": { - "type": "string", - "pattern": "^\\S+$", + "type": ["string", "integer"], + "pattern": "^[a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", "errorMessage": "Batch identifier cannot contain spaces", - "meta": ["batch"] + "meta": [ + "batch" + ] }, "counts_file": { "type": "string", @@ -33,6 +39,9 @@ "errorMessage": "Counts file must be a .csv or .txt file" } }, - "required": ["sample", "condition"] + "required": [ + "sample", + "condition" + ] } } diff --git a/assets/schema_input.json b/assets/schema_input.json index b5ff417..da4782a 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -9,21 +9,27 @@ "properties": { "sample": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Sample name must be provided and cannot contain spaces", - "meta": ["id"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Sample name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "id" + ] }, "condition": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Condition name must be provided and cannot contain spaces", - "meta": ["condition"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Condition name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "condition" + ] }, "assay": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Assay name must be provided and cannot contain spaces", - "meta": ["assay"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Assay name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "assay" + ] }, "peak_file": { "type": "string", @@ -36,22 +42,33 @@ "type": "boolean", "default": true, "errorMessage": "footprinting must be a boolean value", - "meta": ["footprinting"] + "meta": [ + "footprinting" + ] }, "include_original": { "type": "boolean", "default": true, "errorMessage": "include_original must be a boolean value", - "meta": ["include_original"] + "meta": [ + "include_original" + ] }, "max_peak_gap": { "type": "integer", "default": 500, "minimum": 0, "errorMessage": "max_peak_gap must be a positive integer", - "meta": ["max_peak_gap"] + "meta": [ + "max_peak_gap" + ] } }, - "required": ["sample", "condition", "assay", "peak_file"] + "required": [ + "sample", + "condition", + "assay", + "peak_file" + ] } } diff --git a/assets/schema_input_bam.json b/assets/schema_input_bam.json index 9b0f569..cf44fd0 100644 --- a/assets/schema_input_bam.json +++ b/assets/schema_input_bam.json @@ -9,21 +9,27 @@ "properties": { "sample": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Sample name must be provided and cannot contain spaces", - "meta": ["id"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Sample name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "id" + ] }, "condition": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Condition name must be provided and cannot contain spaces", - "meta": ["condition"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Condition name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "condition" + ] }, "assay": { "type": "string", - "pattern": "^\\S+$", - "errorMessage": "Assay name must be provided and cannot contain spaces", - "meta": ["assay"] + "pattern": "^[a-zA-Z][a-zA-Z0-9]*(?:[-_][a-zA-Z0-9]+)*$", + "errorMessage": "Assay name must be provided, has to start with a letter, and cannot contain spaces", + "meta": [ + "assay" + ] }, "signal": { "type": "string", @@ -40,6 +46,12 @@ "errorMessage": "Control file must be provided and must be a .bam file" } }, - "required": ["sample", "condition", "assay", "signal", "control"] + "required": [ + "sample", + "condition", + "assay", + "signal", + "control" + ] } }