Skip to content

Commit

Permalink
Update schema regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
nictru committed Oct 17, 2024
1 parent 7ca5938 commit 30042f0
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 33 deletions.
29 changes: 19 additions & 10 deletions assets/schema_counts_design.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -33,6 +39,9 @@
"errorMessage": "Counts file must be a .csv or .txt file"
}
},
"required": ["sample", "condition"]
"required": [
"sample",
"condition"
]
}
}
43 changes: 30 additions & 13 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
]
}
}
32 changes: 22 additions & 10 deletions assets/schema_input_bam.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
]
}
}

0 comments on commit 30042f0

Please sign in to comment.