Skip to content

Commit

Permalink
Fixing example sbgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
agbeltran committed Sep 5, 2016
1 parent 30afc02 commit abc307f
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 78 deletions.
14 changes: 7 additions & 7 deletions code/validate_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
from os.path import join


def validate_instance(filename, error_printing):
def validate_instance(path, filename, error_printing):
schemasPath = os.path.abspath("../json-schemas")
path = "../examples"
datasetSchema = json.load(open(join(schemasPath,"dataset_schema.json")))
instrumentSchema = json.load(open(join(schemasPath,"instrument_schema.json")))
resolver = RefResolver('file://'+schemasPath+'/'+"dataset_schema.json", datasetSchema) #, base_uri=schemasPath)
Expand All @@ -30,9 +29,10 @@ def validate_instance(filename, error_printing):
print("...done")


validate_instance("179.json", 2)
#validate_instance("ClinicalTrials.gov-NCT00001372.json", 2)
#validate_instance("PDB-5AEM.json", 2)
#validate_instance("Uniprot-P77967.json", 2)
#validate_instance("DBgap-phs000979.v1.p1.json", 2)
path = "../examples"
validate_instance(path, "SBGrid-179.json", 2)
#validate_instance(path, "ClinicalTrials.gov-NCT00001372.json", 2)
#validate_instance(path, "PDB-5AEM.json", 2)
#validate_instance(path, "Uniprot-P77967.json", 2)
#validate_instance(path, "DBgap-phs000979.v1.p1.json", 2)

70 changes: 0 additions & 70 deletions examples/179.json

This file was deleted.

128 changes: 128 additions & 0 deletions examples/SBGrid-179.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"identifiers":
[
{"identifier" : "10.15785/SBGRID/179","identifierSource" : "DOI"}
],
"title":"X-Ray Diffraction data from Nup37-Nup120 full-length complex from Schizosaccharomyces pombe, source of 4FHN structure",
"types":
[
{"information": {"value":"X-Ray Diffraction"} }
],
"isAbout": [ {"name": "Nup37-Nup120 full-length complex from Schizosaccharomyces pombe"} ],
"creators":
[
{"firstName":"Silvija", "lastName":"Bilokapic" },
{"firstName":"Thomas", "lastName":"Schwartz" }

],
"distributions":
[
{
"dates": [
{
"date": "2010-02-19",
"type": {
"value": "creation"
}
},
{
"date": "2015-10-06",
"type": {
"value": "publication date"
}
}
],
"access": {
"landingPage": "https://data.sbgrid.org/dataset/179",
"accessURL": "rsync://data.sbgrid.org/10.15785/SBGRID/179"
},
"storedIn":
{
"name": "Structural Biology Data Grid",
"identifiers": [
{
"identifier": "https://data.sbgrid.org",
"identifierSource": "HTTP"
},
{
"identifier": "https://www.biosharing.org/biodbcore-000683",
"identifierSource": "BioSharing"
}
]
}
},
{
"access": {
"landingPage": "https://data.sbgrid.org/dataset/179",
"accessURL": "rsync://sbgrid.icm.uu.se/10.15785/SBGRID/179"
},
"storedIn":
{
"name": "Structural Biology Data Grid",
"identifiers": [
{
"identifier": "https://data.sbgrid.org",
"identifierSource": "HTTP"
},
{
"identifier": "https://www.biosharing.org/biodbcore-000683",
"identifierSource": "BioSharing"
}
]
}
},
{
"access": {
"landingPage": "https://data.sbgrid.org/dataset/179",
"accessURL": "rsync://sbgrid.pasteur.edu.uy/10.15785/SBGRID/179"
},
"storedIn":
{
"name": "Structural Biology Data Grid",
"identifiers": [
{
"identifier": "https://data.sbgrid.org",
"identifierSource": "HTTP"
},
{
"identifier": "https://www.biosharing.org/biodbcore-000683",
"identifierSource": "BioSharing"
}
]
}
},
{
"access": {
"landingPage": "https://data.sbgrid.org/dataset/179",
"accessURL": "rsync://sbgrid.ncpss.org/10.15785/SBGRID/179"
},
"storedIn":
{
"name": "Structural Biology Data Grid",
"identifiers": [
{
"identifier": "https://data.sbgrid.org",
"identifierSource": "HTTP"
},
{
"identifier": "https://www.biosharing.org/biodbcore-000683",
"identifierSource": "BioSharing"
}
]
}
}
],
"relatedIdentifiers":
[
{"identifier":"10.15785/SBGRID/180","identifierSource":"DOI","relationType":"relatedTo"},
{"identifier":"10.1073/pnas.1205151109", "identifierSource":"DOI", "relationType":"isCitedBy"},
{"identifier":"4FHN", "identifierSource":"PDB", "relationType":"relatedTo"}
],
"extraProperties":
[
{
"category":"data_class",
"values": [ { "value": "experimental dataset" } ]
}
]
}
2 changes: 1 addition & 1 deletion json-schemas/dataset_distribution_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"$ref": "license_schema.json#"
}
},
"accessInformation" : {
"access" : {
"description": "The information about access modality for the dataset distribution.",
"$ref" : "access_schema.json#"
},
Expand Down

0 comments on commit abc307f

Please sign in to comment.