Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/igvfd/schemas/changelogs/measurement_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Minor changes since schema version 49

* Update `dbxrefs` regex to add `ENCODE` as a namespace.
* Extend `preferred_assay_titles` enum list to include `Parse TAP-seq`.

### Schema version 49
Expand Down
1 change: 1 addition & 0 deletions src/igvfd/schemas/changelogs/sequence_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Minor changes since schema version 16

* Update `dbxrefs` regex to add `ENCODE` as a namespace.
* Extend `collections` enum list to include `Cross-Disorder CNVs`.
* Extend `collections` enum list to include `Coronary Artery Disease`.
* Extend `collections` enum list to include `PD single cell multiomics`.
Expand Down
13 changes: 13 additions & 0 deletions src/igvfd/schemas/measurement_set.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,19 @@
"appscript": "10X Chromium Single Cell 5 prime v3",
"igvf_utils": "10X Chromium Single Cell 5 prime v3"
}
},
"dbxrefs": {
"comment": "Supported external resources include: GEO, MaveDB, ENCODE.",
"items": {
"title": "External identifier",
"description": "Identifier from an external resource that may have 1-to-1 or 1-to-many relationships with IGVF file sets.",
"type": "string",
"pattern": "^(GEO:GSE\\d+|urn:mavedb:\\d{8}-[0a-z]+-\\d+|ENCODE:ENCSR\\d{3}[A-Z]{3})$"
},
"submissionExample": {
"appscript": "[\"GEO:GSE5169185\", \"urn:mavedb:00001250-a-1\", \"ENCODE:ENCSR000AAA\"]",
"igvf_utils": "GEO:GSE5169185, urn:mavedb:00001250-a-1, ENCODE:ENCSR000AAA"
}
}
},
"fuzzy_searchable_fields": [
Expand Down
8 changes: 4 additions & 4 deletions src/igvfd/schemas/sequence_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,17 @@
}
},
"dbxrefs": {
"comment": "Supported external resources include: Sequence Read Archive (SRA).",
"comment": "Supported external resources include: Sequence Read Archive (SRA), ENCODE.",
"items": {
"title": "External identifier",
"description": "Identifier from an external resource that may have 1-to-1 or 1-to-many relationships with IGVF file objects.",
"type": "string",
"minItems": 1,
"pattern": "^(SRA:(SRR|SRX)\\d+)$"
"pattern": "^(SRA:(SRR|SRX)\\d+|ENCODE:ENCFF\\d{3}[A-Z]{3})$"
},
"submissionExample": {
"appscript": "[\"SRA:SRR1234\", \"SRA:SRX1234\"]",
"igvf_utils": "SRA:SRR1234, SRA:SRX1234"
"appscript": "[\"SRA:SRR1234\", \"SRA:SRX1234\", \"ENCODE:ENCFF000AAA\"]",
"igvf_utils": "SRA:SRR1234, SRA:SRX1234, ENCODE:ENCFF000AAA"
}
},
"flowcell_id": {
Expand Down
3 changes: 2 additions & 1 deletion src/igvfd/tests/data/inserts/measurement_set.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"https://www.protocols.io/private/test-protocols-url-12345"
],
"dbxrefs": [
"GEO:GSE187549"
"GEO:GSE187549",
"ENCODE:ENCSR000AAA"
],
"auxiliary_sets": [
"IGVFDS0001AUXI"
Expand Down
3 changes: 2 additions & 1 deletion src/igvfd/tests/data/inserts/sequence_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"file_size": 23940124,
"upload_status": "validated",
"dbxrefs": [
"SRA:SRR0000015"
"SRA:SRR0000015",
"ENCODE:ENCFF000AAA"
],
"file_set": "igvf:basic_analysis_set",
"sequencing_run": 12,
Expand Down
20 changes: 20 additions & 0 deletions src/igvfd/tests/test_schema_measurement_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,23 @@ def test_measurement_set_protocols_regex(measurement_set, testapp):
measurement_set['@id'],
{'protocols': ['https://www.protocols.io/view/123/ABC']})
assert res.status_code == 200


def test_measurement_set_dbxrefs_regex(measurement_set, testapp):
res = testapp.patch_json(
measurement_set['@id'],
{'dbxrefs': ['not_a_valid_dbxref']},
expect_errors=True
)
assert res.status_code == 422
res = testapp.patch_json(
measurement_set['@id'],
{'dbxrefs': ['ENCODE:ENCFF000AAA']},
expect_errors=True
)
assert res.status_code == 422
res = testapp.patch_json(
measurement_set['@id'],
{'dbxrefs': ['GEO:GSE187549', 'urn:mavedb:00001250-a-1', 'ENCODE:ENCSR000AAA']}
)
assert res.status_code == 200
13 changes: 13 additions & 0 deletions src/igvfd/tests/test_schema_sequence_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ def test_sequence_file_dbxrefs_regex(testapp, sequence_file):
)
assert res.status_code == 200

res = testapp.patch_json(
sequence_file['@id'],
{'dbxrefs': ['ENCODE:ENCSR000AAA']},
expect_errors=True
)
assert res.status_code == 422

res = testapp.patch_json(
sequence_file['@id'],
{'dbxrefs': ['ENCODE:ENCFF000AAA']}
)
assert res.status_code == 200


def test_sequence_file_sequencing_run_uniqueness(
testapp,
Expand Down