Last active
September 5, 2019 16:42
-
-
Save labra/9a3c0f13a2d684bd72271cfbbefff4ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": { | |
"schema": "http://schema.org/", | |
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", | |
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | |
"bts": "http://discovery.biothings.io/bts/" | |
}, | |
"@graph": [{ | |
"@id": "bts:CTSADataset", | |
"@type": "rdfs:Class", | |
"rdfs:comment": "A schema describing Dataset from CTSA center", | |
"rdfs:label": "CTSADataset", | |
"rdfs:subClassOf": { | |
"@id": "schema:Dataset" | |
}, | |
"$validation": { | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"name": { | |
"$comment": "the starting of inherented fields from schema:Dataset", | |
"description": "The name of the CTSA Dataset", | |
"type": "string" | |
}, | |
"description": { | |
"description": "A description of the CTSA Dataset", | |
"type": "string" | |
}, | |
"url": { | |
"description": "URL of the Dataset page if available.", | |
"type": "string", | |
"format": "uri" | |
}, | |
"sameAs": { | |
"description": "URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.", | |
"type": "uri" | |
}, | |
"keywords": { | |
"description": "Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.", | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"datePublished": { | |
"description": "Date of first publication of this dataset.", | |
"oneOf": [{ | |
"type": "string", | |
"format": "date-time" | |
}, | |
{ | |
"type": "string", | |
"format": "date" | |
} | |
] | |
}, | |
"dateModified": { | |
"description": "The date on which the dataset was most recently modified.", | |
"oneOf": [{ | |
"type": "string", | |
"format": "date-time" | |
}, | |
{ | |
"type": "string", | |
"format": "date" | |
} | |
] | |
}, | |
"version": { | |
"description": "The version of the dataset.", | |
"type": "string" | |
}, | |
"identifier": { | |
"description": "The identifier of the dataset if available, e.g. ID from repositories GEO, EGA.", | |
"type": "string" | |
}, | |
"measurementTechnique": { | |
"description": "The technique or method used to produce the Dataset.", | |
"enum": [ | |
"whole-genome sequencing", | |
"whole-exome sequencing", | |
"mass spectrum" | |
] | |
}, | |
"creator": { | |
"description": "The creater (often the primary contact) of this dataset.", | |
"$ref": "#/definitions/person" | |
}, | |
"contributor": { | |
"description": "The other contributor(s) of this dataset, besides the creator", | |
"oneOf": [{ | |
"$ref": "#/definitions/person" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/person" | |
} | |
} | |
] | |
}, | |
"publisher": { | |
"description": "The organization publish this dataset, usually the host institute.", | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"url": { | |
"type": "string", | |
"format": "uri" | |
} | |
}, | |
"required": ["name"] | |
}, | |
"license": { | |
"description": "Specify the data access license", | |
"type": "object", | |
"properties": { | |
"text": { | |
"type": "string" | |
}, | |
"url": { | |
"type": "string", | |
"format": "uri" | |
} | |
}, | |
"required": ["url"] | |
}, | |
"citation": { | |
"description": "The citation of this dataset.", | |
"type": "object", | |
"properties": { | |
"text": { | |
"type": "string" | |
}, | |
"url": { | |
"type": "string", | |
"format": "uri" | |
}, | |
"identifier": { | |
"type": "string", | |
"description": "use PubMed id here" | |
} | |
}, | |
"required": ["text"] | |
}, | |
"samples": { | |
"description": "sample info of this dataset." | |
}, | |
"funder": { | |
"description": "funder info of this dataset." | |
}, | |
"includedInDataCatalog": { | |
"description": "This is a fixed CTSA DataCatalog.", | |
"type": "object", | |
"properties": { | |
"name": { | |
"const": "CTSA Datasets" | |
}, | |
"url": { | |
"const": "https://ctsa.ncats.nih.gov/cd2h/" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"description", | |
"creator", | |
"publisher", | |
"identifier" | |
], | |
"definitions": { | |
"person": { | |
"description": "Reusable person definition", | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"url": { | |
"type": "string", | |
"format": "uri" | |
} | |
}, | |
"required": ["name"] | |
} | |
} | |
} | |
}, | |
{ | |
"@id": "bts:samples", | |
"@type": "rdf:Property", | |
"rdfs:comment": "Sample information including size, organism, tissus, etc.", | |
"rdfs:label": "samples", | |
"schema:domainIncludes": { | |
"@id": "bts:CTSADataset" | |
}, | |
"schema:rangeIncludes": { | |
"@id": "bts:DataSamples" | |
} | |
}, | |
{ | |
"@id": "bts:funder", | |
"@type": "rdf:Property", | |
"rdfs:comment": "Funder information", | |
"rdfs:label": "funder", | |
"schema:domainIncludes": { | |
"@id": "bts:CTSADataset" | |
}, | |
"schema:rangeIncludes": { | |
"@id": "bts:BioMedicalGrant" | |
} | |
}, | |
{ | |
"@id": "bts:DataSamples", | |
"@type": "rdfs:Class", | |
"rdfs:comment": "Sample information including size, organism, tissue, etc.", | |
"rdfs:label": "DataSamples", | |
"rdfs:subClassOf": { | |
"@id": "schema:Thing" | |
}, | |
"$validation": { | |
"type": "object", | |
"properties": { | |
"size": { | |
"description": "the number of samples", | |
"type": "integer", | |
"minimum": 1 | |
}, | |
"organism": { | |
"description": "the organism of samples come from", | |
"oneOf": [{ | |
"type": "string" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
] | |
}, | |
"tissue": { | |
"description": "the tissue of samples come from", | |
"oneOf": [{ | |
"type": "string" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"@id": "bts:size", | |
"@type": "rdf:Property", | |
"rdfs:comment": "Sample size", | |
"rdfs:label": "size", | |
"schema:domainIncludes": { | |
"@id": "bts:DataSamples" | |
}, | |
"schema:rangeIncludes": { | |
"@id": "schema:Integer" | |
} | |
}, | |
{ | |
"@id": "bts:organism", | |
"@type": "rdf:Property", | |
"rdfs:comment": "Sample organism", | |
"rdfs:label": "organism", | |
"schema:domainIncludes": { | |
"@id": "bts:DataSamples" | |
}, | |
"schema:rangeIncludes": { | |
"@id": "schema:Text" | |
} | |
}, | |
{ | |
"@id": "bts:tissue", | |
"@type": "rdf:Property", | |
"rdfs:comment": "Sample tissue", | |
"rdfs:label": "tissue", | |
"schema:domainIncludes": { | |
"@id": "bts:DataSamples" | |
}, | |
"schema:rangeIncludes": { | |
"@id": "schema:Text" | |
} | |
}, | |
{ | |
"@id": "bts:BioMedicalGrant", | |
"@type": "rdfs:Class", | |
"rdfs:comment": "BioMedical Grant information, typically from NIH or NSF", | |
"rdfs:label": "BioMedicalGrant", | |
"rdfs:subClassOf": { | |
"@id": "schema:Grant" | |
}, | |
"$validation": { | |
"type": "object", | |
"properties": { | |
"identifier": { | |
"description": "the grant identifier, grant number or FAIN", | |
"type": "string" | |
}, | |
"institute": { | |
"description": "The name of the funding institute, e.g. NIH or NSF", | |
"oneOf": [{ | |
"type": "string" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
] | |
}, | |
"agency": { | |
"description": "The agency under the funding institute, e.g. NCATS, NHGRI, NCI etc.", | |
"oneOf": [{ | |
"type": "string" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
{ | |
"@id": "bts:institute", | |
"@type": "rdf:Property", | |
"rdfs:comment": "The name of the funding institute, e.g. NIH or NSF", | |
"rdfs:label": "institute", | |
"schema:domainIncludes": { | |
"@id": "bts:BioMedicalGrant" | |
}, | |
"schema:rangeIncludes": { | |
"@id": "schema:Text" | |
} | |
}, | |
{ | |
"@id": "bts:agency", | |
"@type": "rdf:Property", | |
"rdfs:comment": "The agency under the funding institute, e.g. NCATS, NHGRI, NCI etc.", | |
"rdfs:label": "agency", | |
"schema:domainIncludes": { | |
"@id": "bts:BioMedicalGrant" | |
}, | |
"schema:rangeIncludes": { | |
"@id": "schema:Text" | |
} | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prefix schema: <http://schema.org/> | |
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
prefix bts: <http://discovery.biothings.io/bts/> | |
prefix xsd: <http://www.w3.org/2001/XMLSchema#> | |
prefix dct: <http://purl.org/dc/terms/> | |
bts:CTSADatasetShape { | |
schema:name xsd:string // dct:description "The name of the CTSA Dataset" ; | |
schema:description xsd:string // dct:description "A description of the CTSA Dataset" ; | |
schema:url IRI | |
; | |
schema:sameAs IRI* ; | |
schema:keywords xsd:string * ; | |
schema:datePublished schema:Date ; | |
schema:dateModified schema:Date or schema:DateTime ; | |
schema:citation @bts:Citation ; | |
schema:version xsd:string ; | |
schema:identifier xsd:string ; | |
schema:measurementTechnique [ | |
"whole-genome sequencing" | |
"whole-exome sequencing" | |
"mass spectrum" | |
] ; | |
schema:creator @bts:Person * ; | |
schema:contributor @bts:Person * ; | |
schema:publisher @bts:Publisher ; | |
schema:license . ? ; # TODO | |
schema:citation . *; # TODO | |
schema:samples . * ; # TODO | |
schema:funder . ?; # TODO | |
schema:includedInDataCatalog @bts:Catalog | |
} | |
bts:Person { | |
schema:name xsd:string ; | |
schema:url IRI | |
} // dct:description "Reusable person definition" | |
bts:Publisher { | |
schema:name xsd:string ; | |
schema:url IRI | |
} | |
bts:Citation { | |
schema:identifier . | |
} | |
bts:Catalog { | |
schema:name [ "CTSA Datasets" ] ; | |
schema:url [ <https://ctsa.ncats.nih.gov/cd2h/> ] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type" : "Schema", | |
"@context" : "http://www.w3.org/ns/shex.jsonld", | |
"shapes" : [ | |
{ | |
"type" : "Shape", | |
"id" : "http://discovery.biothings.io/bts/CTSADatasetShape", | |
"expression" : { | |
"type" : "EachOf", | |
"expressions" : [ | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/name", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://www.w3.org/2001/XMLSchema#string" | |
}, | |
"annotations" : [ | |
{ | |
"type" : "Annotation", | |
"predicate" : "http://purl.org/dc/terms/description", | |
"object" : { | |
"value" : "The name of the CTSA Dataset" | |
} | |
} | |
] | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/description", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://www.w3.org/2001/XMLSchema#string" | |
}, | |
"annotations" : [ | |
{ | |
"type" : "Annotation", | |
"predicate" : "http://purl.org/dc/terms/description", | |
"object" : { | |
"value" : "A description of the CTSA Dataset" | |
} | |
} | |
] | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/url", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"nodeKind" : "iri" | |
} | |
}, | |
{ | |
"predicate" : "http://schema.org/sameAs", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"nodeKind" : "iri" | |
}, | |
"min" : 0, | |
"max" : -1, | |
"type" : "TripleConstraint" | |
}, | |
{ | |
"predicate" : "http://schema.org/keywords", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://www.w3.org/2001/XMLSchema#string" | |
}, | |
"min" : 0, | |
"max" : -1, | |
"type" : "TripleConstraint" | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/datePublished", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://schema.org/Date" | |
} | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/dateModified", | |
"valueExpr" : { | |
"type" : "ShapeOr", | |
"shapeExprs" : [ | |
{ | |
"type" : "NodeConstraint", | |
"datatype" : "http://schema.org/Date" | |
}, | |
{ | |
"type" : "NodeConstraint", | |
"datatype" : "http://schema.org/DateTime" | |
} | |
] | |
} | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/citation", | |
"valueExpr" : "http://discovery.biothings.io/bts/Citation" | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/version", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://www.w3.org/2001/XMLSchema#string" | |
} | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/identifier", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://www.w3.org/2001/XMLSchema#string" | |
} | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/measurementTechnique", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"values" : [ | |
{ | |
"value" : "whole-genome sequencing" | |
}, | |
{ | |
"value" : "whole-exome sequencing" | |
}, | |
{ | |
"value" : "mass spectrum" | |
} | |
] | |
} | |
}, | |
{ | |
"predicate" : "http://schema.org/creator", | |
"valueExpr" : "http://discovery.biothings.io/bts/Person", | |
"min" : 0, | |
"max" : -1, | |
"type" : "TripleConstraint" | |
}, | |
{ | |
"predicate" : "http://schema.org/contributor", | |
"valueExpr" : "http://discovery.biothings.io/bts/Person", | |
"min" : 0, | |
"max" : -1, | |
"type" : "TripleConstraint" | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/publisher", | |
"valueExpr" : "http://discovery.biothings.io/bts/Publisher" | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/license", | |
"min" : 0, | |
"max" : 1 | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/citation", | |
"min" : 0, | |
"max" : -1 | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/samples", | |
"min" : 0, | |
"max" : -1 | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/funder", | |
"min" : 0, | |
"max" : 1 | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/includedInDataCatalog", | |
"valueExpr" : "http://discovery.biothings.io/bts/Catalog" | |
} | |
] | |
} | |
}, | |
{ | |
"type" : "Shape", | |
"id" : "http://discovery.biothings.io/bts/Person", | |
"expression" : { | |
"type" : "EachOf", | |
"expressions" : [ | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/name", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://www.w3.org/2001/XMLSchema#string" | |
} | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/url", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"nodeKind" : "iri" | |
} | |
} | |
] | |
}, | |
"annotations" : [ | |
{ | |
"type" : "Annotation", | |
"predicate" : "http://purl.org/dc/terms/description", | |
"object" : { | |
"value" : "Reusable person definition" | |
} | |
} | |
] | |
}, | |
{ | |
"type" : "Shape", | |
"id" : "http://discovery.biothings.io/bts/Publisher", | |
"expression" : { | |
"type" : "EachOf", | |
"expressions" : [ | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/name", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"datatype" : "http://www.w3.org/2001/XMLSchema#string" | |
} | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/url", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"nodeKind" : "iri" | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"type" : "Shape", | |
"id" : "http://discovery.biothings.io/bts/Citation", | |
"expression" : { | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/identifier" | |
} | |
}, | |
{ | |
"type" : "Shape", | |
"id" : "http://discovery.biothings.io/bts/Catalog", | |
"expression" : { | |
"type" : "EachOf", | |
"expressions" : [ | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/name", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"values" : [ | |
{ | |
"value" : "CTSA Datasets" | |
} | |
] | |
} | |
}, | |
{ | |
"type" : "TripleConstraint", | |
"predicate" : "http://schema.org/url", | |
"valueExpr" : { | |
"type" : "NodeConstraint", | |
"values" : [ | |
"https://ctsa.ncats.nih.gov/cd2h/" | |
] | |
} | |
} | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment