Skip to content

Commit

Permalink
Added ExperimentHub as a possible data source, for ETL purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Dec 19, 2023
1 parent 5f55273 commit b05a48e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion schemas/bioconductor.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"provider": {
"type": "string",
"description": "Name of the data provider.",
"enum": [ "GEO", "SRA", "ArrayExpress", "PubMed", "DOI", "other" ]
"enum": [ "GEO", "SRA", "ArrayExpress", "PubMed", "ExperimentHub", "DOI", "other" ]
},
"id": {
"type": "string",
Expand All @@ -91,6 +91,10 @@
"if": { "properties": { "provider": { "const": "PubMed" } } },
"then": { "properties": { "id": { "type": "string", "pattern": "^[1-9][0-9]+$" } } }
},
{
"if": { "properties": { "provider": { "const": "ExperimentHub" } } },
"then": { "properties": { "id": { "type": "string", "pattern": "^EH[0-9]+$" } } }
},
{
"if": { "properties": { "provider": { "const": "DOI" } } },
"then": { "properties": { "id": { "type": "string", "pattern": "^[a-zA-Z0-9\\.]+/[a-zA-Z0-9\\.]+$" } } }
Expand Down
3 changes: 3 additions & 0 deletions tests/schemas/bioconductor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ test("Bioconductor schema behaves as expected", () => {
{ provider: "ArrayExpress", id: "E-MTAB-12345" },
{ provider: "PubMed", id: "12332423" },
{ provider: "DOI", id: "123.13/231.23" },
{ provider: "ExperimentHub", id: "EH12345" },
{ provider: "other", id: "https://123213.com" }
],
maintainer_name: "Aaron Lun",
Expand Down Expand Up @@ -93,6 +94,8 @@ test("Bioconductor schema behaves as expected", () => {
expect(() => validate(obj)).toThrow("pattern");
obj.sources = [{ provider: "PubMed", id: "foo" }];
expect(() => validate(obj)).toThrow("pattern");
obj.sources = [{ provider: "ExperimentHub", id: "foo" }];
expect(() => validate(obj)).toThrow("pattern");
obj.sources = [{ provider: "DOI", id: "foo" }];
expect(() => validate(obj)).toThrow("pattern");
obj.sources = [{ provider: "other", id: "foo" }];
Expand Down

0 comments on commit b05a48e

Please sign in to comment.