Skip to content

Commit

Permalink
Added test to validate BDbag-AGR-example.json and fixed the file
Browse files Browse the repository at this point in the history
  • Loading branch information
agbeltran committed Mar 22, 2018
1 parent ebbd22a commit 805562c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 22 deletions.
68 changes: 46 additions & 22 deletions json-instances/BDbag-AGR-example.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"identifiers": [{
"identifier": {
"identifier": "http://identifiers.org/minid:b9j69h",
"identifierSource": "minid"
}],
},
"title": "AGR Data set with identifier-based references to data in cloud storage",
"description": "AGR Data set with identifier-based references to data in cloud storage",
"dates": [{
Expand All @@ -13,10 +13,10 @@
}
}],
"creators": [{
"identifiers": [{
"identifier": {
"identifier": "http://orcid.org/0000-0003-2280-917X",
"identifierSource": "orcid"
}],
},
"affiliations": [{"name": "University of Southern California / Information Science"}],
"firstName": "Michel",
"fullName": "Mike d'Arcy",
Expand All @@ -25,18 +25,22 @@
"types": [{"information": {"value": "model organism data"}}],
"hasPart": [
{
"identifiers": [{
"identifier": {
"identifier": "minid:b9n39d",
"identifierSource": "minid"
}],
},
"title": "A list of disease ontology terms obtained from the Disease Ontology website.",
"types": [{"information": {"value": "ontology terms"}}],
"creators": [ {} ],
"distributions": [{
"identifier": {
"identifier": "minid:b9n39d",
"identifierSource": ""
},
"access": {"accessURL": "/data/DO/do_1.0.obo"},
"access": {
"accessURL": "/data/DO/do_1.0.obo",
"landingPage": ""
},
"conformsTo": [{
"name": "obo format",
"type": {
Expand All @@ -53,18 +57,22 @@
}]
},
{
"identifiers": [{
"identifier": {
"identifier": "minid:b9hd64",
"identifierSource": "minid"
}],
},
"title": "A list of gene ontology terms obtained from the Gene Ontology Consortium.",
"types": [{"information": {"value": "ontology terms"}}],
"creators": [ {} ],
"distributions": [{
"identifier": {
"identifier": "minid:b9hd64",
"identifierSource": ""
},
"access": {"accessURL": "data/GO/go_1.0.obo"},
"access": {
"accessURL": "data/GO/go_1.0.obo",
"landingPage": ""
},
"conformsTo": [{
"name": "obo format",
"type": {
Expand All @@ -81,12 +89,13 @@
}]
},
{
"identifiers": [{
"identifier": {
"identifier": "minid:b9px1z",
"identifierSource": "minid"
}],
},
"title": "A list of sequence ontology terms obtained from the Sequence Ontology website.",
"types": [{"information": {"value": "ontology terms"}}],
"creators": [ {} ],
"dates": [{
"date": "2.6.2018",
"type": {
Expand All @@ -99,7 +108,10 @@
"identifier": "minid:b9px1z",
"identifierSource": ""
},
"access": {"accessURL": "data/SO/so_1.0.obo"},
"access": {
"accessURL": "data/SO/so_1.0.obo",
"landingPage": ""
},
"conformsTo": [{
"name": "obo format",
"type": {
Expand All @@ -116,18 +128,22 @@
}]
},
{
"identifiers": [{
"identifier": {
"identifier": "minid:b9dm68",
"identifierSource": "minid"
}],
},
"title": "Flybase MOD data",
"types": [{"information": {"value": "MOD data"}}],
"creators": [ {} ],
"distributions": [{
"identifier": {
"identifier": "minid:b9dm68",
"identifierSource": ""
},
"access": {"accessURL": "data/FB_1.0.4_4.tar.gz"},
"access": {
"accessURL": "data/FB_1.0.4_4.tar.gz",
"landingPage": ""
},
"conformsTo": [{
"name": "tar.gz",
"type": {
Expand All @@ -144,18 +160,22 @@
}]
},
{
"identifiers": [{
"identifier": {
"identifier": "minid:b9cm3t",
"identifierSource": "minid"
}],
},
"title": "A list of gene ontology associations for Drosophila obtained from the Gene Ontology Consortium.",
"types": [{"information": {"value": "gene association data"}}],
"creators": [ {} ],
"distributions": [{
"identifier": {
"identifier": "minid:b9cm3t",
"identifierSource": ""
},
"access": {"accessURL": "data/GO/ANNOT/gene_association.fb.gz"},
"access": {
"accessURL": "data/GO/ANNOT/gene_association.fb.gz",
"landingPage": ""
},
"conformsTo": [{
"name": "tar.gz",
"type": {
Expand All @@ -172,18 +192,22 @@
}]
},
{
"identifiers": [{
"identifier": {
"identifier": "http://identifiers.org/minid:b9m393",
"identifierSource": "minid"
}],
},
"title": "JSON files containing orthology derived from DIOPT v6.2 http://www.flyrnai.org/cgi-bin/DRSC_orthologs.pl",
"types": [{"information": {"value": "orthology data"}}],
"creators": [ {} ],
"distributions": [{
"identifier": {
"identifier": "http://identifiers.org/minid:b9m393",
"identifierSource": "minid"
},
"access": {"accessURL": "data/ORTHO/orthology_FlyBase_1.0.0_2.json.tar.gz"},
"access": {
"accessURL": "data/ORTHO/orthology_FlyBase_1.0.0_2.json.tar.gz",
"landingPage": ""
},
"conformsTo": [
{
"name": "tar.gz",
Expand Down
3 changes: 3 additions & 0 deletions tests/test_dats_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def test_validate_instance(self):
folder_path = os.path.join(self.path, "datamed")
self.assertTrue(dats_model.validate_dataset(folder_path, "E-GEOD-70652-dats.json", 1))

def test_validate_dataset_10(self):
self.assertTrue(dats_model.validate_dataset(self.path, "BDbag-AGR-example.json", 1))




Expand Down

0 comments on commit 805562c

Please sign in to comment.