Skip to content
Snippets Groups Projects
Commit c3075c4b authored by van den Berg's avatar van den Berg
Browse files

Add schema's that are valid, but make no sense

Also increase the minimum number of files to 2, since a single file can
never be a valid readgroup.
parent 22290661
No related branches found
No related tags found
No related merge requests found
......@@ -3,14 +3,17 @@
{
"md5": "c3875788d22baa678c87c8f903cb2350",
"filename": "sample1_R1.fastq.gz",
"sample_name": "sample4"
"sample_name": "sample4",
"tags": {
"readtype": "forward"
}
},
{
"md5": "74cedbb88402dd16a6b4f96e5440fdfd",
"filename": "sample1_R2.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "umi-dinges"
"readtype": "umi"
}
},
{
......
{
"files": [
{
"md5": "c3875788d22baa678c87c8f903cb2350",
"filename": "sample1_R1.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "forward",
"readgroup": "rg1"
}
}
],
"sample_group": {
"samples": [
{
"sample_name": "sample4"
}
],
"group_name": "samplegroup4"
},
"run_name": "runname4",
"title": "Test for file tags in runs endpoint"
}
- name: test-missing_readgroup
command: jsonschema -i test/invalid-instances/missing_readgroup.json transfer_schema.json
exit_code: 1
stderr:
contains:
- "'readgroup' is a required property"
- name: test-emtpy-file
command: jsonschema -i test/invalid-instances/empty.json transfer_schema.json
......@@ -11,3 +14,11 @@
- "'sample_group' is a required property"
- "'run_name' is a required property"
- "'files' is a required property"
- name: test single file
command: jsonschema -i test/invalid-instances/one_file.json transfer_schema.json
exit_code: 1
stderr:
contains:
- "is too short"
- name: test incomplete readgroups
command: jsonschema -i test/valid-but-wrong-instances/incomplete_readgroup.json transfer_schema.json
exit_code: 0
- name: test-read_with_umi
command: jsonschema -i test/valid-instances/with_umi.json transfer_schema.json
exit_code: 0
{
"files": [
{
"md5": "c3875788d22baa678c87c8f903cb2350",
"filename": "sample1_R1.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "forward",
"readgroup": "rg1"
}
},
{
"md5": "74cedbb88402dd16a6b4f96e5440fdfd",
"filename": "sample1_R2.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "umi",
"readgroup": "rg2"
}
},
{
"md5": "617e686e88c06ad1d7319f606ebcbfc5",
"filename": "sample1_R3.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "reverse",
"readgroup": "rg3"
}
}
],
"sample_group": {
"samples": [
{
"sample_name": "sample4"
}
],
"group_name": "samplegroup4"
},
"run_name": "runname4",
"title": "Test for file tags in runs endpoint"
}
{
"files": [
{
"md5": "c3875788d22baa678c87c8f903cb2350",
"filename": "sample1_R1.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "forward",
"readgroup": "rg1"
}
}
],
"sample_group": {
"samples": [
{
"sample_name": "sample4"
}
],
"group_name": "samplegroup4"
},
"run_name": "runname4",
"title": "Test for file tags in runs endpoint"
}
{
"files": [
{
"md5": "c3875788d22baa678c87c8f903cb2350",
"filename": "sample1_R1.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "forward",
"readgroup": "rg1"
}
},
{
"md5": "74cedbb88402dd16a6b4f96e5440fdfd",
"filename": "sample1_R2.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "umi",
"readgroup": "rg1"
}
},
{
"md5": "617e686e88c06ad1d7319f606ebcbfc5",
"filename": "sample1_R3.fastq.gz",
"sample_name": "sample4",
"tags": {
"readtype": "reverse",
"readgroup": "rg1"
}
}
],
"sample_group": {
"samples": [
{
"sample_name": "sample4"
}
],
"group_name": "samplegroup4"
},
"run_name": "runname4",
"title": "Test for file tags in runs endpoint"
}
......@@ -24,6 +24,9 @@
"reverse",
"umi"
]
},
"readgroup": {
"$ref": "#/definitions/Name"
}
}
},
......@@ -170,9 +173,9 @@
"additionalProperties": false,
"properties": {
"files": {
"description": "An array of one or more Files",
"description": "An array of two or more Files",
"type": "array",
"minItems": 1,
"minItems": 2,
"uniqueItems": true,
"items": {
"$ref": "#/definitions/File"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment