From 7f9b859c190dbf77a155a600fa83d1a2a90978e4 Mon Sep 17 00:00:00 2001 From: cmdoret Date: Thu, 3 Oct 2024 20:28:32 +0200 Subject: [PATCH 1/6] feat: add data entity for mass spectrometry --- src/modos_schema/schema/modos_schema.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/modos_schema/schema/modos_schema.yaml b/src/modos_schema/schema/modos_schema.yaml index a284d6c..bed2891 100644 --- a/src/modos_schema/schema/modos_schema.yaml +++ b/src/modos_schema/schema/modos_schema.yaml @@ -62,6 +62,7 @@ classes: - has_sample - has_data - omics_type + - has_sample_processing Sample: is_a: NamedThing @@ -120,6 +121,10 @@ classes: is_a: DataEntity description: A data entity consisting of genomic variants relative to a reference. + MassSpectrometryResults: + is_a: DataEntity + description: A data entity consisting of quantitative results from a mass spectrometry experiment. + Array: is_a: DataEntity description: Data entity consisting of an N-dimensional array. @@ -186,6 +191,14 @@ slots: is_a: has_part description: Data entity included in a given collection. range: DataEntity + has_sample_processing: + description: | + Codes describing sample processing, preparation or handling steps. + The order of the codes should reflect the order in which the steps were performed. + Should be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)]. + multivalued: true + list_elements_ordered: true + range: uriorcurie has_sequence: is_a: has_part description: Denotes that a sequence belongs to a collection (e.g. a reference genome). @@ -200,8 +213,7 @@ slots: required: true taxon_id: description: | - The NCBI taxon code describing the taxonomic range of a sample. - See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html) + The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. range: uriorcurie multivalued: true collector: @@ -240,8 +252,7 @@ slots: source_material: description: | The biological source from which the sample was isolated (tissue, organ). - Should be a tissue or organ code URI from the UBERON ontology. - See: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon) + Should be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) ontology or [fairgenomes biospecimen types](https://raw.githubusercontent.com/fairgenomes/fairgenomes-semantic-model/refs/tags/v1.2/generated/ontology/fair-genomes-biospecimentypes.ttl). range: uriorcurie sex: description: The biological sex of a sample. @@ -292,3 +303,6 @@ enums: BCF: description: Binary call format, for efficient storage of sequence variation. meaning: EDAM:format_3020 + mzTab: + description: tab-delimited format for mass spectrometry-based proteomics and metabolomics results. + meaning: EDAM:format_3681 From 10a596790d56b5c4726e59daf0e2ca5f4a1d2941 Mon Sep 17 00:00:00 2001 From: cmdoret Date: Fri, 4 Oct 2024 16:27:39 +0200 Subject: [PATCH 2/6] chore: regen --- project/graphql/modos_schema.graphql | 12 +++ project/jsonld/modos_schema.context.jsonld | 7 ++ project/jsonld/modos_schema.jsonld | 46 ++++++++++- project/jsonschema/modos_schema.schema.json | 61 +++++++++++++- project/owl/modos_schema.owl.ttl | 92 ++++++++++++++++++--- project/protobuf/modos_schema.proto | 12 +++ project/shacl/modos_schema.shacl.ttl | 47 +++++++---- project/shex/modos_schema.shex | 15 +++- project/sqlschema/modos_schema.sql | 49 ++++++++++- src/modos_schema/datamodel/modos_schema.py | 16 ++++ 10 files changed, 318 insertions(+), 39 deletions(-) diff --git a/project/graphql/modos_schema.graphql b/project/graphql/modos_schema.graphql index ac90f09..d2a2158 100644 --- a/project/graphql/modos_schema.graphql +++ b/project/graphql/modos_schema.graphql @@ -29,6 +29,7 @@ type Assay hasSample: [Sample] hasData: [DataEntity] omicsType: [OmicsType]! + hasSampleProcessing: [Uriorcurie] } type DataEntity @@ -42,6 +43,17 @@ type DataEntity hasReference: [ReferenceGenome] } +type MassSpectrometryResults + { + id: Uriorcurie! + name: String + description: String + dataPath: String! + dataFormat: DataFormat! + hasSample: [Sample] + hasReference: [ReferenceGenome] + } + type MODO { id: Uriorcurie! diff --git a/project/jsonld/modos_schema.context.jsonld b/project/jsonld/modos_schema.context.jsonld index fb0cc98..a0e025c 100644 --- a/project/jsonld/modos_schema.context.jsonld +++ b/project/jsonld/modos_schema.context.jsonld @@ -75,6 +75,10 @@ "@type": "@id", "@id": "has_sample" }, + "has_sample_processing": { + "@type": "@id", + "@id": "has_sample_processing" + }, "has_sequence": { "@type": "@id", "@id": "has_sequence" @@ -137,6 +141,9 @@ "DataEntity": { "@id": "DataEntity" }, + "MassSpectrometryResults": { + "@id": "MassSpectrometryResults" + }, "MODO": { "@id": "MODO" }, diff --git a/project/jsonld/modos_schema.jsonld b/project/jsonld/modos_schema.jsonld index 2aee41d..a237d9c 100644 --- a/project/jsonld/modos_schema.jsonld +++ b/project/jsonld/modos_schema.jsonld @@ -457,6 +457,11 @@ "text": "BCF", "description": "Binary call format, for efficient storage of sequence variation.", "meaning": "EDAM:format_3020" + }, + { + "text": "mzTab", + "description": "tab-delimited format for mass spectrometry-based proteomics and metabolomics results.", + "meaning": "EDAM:format_3681" } ] } @@ -614,6 +619,21 @@ "multivalued": true, "@type": "SlotDefinition" }, + { + "name": "has_sample_processing", + "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/has_sample_processing", + "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)].\n", + "from_schema": "https://w3id.org/sdsc-ordes/modos-schema", + "slot_uri": "https://w3id.org/sdsc-ordes/modos-schema/has_sample_processing", + "list_elements_ordered": true, + "owner": "Assay", + "domain_of": [ + "Assay" + ], + "range": "uriorcurie", + "multivalued": true, + "@type": "SlotDefinition" + }, { "name": "has_sequence", "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/has_sequence", @@ -661,7 +681,7 @@ { "name": "taxon_id", "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/taxon_id", - "description": "The NCBI taxon code describing the taxonomic range of a sample.\nSee: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html)\n", + "description": "The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample.\n", "from_schema": "https://w3id.org/sdsc-ordes/modos-schema", "slot_uri": "https://w3id.org/sdsc-ordes/modos-schema/taxon_id", "owner": "ReferenceGenome", @@ -775,7 +795,7 @@ { "name": "source_material", "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/source_material", - "description": "The biological source from which the sample was isolated (tissue, organ).\nShould be a tissue or organ code URI from the UBERON ontology.\nSee: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon)\n", + "description": "The biological source from which the sample was isolated (tissue, organ).\nShould be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) ontology or [fairgenomes biospecimen types](https://raw.githubusercontent.com/fairgenomes/fairgenomes-semantic-model/refs/tags/v1.2/generated/ontology/fair-genomes-biospecimentypes.ttl).\n", "from_schema": "https://w3id.org/sdsc-ordes/modos-schema", "slot_uri": "https://w3id.org/sdsc-ordes/modos-schema/source_material", "owner": "Sample", @@ -866,7 +886,8 @@ "description", "has_sample", "has_data", - "omics_type" + "omics_type", + "has_sample_processing" ], "slot_usage": {}, "class_uri": "https://w3id.org/sdsc-ordes/modos-schema/Assay", @@ -996,6 +1017,25 @@ "class_uri": "https://w3id.org/sdsc-ordes/modos-schema/VariantSet", "@type": "ClassDefinition" }, + { + "name": "MassSpectrometryResults", + "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/MassSpectrometryResults", + "description": "A data entity consisting of quantitative results from a mass spectrometry experiment.", + "from_schema": "https://w3id.org/sdsc-ordes/modos-schema", + "is_a": "DataEntity", + "slots": [ + "id", + "name", + "description", + "data_path", + "data_format", + "has_sample", + "has_reference" + ], + "slot_usage": {}, + "class_uri": "https://w3id.org/sdsc-ordes/modos-schema/MassSpectrometryResults", + "@type": "ClassDefinition" + }, { "name": "Array", "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/Array", diff --git a/project/jsonschema/modos_schema.schema.json b/project/jsonschema/modos_schema.schema.json index 104e386..8c88909 100644 --- a/project/jsonschema/modos_schema.schema.json +++ b/project/jsonschema/modos_schema.schema.json @@ -149,6 +149,13 @@ "null" ] }, + "has_sample_processing": { + "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)].\n", + "items": { + "type": "string" + }, + "type": "array" + }, "id": { "description": "A unique identifier for a thing", "type": "string" @@ -242,7 +249,8 @@ "Zarr", "FASTA", "VCF", - "BCF" + "BCF", + "mzTab" ], "title": "DataFormat", "type": "string" @@ -379,6 +387,53 @@ "title": "MODO", "type": "object" }, + "MassSpectrometryResults": { + "additionalProperties": false, + "description": "A data entity consisting of quantitative results from a mass spectrometry experiment.", + "properties": { + "data_format": { + "$ref": "#/$defs/DataFormat", + "description": "Data/file format associated with a data entity." + }, + "data_path": { + "description": "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path.", + "type": "string" + }, + "description": { + "description": "A human-readable description for a thing", + "type": "string" + }, + "has_reference": { + "description": "Specifies the reference coordinate system used by an omics dataset.", + "items": { + "type": "string" + }, + "type": "array" + }, + "has_sample": { + "description": "Biological sample included or described by a given thing.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "A unique identifier for a thing", + "type": "string" + }, + "name": { + "description": "A human-readable name for a thing", + "type": "string" + } + }, + "required": [ + "data_path", + "data_format", + "id" + ], + "title": "MassSpectrometryResults", + "type": "object" + }, "NamedThing": { "additionalProperties": false, "description": "A generic grouping for any identifiable entity", @@ -466,7 +521,7 @@ ] }, "taxon_id": { - "description": "The NCBI taxon code describing the taxonomic range of a sample.\nSee: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html)\n", + "description": "The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample.\n", "items": { "type": "string" }, @@ -592,7 +647,7 @@ ] }, "taxon_id": { - "description": "The NCBI taxon code describing the taxonomic range of a sample.\nSee: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html)\n", + "description": "The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample.\n", "items": { "type": "string" }, diff --git a/project/owl/modos_schema.owl.ttl b/project/owl/modos_schema.owl.ttl index b827636..3d309ad 100644 --- a/project/owl/modos_schema.owl.ttl +++ b/project/owl/modos_schema.owl.ttl @@ -39,6 +39,13 @@ modos:MODOCollection a owl:Class, skos:definition "A holder for Multi-Omics Digital Objects" ; skos:inScheme . +modos:MassSpectrometryResults a owl:Class, + linkml:ClassDefinition ; + rdfs:label "MassSpectrometryResults" ; + rdfs:subClassOf modos:DataEntity ; + skos:definition "A data entity consisting of quantitative results from a mass spectrometry experiment." ; + skos:inScheme . + modos:VariantSet a owl:Class, linkml:ClassDefinition ; rdfs:label "VariantSet" ; @@ -78,10 +85,7 @@ modos:MODO a owl:Class, owl:onProperty modos:creation_date ], [ a owl:Restriction ; owl:allValuesFrom linkml:Datetime ; - owl:onProperty modos:last_update_date ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:has_assay ], + owl:onProperty modos:creation_date ], [ a owl:Restriction ; owl:allValuesFrom modos:Assay ; owl:onProperty modos:has_assay ], @@ -114,6 +118,11 @@ EDAM:format_3462 a owl:Class, rdfs:label "CRAM" ; rdfs:subClassOf modos:DataFormat . +EDAM:format_3681 a owl:Class, + modos:DataFormat ; + rdfs:label "mzTab" ; + rdfs:subClassOf modos:DataFormat . + EDAM:format_3915 a owl:Class, modos:DataFormat ; rdfs:label "Zarr" ; @@ -164,6 +173,9 @@ modos:Assay a owl:Class, owl:onProperty modos:has_sample ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty modos:has_sample_processing ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty modos:has_sample ], [ a owl:Restriction ; owl:maxCardinality 1 ; @@ -282,6 +294,16 @@ modos:entries a owl:ObjectProperty, rdfs:label "entries" ; skos:inScheme . +modos:has_sample_processing a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "has_sample_processing" ; + rdfs:range linkml:Uriorcurie ; + skos:definition """Codes describing sample processing, preparation or handling steps. +The order of the codes should reflect the order in which the steps were performed. +Should be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)]. +""" ; + skos:inScheme . + modos:omics_type a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "omics_type" ; @@ -306,8 +328,8 @@ modos:Sample a owl:Class, owl:allValuesFrom modos:Sex ; owl:onProperty modos:sex ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty modos:source_material ], + owl:minCardinality 0 ; + owl:onProperty modos:sex ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:source_material ], @@ -317,6 +339,9 @@ modos:Sample a owl:Class, [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:cell_type ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:source_material ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:taxon_id ], @@ -440,8 +465,7 @@ modos:source_material a owl:ObjectProperty, rdfs:label "source_material" ; rdfs:range linkml:Uriorcurie ; skos:definition """The biological source from which the sample was isolated (tissue, organ). -Should be a tissue or organ code URI from the UBERON ontology. -See: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon) +Should be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) ontology or [fairgenomes biospecimen types](https://raw.githubusercontent.com/fairgenomes/fairgenomes-semantic-model/refs/tags/v1.2/generated/ontology/fair-genomes-biospecimentypes.ttl). """ ; skos:inScheme . @@ -449,8 +473,7 @@ modos:taxon_id a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "taxon_id" ; rdfs:range linkml:Uriorcurie ; - skos:definition """The NCBI taxon code describing the taxonomic range of a sample. -See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html) + skos:definition """The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. """ ; skos:inScheme . @@ -503,10 +526,56 @@ modos:has_part a owl:ObjectProperty, skos:definition "Indicates an item that is part of this item." ; skos:inScheme . +modos:DataEntity a owl:Class, + linkml:ClassDefinition ; + rdfs:label "DataEntity" ; + rdfs:subClassOf [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:has_reference ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:has_sample ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty modos:data_format ], + [ a owl:Restriction ; + owl:allValuesFrom modos:ReferenceGenome ; + owl:onProperty modos:has_reference ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:data_format ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:data_path ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:has_reference ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty modos:data_path ], + [ a owl:Restriction ; + owl:allValuesFrom modos:Sample ; + owl:onProperty modos:has_sample ], + [ a owl:Restriction ; + owl:allValuesFrom modos:DataFormat ; + owl:onProperty modos:data_format ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty modos:data_path ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:has_sample ], + modos:NamedThing ; + skos:definition "An entity containing data." ; + skos:inScheme . + modos:NamedThing a owl:Class, linkml:ClassDefinition ; rdfs:label "NamedThing" ; rdfs:subClassOf [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty modos:name ], + [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:description ], [ a owl:Restriction ; @@ -582,12 +651,13 @@ modos:OmicsType a owl:Class, modos:DataFormat a owl:Class, linkml:EnumDefinition ; - owl:unionOf ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 ) ; + owl:unionOf ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; linkml:permissible_values EDAM:format_1929, EDAM:format_1930, EDAM:format_3016, EDAM:format_3020, EDAM:format_3462, + EDAM:format_3681, EDAM:format_3915 . a owl:Ontology ; diff --git a/project/protobuf/modos_schema.proto b/project/protobuf/modos_schema.proto index 123a3db..8dcc431 100644 --- a/project/protobuf/modos_schema.proto +++ b/project/protobuf/modos_schema.proto @@ -32,6 +32,7 @@ message Assay repeated sample hasSample = 0 repeated dataEntity hasData = 0 repeated omicsType omicsType = 0 + repeated uriorcurie hasSampleProcessing = 0 } // An entity containing data. message DataEntity @@ -44,6 +45,17 @@ message DataEntity repeated sample hasSample = 0 repeated referenceGenome hasReference = 0 } +// A data entity consisting of quantitative results from a mass spectrometry experiment. +message MassSpectrometryResults + { + uriorcurie id = 0 + string name = 0 + string description = 0 + string dataPath = 0 + dataFormat dataFormat = 0 + repeated sample hasSample = 0 + repeated referenceGenome hasReference = 0 + } // Represents the Multi-Omics Digital Object. It encapsulates omics and other datasets and their metadata. message MODO { diff --git a/project/shacl/modos_schema.shacl.ttl b/project/shacl/modos_schema.shacl.ttl index 2befc88..76c0f17 100644 --- a/project/shacl/modos_schema.shacl.ttl +++ b/project/shacl/modos_schema.shacl.ttl @@ -21,13 +21,7 @@ schema1:Thing a sh:NodeShape ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; - sh:path schema1:name ], - [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path schema1:identifier ] ; + sh:path schema1:name ] ; sh:targetClass schema1:Thing . modos:AlignmentSet a sh:NodeShape ; @@ -136,11 +130,16 @@ modos:MODOCollection a sh:NodeShape ; sh:path modos:entries ] ; sh:targetClass modos:MODOCollection . -modos:VariantSet a sh:NodeShape ; +modos:MassSpectrometryResults a sh:NodeShape ; sh:closed true ; - sh:description "A data entity consisting of genomic variants relative to a reference." ; + sh:description "A data entity consisting of quantitative results from a mass spectrometry experiment." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; + sh:property [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path modos:has_sample ], + [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -211,6 +210,18 @@ modos:Assay a sh:NodeShape ; sh:nodeKind sh:IRI ; sh:order 1 ; sh:path modos:has_data ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], [ sh:class modos:Sample ; sh:description "Biological sample included or described by a given thing." ; sh:nodeKind sh:IRI ; @@ -319,7 +330,13 @@ modos:MODO a sh:NodeShape ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 0 ; - sh:path modos:creation_date ] ; + sh:path modos:creation_date ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ] ; sh:targetClass modos:MODO . modos:ReferenceSequence a sh:NodeShape ; @@ -336,8 +353,8 @@ modos:ReferenceSequence a sh:NodeShape ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:description ], + sh:order 1 ; + sh:path modos:source_uri ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; @@ -360,7 +377,6 @@ modos:ReferenceSequence a sh:NodeShape ; [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path schema1:identifier ] ; @@ -443,8 +459,7 @@ See: [https://bioregistry.io/registry/cl](https://bioregistry.io/registry/cl) sh:path schema1:description ], [ sh:datatype xsd:anyURI ; sh:description """The biological source from which the sample was isolated (tissue, organ). -Should be a tissue or organ code URI from the UBERON ontology. -See: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon) +Should be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) ontology or [fairgenomes biospecimen types](https://raw.githubusercontent.com/fairgenomes/fairgenomes-semantic-model/refs/tags/v1.2/generated/ontology/fair-genomes-biospecimentypes.ttl). """ ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; diff --git a/project/shex/modos_schema.shex b/project/shex/modos_schema.shex index 7680a02..eced612 100644 --- a/project/shex/modos_schema.shex +++ b/project/shex/modos_schema.shex @@ -67,7 +67,8 @@ linkml:Sparqlpath xsd:string @ * ; @ * ; [ - ] + + ] + ; + @linkml:Uriorcurie * ) ; rdf:type [ ] ) @@ -79,15 +80,23 @@ linkml:Sparqlpath xsd:string rdf:type [ schema1:Thing ] ? ; @linkml:String ; [ EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 - ] ; + EDAM:format_3681 ] ; @ * ; @ * ) ; rdf:type [ ] ) - } OR @ OR @ OR @ + } OR @ OR @ OR @ OR @ ) + CLOSED { + ( $ ( & ; + rdf:type [ ] ? + ) ; + rdf:type [ ] + ) +} + CLOSED { ( $ ( & ; rdf:type [ schema1:Thing ] ? ; diff --git a/project/sqlschema/modos_schema.sql b/project/sqlschema/modos_schema.sql index 0ee7e65..4e3013b 100644 --- a/project/sqlschema/modos_schema.sql +++ b/project/sqlschema/modos_schema.sql @@ -16,7 +16,7 @@ -- * Slot: description Description: A human-readable description for a thing -- # Class: "Sample" Description: "A biological sample used in assays. Examples include a whole organism, tissue or cell line." -- * Slot: cell_type Description: The cell type of the sample, if applicable.Should be a cell type code URI from the cell ontology.See: [https://bioregistry.io/registry/cl](https://bioregistry.io/registry/cl) --- * Slot: source_material Description: The biological source from which the sample was isolated (tissue, organ).Should be a tissue or organ code URI from the UBERON ontology.See: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon) +-- * Slot: source_material Description: The biological source from which the sample was isolated (tissue, organ).Should be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) ontology or [fairgenomes biospecimen types](https://raw.githubusercontent.com/fairgenomes/fairgenomes-semantic-model/refs/tags/v1.2/generated/ontology/fair-genomes-biospecimentypes.ttl). -- * Slot: sex Description: The biological sex of a sample. -- * Slot: id Description: A unique identifier for a thing -- * Slot: name Description: A human-readable name for a thing @@ -53,6 +53,12 @@ -- * Slot: id Description: A unique identifier for a thing -- * Slot: name Description: A human-readable name for a thing -- * Slot: description Description: A human-readable description for a thing +-- # Class: "MassSpectrometryResults" Description: "A data entity consisting of quantitative results from a mass spectrometry experiment." +-- * Slot: data_path Description: The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path. +-- * Slot: data_format Description: Data/file format associated with a data entity. +-- * Slot: id Description: A unique identifier for a thing +-- * Slot: name Description: A human-readable name for a thing +-- * Slot: description Description: A human-readable description for a thing -- # Class: "Array" Description: "Data entity consisting of an N-dimensional array." -- * Slot: data_path Description: The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path. -- * Slot: data_format Description: Data/file format associated with a data entity. @@ -73,9 +79,12 @@ -- # Class: "Assay_omics_type" Description: "" -- * Slot: Assay_id Description: Autocreated FK slot -- * Slot: omics_type Description: The type of omics considered. +-- # Class: "Assay_has_sample_processing" Description: "" +-- * Slot: Assay_id Description: Autocreated FK slot +-- * Slot: has_sample_processing Description: Codes describing sample processing, preparation or handling steps.The order of the codes should reflect the order in which the steps were performed.Should be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)]. -- # Class: "Sample_taxon_id" Description: "" -- * Slot: Sample_id Description: Autocreated FK slot --- * Slot: taxon_id Description: The NCBI taxon code describing the taxonomic range of a sample.See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html) +-- * Slot: taxon_id Description: The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. -- # Class: "Sample_collector" Description: "" -- * Slot: Sample_id Description: Autocreated FK slot -- * Slot: collector Description: The organization responsible for collecting a given sample. @@ -90,7 +99,7 @@ -- * Slot: has_sequence_id Description: Denotes that a sequence belongs to a collection (e.g. a reference genome). -- # Class: "ReferenceGenome_taxon_id" Description: "" -- * Slot: ReferenceGenome_id Description: Autocreated FK slot --- * Slot: taxon_id Description: The NCBI taxon code describing the taxonomic range of a sample.See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html) +-- * Slot: taxon_id Description: The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. -- # Class: "AlignmentSet_has_sample" Description: "" -- * Slot: AlignmentSet_id Description: Autocreated FK slot -- * Slot: has_sample_id Description: Biological sample included or described by a given thing. @@ -103,6 +112,12 @@ -- # Class: "VariantSet_has_reference" Description: "" -- * Slot: VariantSet_id Description: Autocreated FK slot -- * Slot: has_reference_id Description: Specifies the reference coordinate system used by an omics dataset. +-- # Class: "MassSpectrometryResults_has_sample" Description: "" +-- * Slot: MassSpectrometryResults_id Description: Autocreated FK slot +-- * Slot: has_sample_id Description: Biological sample included or described by a given thing. +-- # Class: "MassSpectrometryResults_has_reference" Description: "" +-- * Slot: MassSpectrometryResults_id Description: Autocreated FK slot +-- * Slot: has_reference_id Description: Specifies the reference coordinate system used by an omics dataset. -- # Class: "Array_has_sample" Description: "" -- * Slot: Array_id Description: Autocreated FK slot -- * Slot: has_sample_id Description: Biological sample included or described by a given thing. @@ -173,6 +188,14 @@ CREATE TABLE "VariantSet" ( description TEXT, PRIMARY KEY (id) ); +CREATE TABLE "MassSpectrometryResults" ( + data_path TEXT NOT NULL, + data_format VARCHAR(5) NOT NULL, + id TEXT NOT NULL, + name TEXT, + description TEXT, + PRIMARY KEY (id) +); CREATE TABLE "Array" ( data_path TEXT NOT NULL, data_format VARCHAR(5) NOT NULL, @@ -216,6 +239,12 @@ CREATE TABLE "Assay_omics_type" ( PRIMARY KEY ("Assay_id", omics_type), FOREIGN KEY("Assay_id") REFERENCES "Assay" (id) ); +CREATE TABLE "Assay_has_sample_processing" ( + "Assay_id" TEXT, + has_sample_processing TEXT, + PRIMARY KEY ("Assay_id", has_sample_processing), + FOREIGN KEY("Assay_id") REFERENCES "Assay" (id) +); CREATE TABLE "Sample_taxon_id" ( "Sample_id" TEXT, taxon_id TEXT, @@ -283,6 +312,20 @@ CREATE TABLE "VariantSet_has_reference" ( FOREIGN KEY("VariantSet_id") REFERENCES "VariantSet" (id), FOREIGN KEY(has_reference_id) REFERENCES "ReferenceGenome" (id) ); +CREATE TABLE "MassSpectrometryResults_has_sample" ( + "MassSpectrometryResults_id" TEXT, + has_sample_id TEXT, + PRIMARY KEY ("MassSpectrometryResults_id", has_sample_id), + FOREIGN KEY("MassSpectrometryResults_id") REFERENCES "MassSpectrometryResults" (id), + FOREIGN KEY(has_sample_id) REFERENCES "Sample" (id) +); +CREATE TABLE "MassSpectrometryResults_has_reference" ( + "MassSpectrometryResults_id" TEXT, + has_reference_id TEXT, + PRIMARY KEY ("MassSpectrometryResults_id", has_reference_id), + FOREIGN KEY("MassSpectrometryResults_id") REFERENCES "MassSpectrometryResults" (id), + FOREIGN KEY(has_reference_id) REFERENCES "ReferenceGenome" (id) +); CREATE TABLE "Array_has_sample" ( "Array_id" TEXT, has_sample_id TEXT, diff --git a/src/modos_schema/datamodel/modos_schema.py b/src/modos_schema/datamodel/modos_schema.py index 73283c4..9e5b3ef 100644 --- a/src/modos_schema/datamodel/modos_schema.py +++ b/src/modos_schema/datamodel/modos_schema.py @@ -88,6 +88,10 @@ class VariantSetId(DataEntityId): pass +class MassSpectrometryResultsId(DataEntityId): + pass + + class ArrayId(DataEntityId): pass @@ -183,6 +187,7 @@ class Assay(NamedThing): omics_type: Union[Union[str, "OmicsType"], List[Union[str, "OmicsType"]]] = None has_sample: Optional[Union[Union[str, SampleId], List[Union[str, SampleId]]]] = empty_list() has_data: Optional[Union[Union[str, DataEntityId], List[Union[str, DataEntityId]]]] = empty_list() + has_sample_processing: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self._is_empty(self.id): @@ -204,6 +209,10 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.has_data = [self.has_data] if self.has_data is not None else [] self.has_data = [v if isinstance(v, DataEntityId) else DataEntityId(v) for v in self.has_data] + if not isinstance(self.has_sample_processing, list): + self.has_sample_processing = [self.has_sample_processing] if self.has_sample_processing is not None else [] + self.has_sample_processing = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.has_sample_processing] + super().__post_init__(**kwargs) @@ -537,6 +546,10 @@ class DataFormat(EnumDefinitionImpl): text="BCF", description="Binary call format, for efficient storage of sequence variation.", meaning=EDAM["format_3020"]) + mzTab = PermissibleValue( + text="mzTab", + description="tab-delimited format for mass spectrometry-based proteomics and metabolomics results.", + meaning=EDAM["format_3681"]) _defn = EnumDefinition( name="DataFormat", @@ -576,6 +589,9 @@ class slots: slots.has_data = Slot(uri=MODOS.has_data, name="has_data", curie=MODOS.curie('has_data'), model_uri=MODOS.has_data, domain=None, range=Optional[Union[Union[str, DataEntityId], List[Union[str, DataEntityId]]]]) +slots.has_sample_processing = Slot(uri=MODOS.has_sample_processing, name="has_sample_processing", curie=MODOS.curie('has_sample_processing'), + model_uri=MODOS.has_sample_processing, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) + slots.has_sequence = Slot(uri=MODOS.has_sequence, name="has_sequence", curie=MODOS.curie('has_sequence'), model_uri=MODOS.has_sequence, domain=None, range=Optional[Union[Union[str, ReferenceSequenceId], List[Union[str, ReferenceSequenceId]]]]) From 46fcc4688451d369bb304ec2608fc0bd7abacefb Mon Sep 17 00:00:00 2001 From: cmdoret Date: Fri, 11 Oct 2024 16:08:04 +0200 Subject: [PATCH 3/6] fix: typo in description --- project/jsonld/modos_schema.jsonld | 2 +- project/jsonschema/modos_schema.schema.json | 2 +- project/owl/modos_schema.owl.ttl | 47 +++-- project/shacl/modos_schema.shacl.ttl | 216 ++++++++++++++++++-- project/sqlschema/modos_schema.sql | 2 +- src/modos_schema/schema/modos_schema.yaml | 2 +- 6 files changed, 227 insertions(+), 44 deletions(-) diff --git a/project/jsonld/modos_schema.jsonld b/project/jsonld/modos_schema.jsonld index a237d9c..8b2a91d 100644 --- a/project/jsonld/modos_schema.jsonld +++ b/project/jsonld/modos_schema.jsonld @@ -622,7 +622,7 @@ { "name": "has_sample_processing", "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/has_sample_processing", - "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)].\n", + "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)].\n", "from_schema": "https://w3id.org/sdsc-ordes/modos-schema", "slot_uri": "https://w3id.org/sdsc-ordes/modos-schema/has_sample_processing", "list_elements_ordered": true, diff --git a/project/jsonschema/modos_schema.schema.json b/project/jsonschema/modos_schema.schema.json index 8c88909..c459377 100644 --- a/project/jsonschema/modos_schema.schema.json +++ b/project/jsonschema/modos_schema.schema.json @@ -150,7 +150,7 @@ ] }, "has_sample_processing": { - "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)].\n", + "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)].\n", "items": { "type": "string" }, diff --git a/project/owl/modos_schema.owl.ttl b/project/owl/modos_schema.owl.ttl index 3d309ad..78c4880 100644 --- a/project/owl/modos_schema.owl.ttl +++ b/project/owl/modos_schema.owl.ttl @@ -31,10 +31,10 @@ modos:MODOCollection a owl:Class, linkml:ClassDefinition ; rdfs:label "MODOCollection" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom modos:MODO ; owl:onProperty modos:entries ], [ a owl:Restriction ; - owl:allValuesFrom modos:MODO ; + owl:minCardinality 0 ; owl:onProperty modos:entries ] ; skos:definition "A holder for Multi-Omics Digital Objects" ; skos:inScheme . @@ -62,6 +62,9 @@ modos:MODO a owl:Class, [ a owl:Restriction ; owl:allValuesFrom linkml:Datetime ; owl:onProperty modos:creation_date ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty modos:last_update_date ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:source_uri ], @@ -87,7 +90,7 @@ modos:MODO a owl:Class, owl:allValuesFrom linkml:Datetime ; owl:onProperty modos:creation_date ], [ a owl:Restriction ; - owl:allValuesFrom modos:Assay ; + owl:minCardinality 0 ; owl:onProperty modos:has_assay ], modos:NamedThing ; skos:definition "Represents the Multi-Omics Digital Object. It encapsulates omics and other datasets and their metadata." ; @@ -194,9 +197,6 @@ modos:ReferenceGenome a owl:Class, [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:has_sequence ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:has_sequence ], @@ -300,7 +300,7 @@ modos:has_sample_processing a owl:ObjectProperty, rdfs:range linkml:Uriorcurie ; skos:definition """Codes describing sample processing, preparation or handling steps. The order of the codes should reflect the order in which the steps were performed. -Should be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)]. +Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. """ ; skos:inScheme . @@ -530,23 +530,17 @@ modos:DataEntity a owl:Class, linkml:ClassDefinition ; rdfs:label "DataEntity" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_reference ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_sample ], - [ a owl:Restriction ; owl:minCardinality 1 ; owl:onProperty modos:data_format ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty modos:data_path ], [ a owl:Restriction ; owl:allValuesFrom modos:ReferenceGenome ; owl:onProperty modos:has_reference ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_format ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_path ], + owl:minCardinality 0 ; + owl:onProperty modos:has_sample ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:has_reference ], @@ -554,16 +548,22 @@ modos:DataEntity a owl:Class, owl:allValuesFrom linkml:String ; owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:allValuesFrom modos:Sample ; - owl:onProperty modos:has_sample ], + owl:maxCardinality 1 ; + owl:onProperty modos:has_reference ], [ a owl:Restriction ; owl:allValuesFrom modos:DataFormat ; owl:onProperty modos:data_format ], [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:maxCardinality 1 ; + owl:onProperty modos:data_format ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom modos:Sample ; + owl:onProperty modos:has_sample ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty modos:has_sample ], modos:NamedThing ; skos:definition "An entity containing data." ; @@ -573,6 +573,9 @@ modos:NamedThing a owl:Class, linkml:ClassDefinition ; rdfs:label "NamedThing" ; rdfs:subClassOf [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:name ], + [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty modos:name ], [ a owl:Restriction ; diff --git a/project/shacl/modos_schema.shacl.ttl b/project/shacl/modos_schema.shacl.ttl index 76c0f17..024f98b 100644 --- a/project/shacl/modos_schema.shacl.ttl +++ b/project/shacl/modos_schema.shacl.ttl @@ -16,12 +16,12 @@ schema1:Thing a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path schema1:description ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path schema1:name ] ; + sh:order 0 ; + sh:path schema1:identifier ] ; sh:targetClass schema1:Thing . modos:AlignmentSet a sh:NodeShape ; @@ -118,6 +118,54 @@ modos:Array a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path schema1:identifier ] ; + sh:targetClass modos:AlignmentSet . + +modos:Array a sh:NodeShape ; + sh:closed true ; + sh:description "Data entity consisting of an N-dimensional array." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ], + [ sh:datatype xsd:string ; + sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path modos:data_path ], + [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 1 ; + sh:path modos:data_format ], + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path modos:has_sample ], + [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path modos:has_reference ] ; sh:targetClass modos:Array . modos:MODOCollection a sh:NodeShape ; @@ -134,17 +182,156 @@ modos:MassSpectrometryResults a sh:NodeShape ; sh:closed true ; sh:description "A data entity consisting of quantitative results from a mass spectrometry experiment." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class modos:Sample ; + sh:property [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:class modos:Sample ; sh:description "Biological sample included or described by a given thing." ; sh:nodeKind sh:IRI ; sh:order 2 ; sh:path modos:has_sample ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 5 ; sh:path schema1:name ], + [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path modos:has_reference ], + [ sh:datatype xsd:string ; + sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path modos:data_path ], + [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 1 ; + sh:path modos:data_format ] ; + sh:targetClass modos:MassSpectrometryResults . + +modos:VariantSet a sh:NodeShape ; + sh:closed true ; + sh:description "A data entity consisting of genomic variants relative to a reference." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:string ; + sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path modos:data_path ], + [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path modos:has_reference ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ], + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 1 ; + sh:path modos:data_format ], + [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path modos:has_sample ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ] ; + sh:targetClass modos:VariantSet . + +modos:Assay a sh:NodeShape ; + sh:closed true ; + sh:description "A coordinated set of actions designed to generate data from samples." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:description "The type of omics considered." ; + sh:in ( NCIT:C84343 NCIT:C153189 NCIT:C49019 NCIT:C20085 ) ; + sh:minCount 1 ; + sh:order 2 ; + sh:path modos:omics_type ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ], + [ sh:class modos:DataEntity ; + sh:description "Data entity included in a given collection." ; + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path modos:has_data ], + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path modos:has_sample ], + [ sh:datatype xsd:anyURI ; + sh:description """Codes describing sample processing, preparation or handling steps. +The order of the codes should reflect the order in which the steps were performed. +Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. +""" ; + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path modos:has_sample_processing ] ; + sh:targetClass modos:Assay . + +modos:DataEntity a sh:NodeShape ; + sh:closed true ; + sh:description "An entity containing data." ; + sh:ignoredProperties ( rdf:type ) ; + sh:property [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], [ sh:description "Data/file format associated with a data entity." ; sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 ) ; sh:maxCount 1 ; @@ -319,24 +506,18 @@ modos:MODO a sh:NodeShape ; sh:order 3 ; sh:path modos:source_uri ], [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; + sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 6 ; sh:path schema1:description ], [ sh:datatype xsd:dateTime ; - sh:description "The date on which something was created." ; + sh:description "The date on which the thing was last modified." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:creation_date ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ] ; + sh:order 2 ; + sh:path modos:last_update_date ] ; sh:targetClass modos:MODO . modos:ReferenceSequence a sh:NodeShape ; @@ -365,9 +546,8 @@ modos:ReferenceSequence a sh:NodeShape ; sh:description "The pre-computed hash uniquely representing a biological sequence. Calculated as the MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:sequence_md5 ; - sh:pattern "^[a-f0-9]{32}$" ], + sh:order 5 ; + sh:path schema1:description ], [ sh:datatype xsd:string ; sh:description "A string specifying the release or version of a software or resource." ; sh:maxCount 1 ; diff --git a/project/sqlschema/modos_schema.sql b/project/sqlschema/modos_schema.sql index 4e3013b..1824c5b 100644 --- a/project/sqlschema/modos_schema.sql +++ b/project/sqlschema/modos_schema.sql @@ -81,7 +81,7 @@ -- * Slot: omics_type Description: The type of omics considered. -- # Class: "Assay_has_sample_processing" Description: "" -- * Slot: Assay_id Description: Autocreated FK slot --- * Slot: has_sample_processing Description: Codes describing sample processing, preparation or handling steps.The order of the codes should reflect the order in which the steps were performed.Should be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)]. +-- * Slot: has_sample_processing Description: Codes describing sample processing, preparation or handling steps.The order of the codes should reflect the order in which the steps were performed.Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. -- # Class: "Sample_taxon_id" Description: "" -- * Slot: Sample_id Description: Autocreated FK slot -- * Slot: taxon_id Description: The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. diff --git a/src/modos_schema/schema/modos_schema.yaml b/src/modos_schema/schema/modos_schema.yaml index bed2891..11037ea 100644 --- a/src/modos_schema/schema/modos_schema.yaml +++ b/src/modos_schema/schema/modos_schema.yaml @@ -195,7 +195,7 @@ slots: description: | Codes describing sample processing, preparation or handling steps. The order of the codes should reflect the order in which the steps were performed. - Should be codes from [MSIO](https://bioregistry.io/registry/msio) or OBI[https://obofoundry.org/ontology/obi.html)]. + Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. multivalued: true list_elements_ordered: true range: uriorcurie From f052f9b2257e45bf18f33cc39f9621d8579b6b39 Mon Sep 17 00:00:00 2001 From: cmdoret Date: Tue, 15 Oct 2024 13:11:55 +0200 Subject: [PATCH 4/6] refactor: consistent slot naming --- src/modos_schema/schema/modos_schema.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modos_schema/schema/modos_schema.yaml b/src/modos_schema/schema/modos_schema.yaml index 11037ea..104d26d 100644 --- a/src/modos_schema/schema/modos_schema.yaml +++ b/src/modos_schema/schema/modos_schema.yaml @@ -62,7 +62,7 @@ classes: - has_sample - has_data - omics_type - - has_sample_processing + - sample_processing Sample: is_a: NamedThing @@ -191,7 +191,7 @@ slots: is_a: has_part description: Data entity included in a given collection. range: DataEntity - has_sample_processing: + sample_processing: description: | Codes describing sample processing, preparation or handling steps. The order of the codes should reflect the order in which the steps were performed. From 4a41e86e17b74e94f948dfe42d6bf2188902de7b Mon Sep 17 00:00:00 2001 From: cmdoret Date: Tue, 15 Oct 2024 13:12:23 +0200 Subject: [PATCH 5/6] chore: regen --- project/graphql/modos_schema.graphql | 2 +- project/jsonld/modos_schema.context.jsonld | 8 +- project/jsonld/modos_schema.jsonld | 8 +- project/jsonschema/modos_schema.schema.json | 14 +- project/owl/modos_schema.owl.ttl | 81 ++++--- project/protobuf/modos_schema.proto | 2 +- project/shacl/modos_schema.shacl.ttl | 240 +++++++++----------- project/shex/modos_schema.shex | 2 +- project/sqlschema/modos_schema.sql | 10 +- src/modos_schema/datamodel/modos_schema.py | 12 +- 10 files changed, 191 insertions(+), 188 deletions(-) diff --git a/project/graphql/modos_schema.graphql b/project/graphql/modos_schema.graphql index d2a2158..8689198 100644 --- a/project/graphql/modos_schema.graphql +++ b/project/graphql/modos_schema.graphql @@ -29,7 +29,7 @@ type Assay hasSample: [Sample] hasData: [DataEntity] omicsType: [OmicsType]! - hasSampleProcessing: [Uriorcurie] + sampleProcessing: [Uriorcurie] } type DataEntity diff --git a/project/jsonld/modos_schema.context.jsonld b/project/jsonld/modos_schema.context.jsonld index a0e025c..18839ba 100644 --- a/project/jsonld/modos_schema.context.jsonld +++ b/project/jsonld/modos_schema.context.jsonld @@ -75,10 +75,6 @@ "@type": "@id", "@id": "has_sample" }, - "has_sample_processing": { - "@type": "@id", - "@id": "has_sample_processing" - }, "has_sequence": { "@type": "@id", "@id": "has_sequence" @@ -103,6 +99,10 @@ }, "@id": "omics_type" }, + "sample_processing": { + "@type": "@id", + "@id": "sample_processing" + }, "sequence_md5": { "@id": "sequence_md5" }, diff --git a/project/jsonld/modos_schema.jsonld b/project/jsonld/modos_schema.jsonld index 8b2a91d..6865628 100644 --- a/project/jsonld/modos_schema.jsonld +++ b/project/jsonld/modos_schema.jsonld @@ -620,11 +620,11 @@ "@type": "SlotDefinition" }, { - "name": "has_sample_processing", - "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/has_sample_processing", + "name": "sample_processing", + "definition_uri": "https://w3id.org/sdsc-ordes/modos-schema/sample_processing", "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)].\n", "from_schema": "https://w3id.org/sdsc-ordes/modos-schema", - "slot_uri": "https://w3id.org/sdsc-ordes/modos-schema/has_sample_processing", + "slot_uri": "https://w3id.org/sdsc-ordes/modos-schema/sample_processing", "list_elements_ordered": true, "owner": "Assay", "domain_of": [ @@ -887,7 +887,7 @@ "has_sample", "has_data", "omics_type", - "has_sample_processing" + "sample_processing" ], "slot_usage": {}, "class_uri": "https://w3id.org/sdsc-ordes/modos-schema/Assay", diff --git a/project/jsonschema/modos_schema.schema.json b/project/jsonschema/modos_schema.schema.json index c459377..61dbd71 100644 --- a/project/jsonschema/modos_schema.schema.json +++ b/project/jsonschema/modos_schema.schema.json @@ -149,13 +149,6 @@ "null" ] }, - "has_sample_processing": { - "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)].\n", - "items": { - "type": "string" - }, - "type": "array" - }, "id": { "description": "A unique identifier for a thing", "type": "string" @@ -173,6 +166,13 @@ "$ref": "#/$defs/OmicsType" }, "type": "array" + }, + "sample_processing": { + "description": "Codes describing sample processing, preparation or handling steps.\nThe order of the codes should reflect the order in which the steps were performed.\nShould be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)].\n", + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ diff --git a/project/owl/modos_schema.owl.ttl b/project/owl/modos_schema.owl.ttl index 78c4880..67e69aa 100644 --- a/project/owl/modos_schema.owl.ttl +++ b/project/owl/modos_schema.owl.ttl @@ -217,6 +217,12 @@ modos:ReferenceGenome a owl:Class, owl:onProperty modos:data_path ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; + owl:onProperty modos:version ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:taxon_id ], + [ a owl:Restriction ; + owl:minCardinality 1 ; owl:onProperty modos:data_path ], [ a owl:Restriction ; owl:minCardinality 0 ; @@ -230,6 +236,21 @@ modos:ReferenceGenome a owl:Class, [ a owl:Restriction ; owl:allValuesFrom modos:ReferenceSequence ; owl:onProperty modos:has_sequence ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:has_sequence ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:source_uri ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:version ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:source_uri ], + [ a owl:Restriction ; + owl:allValuesFrom modos:ReferenceSequence ; + owl:onProperty modos:has_sequence ], modos:NamedThing ; skos:definition "Reference assembly of a given genome, consisting of a collection of congiguous sequences (contigs)." ; skos:inScheme . @@ -294,9 +315,16 @@ modos:entries a owl:ObjectProperty, rdfs:label "entries" ; skos:inScheme . -modos:has_sample_processing a owl:ObjectProperty, +modos:omics_type a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "omics_type" ; + rdfs:range modos:OmicsType ; + skos:definition "The type of omics considered." ; + skos:inScheme . + +modos:sample_processing a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "has_sample_processing" ; + rdfs:label "sample_processing" ; rdfs:range linkml:Uriorcurie ; skos:definition """Codes describing sample processing, preparation or handling steps. The order of the codes should reflect the order in which the steps were performed. @@ -304,13 +332,6 @@ Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https """ ; skos:inScheme . -modos:omics_type a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "omics_type" ; - rdfs:range modos:OmicsType ; - skos:definition "The type of omics considered." ; - skos:inScheme . - modos:Sample a owl:Class, linkml:ClassDefinition ; rdfs:label "Sample" ; @@ -530,41 +551,41 @@ modos:DataEntity a owl:Class, linkml:ClassDefinition ; rdfs:label "DataEntity" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:maxCardinality 1 ; + owl:onProperty modos:has_reference ], + [ a owl:Restriction ; + owl:allValuesFrom modos:DataFormat ; owl:onProperty modos:data_format ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_path ], + owl:minCardinality 0 ; + owl:onProperty modos:has_sample ], [ a owl:Restriction ; - owl:allValuesFrom modos:ReferenceGenome ; - owl:onProperty modos:has_reference ], + owl:maxCardinality 1 ; + owl:onProperty modos:data_format ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom modos:Sample ; + owl:onProperty modos:has_sample ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty modos:has_sample ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:has_reference ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty modos:data_path ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom modos:ReferenceGenome ; owl:onProperty modos:has_reference ], - [ a owl:Restriction ; - owl:allValuesFrom modos:DataFormat ; - owl:onProperty modos:data_format ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_format ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:allValuesFrom modos:Sample ; - owl:onProperty modos:has_sample ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_sample ], + owl:minCardinality 1 ; + owl:onProperty modos:data_format ], modos:NamedThing ; skos:definition "An entity containing data." ; skos:inScheme . @@ -573,8 +594,14 @@ modos:NamedThing a owl:Class, linkml:ClassDefinition ; rdfs:label "NamedThing" ; rdfs:subClassOf [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:id ], + [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:name ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:name ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty modos:name ], diff --git a/project/protobuf/modos_schema.proto b/project/protobuf/modos_schema.proto index 8dcc431..4ffa814 100644 --- a/project/protobuf/modos_schema.proto +++ b/project/protobuf/modos_schema.proto @@ -32,7 +32,7 @@ message Assay repeated sample hasSample = 0 repeated dataEntity hasData = 0 repeated omicsType omicsType = 0 - repeated uriorcurie hasSampleProcessing = 0 + repeated uriorcurie sampleProcessing = 0 } // An entity containing data. message DataEntity diff --git a/project/shacl/modos_schema.shacl.ttl b/project/shacl/modos_schema.shacl.ttl index 024f98b..37b5b72 100644 --- a/project/shacl/modos_schema.shacl.ttl +++ b/project/shacl/modos_schema.shacl.ttl @@ -87,17 +87,6 @@ modos:Array a sh:NodeShape ; sh:nodeKind sh:IRI ; sh:order 2 ; sh:path modos:has_sample ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ], - [ sh:class modos:ReferenceGenome ; - sh:description "Specifies the reference coordinate system used by an omics dataset." ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ], [ sh:datatype xsd:string ; sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; @@ -111,31 +100,22 @@ modos:Array a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 5 ; sh:path schema1:name ], - [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path schema1:identifier ] ; - sh:targetClass modos:AlignmentSet . - -modos:Array a sh:NodeShape ; - sh:closed true ; - sh:description "Data entity consisting of an N-dimensional array." ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], + [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path modos:has_reference ], [ sh:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 6 ; sh:path schema1:description ], + [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path modos:has_reference ], [ sh:datatype xsd:string ; sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; @@ -143,29 +123,19 @@ modos:Array a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path modos:data_path ], - [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path modos:data_format ], + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; - sh:path schema1:identifier ], - [ sh:class modos:Sample ; - sh:description "Biological sample included or described by a given thing." ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path modos:has_sample ], - [ sh:class modos:ReferenceGenome ; - sh:description "Specifies the reference coordinate system used by an omics dataset." ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ] ; + sh:path schema1:identifier ] ; sh:targetClass modos:Array . modos:MODOCollection a sh:NodeShape ; @@ -189,28 +159,23 @@ modos:MassSpectrometryResults a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path schema1:identifier ], + [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 1 ; + sh:path modos:data_format ], [ sh:class modos:Sample ; sh:description "Biological sample included or described by a given thing." ; sh:nodeKind sh:IRI ; sh:order 2 ; sh:path modos:has_sample ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 5 ; sh:path schema1:name ], - [ sh:class modos:ReferenceGenome ; - sh:description "Specifies the reference coordinate system used by an omics dataset." ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ], [ sh:datatype xsd:string ; sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; @@ -218,12 +183,17 @@ modos:MassSpectrometryResults a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path modos:data_path ], - [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path modos:has_reference ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path modos:data_format ] ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ] ; sh:targetClass modos:MassSpectrometryResults . modos:VariantSet a sh:NodeShape ; @@ -237,17 +207,28 @@ modos:VariantSet a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path modos:data_path ], + [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 1 ; + sh:path modos:data_format ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], [ sh:class modos:ReferenceGenome ; sh:description "Specifies the reference coordinate system used by an omics dataset." ; sh:nodeKind sh:IRI ; sh:order 3 ; sh:path modos:has_reference ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ], + [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path modos:has_sample ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -255,64 +236,19 @@ modos:VariantSet a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path schema1:identifier ], - [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path modos:data_format ], - [ sh:class modos:Sample ; - sh:description "Biological sample included or described by a given thing." ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path modos:has_sample ], [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; + sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ] ; + sh:order 6 ; + sh:path schema1:description ] ; sh:targetClass modos:VariantSet . modos:Assay a sh:NodeShape ; sh:closed true ; sh:description "A coordinated set of actions designed to generate data from samples." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "The type of omics considered." ; - sh:in ( NCIT:C84343 NCIT:C153189 NCIT:C49019 NCIT:C20085 ) ; - sh:minCount 1 ; - sh:order 2 ; - sh:path modos:omics_type ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ], - [ sh:class modos:DataEntity ; - sh:description "Data entity included in a given collection." ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path modos:has_data ], - [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path schema1:identifier ], - [ sh:class modos:Sample ; - sh:description "Biological sample included or described by a given thing." ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path modos:has_sample ], - [ sh:datatype xsd:anyURI ; + sh:property [ sh:datatype xsd:anyURI ; sh:description """Codes describing sample processing, preparation or handling steps. The order of the codes should reflect the order in which the steps were performed. Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. @@ -337,18 +273,22 @@ modos:DataEntity a sh:NodeShape ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 1 ; - sh:path modos:data_format ], + sh:path modos:has_data ], [ sh:datatype xsd:string ; sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:data_path ], + sh:order 5 ; + sh:path schema1:name ], + [ sh:description "The type of omics considered." ; + sh:in ( NCIT:C84343 NCIT:C153189 NCIT:C49019 NCIT:C20085 ) ; + sh:minCount 1 ; + sh:order 2 ; + sh:path modos:omics_type ], [ sh:class modos:Sample ; sh:description "Biological sample included or described by a given thing." ; sh:nodeKind sh:IRI ; - sh:order 2 ; + sh:order 0 ; sh:path modos:has_sample ], [ sh:class modos:ReferenceGenome ; sh:description "Specifies the reference coordinate system used by an omics dataset." ; @@ -470,9 +410,9 @@ modos:DataEntity a sh:NodeShape ; sh:path schema1:description ] ; sh:targetClass modos:DataEntity . -modos:MODO a sh:NodeShape ; +modos:DataEntity a sh:NodeShape ; sh:closed true ; - sh:description "Represents the Multi-Omics Digital Object. It encapsulates omics and other datasets and their metadata." ; + sh:description "An entity containing data." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:dateTime ; sh:description "The date on which the thing was last modified." ; @@ -500,11 +440,19 @@ modos:MODO a sh:NodeShape ; sh:order 1 ; sh:path modos:has_assay ], [ sh:datatype xsd:anyURI ; - sh:description "The URI from which a resource or dataset was obtained or derived." ; + sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; + sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path modos:source_uri ], + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:datatype xsd:string ; + sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path modos:data_path ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; @@ -517,7 +465,19 @@ modos:MODO a sh:NodeShape ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 2 ; - sh:path modos:last_update_date ] ; + sh:path modos:last_update_date ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ] ; sh:targetClass modos:MODO . modos:ReferenceSequence a sh:NodeShape ; @@ -531,7 +491,7 @@ modos:ReferenceSequence a sh:NodeShape ; sh:order 1 ; sh:path modos:source_uri ], [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; + sh:description "The pre-computed hash uniquely representing a biological sequence. Calculated as the MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; @@ -597,6 +557,17 @@ See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ont sh:nodeKind sh:Literal ; sh:order 3 ; sh:path modos:source_uri ], + [ sh:datatype xsd:anyURI ; + sh:description """The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. +""" ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path modos:taxon_id ], + [ sh:class modos:ReferenceSequence ; + sh:description "Denotes that a sequence belongs to a collection (e.g. a reference genome)." ; + sh:nodeKind sh:IRI ; + sh:order 1 ; + sh:path modos:has_sequence ], [ sh:datatype xsd:string ; sh:description "A string specifying the release or version of a software or resource." ; sh:maxCount 1 ; @@ -610,8 +581,13 @@ See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ont sh:nodeKind sh:Literal ; sh:order 5 ; sh:path schema1:identifier ], + [ sh:description "The biological sex of a sample." ; + sh:in ( "Male" "Female" ) ; + sh:maxCount 1 ; + sh:order 2 ; + sh:path modos:sex ], [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; + sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 7 ; @@ -673,7 +649,7 @@ See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ont sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:name ] ; + sh:order 3 ; + sh:path modos:taxon_id ] ; sh:targetClass modos:Sample . diff --git a/project/shex/modos_schema.shex b/project/shex/modos_schema.shex index eced612..e3a69d8 100644 --- a/project/shex/modos_schema.shex +++ b/project/shex/modos_schema.shex @@ -68,7 +68,7 @@ linkml:Sparqlpath xsd:string @ * ; [ ] + ; - @linkml:Uriorcurie * + @linkml:Uriorcurie * ) ; rdf:type [ ] ) diff --git a/project/sqlschema/modos_schema.sql b/project/sqlschema/modos_schema.sql index 1824c5b..02b568e 100644 --- a/project/sqlschema/modos_schema.sql +++ b/project/sqlschema/modos_schema.sql @@ -79,9 +79,9 @@ -- # Class: "Assay_omics_type" Description: "" -- * Slot: Assay_id Description: Autocreated FK slot -- * Slot: omics_type Description: The type of omics considered. --- # Class: "Assay_has_sample_processing" Description: "" +-- # Class: "Assay_sample_processing" Description: "" -- * Slot: Assay_id Description: Autocreated FK slot --- * Slot: has_sample_processing Description: Codes describing sample processing, preparation or handling steps.The order of the codes should reflect the order in which the steps were performed.Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. +-- * Slot: sample_processing Description: Codes describing sample processing, preparation or handling steps.The order of the codes should reflect the order in which the steps were performed.Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. -- # Class: "Sample_taxon_id" Description: "" -- * Slot: Sample_id Description: Autocreated FK slot -- * Slot: taxon_id Description: The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. @@ -239,10 +239,10 @@ CREATE TABLE "Assay_omics_type" ( PRIMARY KEY ("Assay_id", omics_type), FOREIGN KEY("Assay_id") REFERENCES "Assay" (id) ); -CREATE TABLE "Assay_has_sample_processing" ( +CREATE TABLE "Assay_sample_processing" ( "Assay_id" TEXT, - has_sample_processing TEXT, - PRIMARY KEY ("Assay_id", has_sample_processing), + sample_processing TEXT, + PRIMARY KEY ("Assay_id", sample_processing), FOREIGN KEY("Assay_id") REFERENCES "Assay" (id) ); CREATE TABLE "Sample_taxon_id" ( diff --git a/src/modos_schema/datamodel/modos_schema.py b/src/modos_schema/datamodel/modos_schema.py index 9e5b3ef..1efc7d2 100644 --- a/src/modos_schema/datamodel/modos_schema.py +++ b/src/modos_schema/datamodel/modos_schema.py @@ -187,7 +187,7 @@ class Assay(NamedThing): omics_type: Union[Union[str, "OmicsType"], List[Union[str, "OmicsType"]]] = None has_sample: Optional[Union[Union[str, SampleId], List[Union[str, SampleId]]]] = empty_list() has_data: Optional[Union[Union[str, DataEntityId], List[Union[str, DataEntityId]]]] = empty_list() - has_sample_processing: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() + sample_processing: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self._is_empty(self.id): @@ -209,9 +209,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.has_data = [self.has_data] if self.has_data is not None else [] self.has_data = [v if isinstance(v, DataEntityId) else DataEntityId(v) for v in self.has_data] - if not isinstance(self.has_sample_processing, list): - self.has_sample_processing = [self.has_sample_processing] if self.has_sample_processing is not None else [] - self.has_sample_processing = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.has_sample_processing] + if not isinstance(self.sample_processing, list): + self.sample_processing = [self.sample_processing] if self.sample_processing is not None else [] + self.sample_processing = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.sample_processing] super().__post_init__(**kwargs) @@ -589,8 +589,8 @@ class slots: slots.has_data = Slot(uri=MODOS.has_data, name="has_data", curie=MODOS.curie('has_data'), model_uri=MODOS.has_data, domain=None, range=Optional[Union[Union[str, DataEntityId], List[Union[str, DataEntityId]]]]) -slots.has_sample_processing = Slot(uri=MODOS.has_sample_processing, name="has_sample_processing", curie=MODOS.curie('has_sample_processing'), - model_uri=MODOS.has_sample_processing, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) +slots.sample_processing = Slot(uri=MODOS.sample_processing, name="sample_processing", curie=MODOS.curie('sample_processing'), + model_uri=MODOS.sample_processing, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) slots.has_sequence = Slot(uri=MODOS.has_sequence, name="has_sequence", curie=MODOS.curie('has_sequence'), model_uri=MODOS.has_sequence, domain=None, range=Optional[Union[Union[str, ReferenceSequenceId], List[Union[str, ReferenceSequenceId]]]]) From 7bd1e505ddd3c670116f29ead244ab4111573830 Mon Sep 17 00:00:00 2001 From: cmdoret Date: Fri, 8 Nov 2024 09:56:56 +0100 Subject: [PATCH 6/6] chore: regen --- project/excel/modos_schema.xlsx | Bin 10779 -> 11478 bytes project/jsonld/modos_schema.context.jsonld | 4 +- project/jsonld/modos_schema.jsonld | 6 +- project/jsonschema/modos_schema.schema.json | 27 +- project/owl/modos_schema.owl.ttl | 239 ++++------ project/shacl/modos_schema.shacl.ttl | 476 ++++++++------------ src/modos_schema/datamodel/modos_schema.py | 27 +- 7 files changed, 314 insertions(+), 465 deletions(-) diff --git a/project/excel/modos_schema.xlsx b/project/excel/modos_schema.xlsx index a67068b0059d2b9f6c4657b178ebb85486dce96d..66c363cb8097e82fcf8cdf079f75798b9f3fe53e 100644 GIT binary patch delta 5445 zcmeHLXH-+!7ETBqLJuNHCkeeq1VNh8tH3BtL8T|uh}7hU4x%Ci2?&;`AR-_N2qH=u zx{mayfC4h2JR>Mo`U~-?gU(v-CvUAc_s89Lt^1w5_Sxq<-`?lsIZ~XVc9sxE0T2kp z3WC}CWX~r3wU<%1-k^^cdTT#YGR3vO9B-PlOl`QI%TxLyE4?e6$D!H=6v5X3> zkh-qG_sFxpmDV#ASIulZsqx|&oZOToni2;x`xoI*p*qqna4M!Ub4FuI(kv`1I-$1s zkVnRiY?)(>g2xc|?)O*}rDVqFj#pj$JSKgL-%6o@OKGn~gC$pqC^8A?>)svAbVjww zx9>1`-YUNsIDV6>92;upZ8MK^Ur3W9g^zw(nERq$>MBGs+ncy_SUt`Lyoaj36c!R* zkMjsPGVmmB_L@u3?W&q1sc=C22=L`dV(D{lpY`03wLiW{z0myhL3z-2OAefK-SVY* zm_eX?WW^*{gBe0gNQF3S9GL!bgRL42-AoaWowOQ=0R*xkW;;EnCdVkHiDfd)tF!_;e@nx zGcv}=;@#YN`#h3FF3tejSx@aTo2c{W>i36~_?p>ww;i2MwP=Nzk2AYoM74IZm3jC{ zxte!8eJ8|7VVeYq8s%@2dzlD@cfDDh;#bI|R&?d8eK1>RsAEPf&d6kKtmJMGr=C{- zg3&o6xK8s4y9r~XC`n14^AAU3m%4)54N^wiZ+`ypC-I~tkAG!WpwSVhfAT*D+~ zk7VbmQPKx`OQ&+iVFrv=vcx6}u z`I*eKINmA5WdKFiN2e!P*0v+HdqynB(sH6Zr3kt@r+aOUKVr(-3#&a7gQsoY+c&}n zs2Z@{P#&vO)?Z>QWoH$rOG@{7mtE#adHX;lvf}SqDqi_fz(pUOGu>rp?J^%XpE~HR zFg`TqCU%J;{YbnZew}o4Y#dT*b?n2=!BB5BKjk*~C}8cp#H3}aGaTEMBG_d}_FZ#; zKP5*(*00OBnZKKyPhGyW`rPDIojT&$HgwM%jeb;JtHu#EMu;_dr-NSWV7pVW(q*;| zrc;FPo8&r+;pJD7Y1D`zmaz#}EbwN36`FMZg0DjJgF1#VNnl$^;{gY@l{6?au&t!A zb_TYUG$0Vq*E;R|gA|+9NBe8_*)DDXbVb=dK>_HBvVDRA&=qC-1ZBsTqVrd7?3DUP zFt)SG{7(wTP7y%uAHhIe{{Iz>t%p8hxd zvVr9`1X`M6!3@W&cO3zYo?Mw4-YV3V~`!@<4O z%zb}R3;!a7q2s0e^@J*e56hxByv-REgFKeo*olhsT*1GK4qu;i0m$ik(BCqcz2p9@8t&P!)wNV!)roL(7$=ok;xdesbpqr{x-$4jksacH1v? zVHeXz-n+d`*nM|bgVAZ(2=?A1p%JfRKi;SyYkI4NJVmS%QUKpx#p3>HiGgqwPx6w8 zeT!o><;khNHuu^6$>f<6?U`2!F-s|_?nzc@Z_kwNe`OwN`dFrP-9KVCS7%83$U4K; zGQ%dkF)~MEgAOY(O-d4=be(Qe4xI4}6Wt z5qu~_v<}tXfe`DW5Hw}^uUd&$3S2GF^MxBI;JRH1l;x{#giu_!2|;uDYAGmS-cScT zI2n(T&r`!edL5kW4P9NGpD$d%S;u@h@7;yVUaY@&IZ`)mcD^rSBqoY2J3-F( zygYic+Zr*YO06G%y?UsSqdhlmRClJC!R?&Rxf{2{q6Fg%idRyQQkIK);;24l@+v%U zXl1Oa_!7(MQr^T$xXNG2@F+`f)YB zCujGrcPY%jdNAN#FLrUahW$%v_e$H!C8V7tm_Y#Y{Z@)71lRd~Ek$&N@1d*H1-KsF zQsDdPb{As*PZu*7gto+{ex0jsz5bE5E{=>KkPvOTzCDE4WGHcr7e*XJ@X~?byXs$n z#oTnD1d>;L)8qFu8{}t?&xv+OBt4!eqzFS6KYdsU^1u1lg>3@Wv^Mqhr`iAL=YEOG zZwKAImh7+YcYd2B%@Sg>chZ4)S-xN9xfR$fLI<||2e{$WcR+`hIUd?Y*H+++=q3=R zrv5h(69;8Q08epxp}?Mu#CT!<2INdS{cu+UEjoUhZ;ro43m%mOf!ssAFjy7k&G*mw z__-W?8%qFpNPRC(#FKIY^tt|!DG*5b8L|MARKb@@4o?7^>B9p delta 4707 zcmeHLc|4Ts7oQn2_H9gM#y(_^O7VjBkWCiyu9C>3}86(?!fw$z{I>V&K97oJlDUEYQhC+x-^Vu2=K)r+c3C@bRvp zn0R!i6=e4n!9wBzv#HQqTFS$b7IX8cYlj-_U$OG~)(M;d=cex?10yYm-M}YhNuvv< z;6|;qCxG=hYrctlji=snfaS_^8q$k>Ze?lhVBYz28G1gEBY93Dyr`!=J`0WkUKKu8 z&ec!O2zsO6A`9ZobpsdGOSk4;(7&+y(7APJD3wt`5_0GWb-r>I~@p= zCQ6tDAEKk7B!s|Ee;v%albKijYaXFs5XhJY8@z{`P{V))v+U@RljO=pik<^o$%X(9 z?e}(e3OJ2+?UiNUl8nuGh!e?q0TnlS6%W%jiqwP-4i{KWbxXPLwbG(3ZZc*4h~v!7 zh;wc48neFZT<+9`>oOqT%_HI~l3b3Dj74{1@QLpnY~qqUN0Tfh*P!_`HW*otA&cih zWu^mu-h44NMNHkwtk>E{Sktw8lCl7Tl~$0(AnG{*wontPDbI}SiD+6PEdNz9m~}Bl04Jgs|-zHd-QH+ zhs$;(SNX`2`m3!H0Et69Gj43^D1<6B?7{M> zJ1sX>Sk~C|OX8Z^8!!4lBhl)luQU&STB zS2FokTmpP0lV8Opz*jQ)Rb0aPt%v&yEb!by|I)-inxc4R>f7TowzCk98=!Z z*M)^4;N@BuGJR6IJ9#Shl1y>wF}BBa>V(oGgLz|KPes01iix&%g+{|Rpp^p0p4TZ| z47t>wZ&M?aG|%n5XusU#uQM4WPpXtoF4qp2b11nbC1%qyTofhrbW-hLN_HiqeD)OF zUSUdCK@N3KgwheO=Lhz_F-b=RI|o80FQt7NpZ*R7Ro%2F-rkSos1 zrl_fQVP%8XY0Doc8aLyZ=?@fs$bn)Pg$04PDp4d^cDkV_N7X@CT6#7P2}Cb^Pd;f> zFs^%n8RAlb79-u0CTeQiMxwU2M*nD@g`TgEoPOk@dTjOSjJU#K!XU&5ZDZ%~UUlVl zVp~|#g6!{%FQxYrwRA@mL*`O0uDs}Km{^)y%Q$M9U=R#7HCOqt9&J@p>UJLyYj71P zysy>7()Z3G)yh1sC&uZ)h?2svw;{8Ah%xxYvZe<(WjbUxq^Jcdz03X)TOF-fI}}fA zpT%az)MCb8#BncDT`b)85ZUsGujKS8;^BGRu@u#2%)oZ7`}<)j!>;HNkHr}dvKHOE z&A|3gqurJFIt`k%6s!wk`S$GtIxZt+S$jQc`bhh|gIk_E7Nv3d;r#siW(9(Es^x^; z+jE|M1^_4V$tCA$FqUi|K`7d{z@}w|4v9@tVM{>WVbbBO_&sZ`@La9P&3QLPjxYjk z!olATx2-QRNR)QQt14`A-ysm>g2-|{eImqMj6_-2l1@h)`I5q+OTyV{V zzo_zrD9mfGXLD=yreQW)O>)GL>OvJHEn4MvCca6PNmJl$MKvlmOJ;z-sD1zaO_9`h z8^ff>snA<4r7z!D+WB|rXtcjkI#oI65`8(MN7c3hToBTHK!St+e;*=&HIfkhKYKHpkQBas^NkJ zCp8d5NhAb^q^gu8In{Rp@n6LCp&=m93Ihnl^4Gm!I4=m~?Ih!I)yK)!W2e9SIrS|R zZ?XK?8A3u8#l37v@iv0D%xcZ1xbs+DM5}6GFW~ eI~Rx&E9?iOL=^Uk6fY}`qTZx@HU^QM)&Brus9QAv diff --git a/project/jsonld/modos_schema.context.jsonld b/project/jsonld/modos_schema.context.jsonld index 18839ba..485fda9 100644 --- a/project/jsonld/modos_schema.context.jsonld +++ b/project/jsonld/modos_schema.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-10-23T16:01:04", + "generation_date": "2024-11-08T09:56:38", "source": "modos_schema.yaml" }, "@context": { @@ -100,7 +100,7 @@ "@id": "omics_type" }, "sample_processing": { - "@type": "@id", + "@type": "xsd:anyURI", "@id": "sample_processing" }, "sequence_md5": { diff --git a/project/jsonld/modos_schema.jsonld b/project/jsonld/modos_schema.jsonld index 6865628..e4c56e1 100644 --- a/project/jsonld/modos_schema.jsonld +++ b/project/jsonld/modos_schema.jsonld @@ -1080,9 +1080,9 @@ ], "metamodel_version": "1.7.0", "source_file": "modos_schema.yaml", - "source_file_date": "2024-10-23T15:50:05", - "source_file_size": 8488, - "generation_date": "2024-10-23T16:01:04", + "source_file_date": "2024-11-08T09:56:24", + "source_file_size": 9291, + "generation_date": "2024-11-08T09:56:39", "@type": "SchemaDefinition", "@context": [ "project/jsonld/modos_schema.context.jsonld", diff --git a/project/jsonschema/modos_schema.schema.json b/project/jsonschema/modos_schema.schema.json index 61dbd71..15a711e 100644 --- a/project/jsonschema/modos_schema.schema.json +++ b/project/jsonschema/modos_schema.schema.json @@ -172,7 +172,10 @@ "items": { "type": "string" }, - "type": "array" + "type": [ + "array", + "null" + ] } }, "required": [ @@ -401,21 +404,30 @@ }, "description": { "description": "A human-readable description for a thing", - "type": "string" + "type": [ + "string", + "null" + ] }, "has_reference": { "description": "Specifies the reference coordinate system used by an omics dataset.", "items": { "type": "string" }, - "type": "array" + "type": [ + "array", + "null" + ] }, "has_sample": { "description": "Biological sample included or described by a given thing.", "items": { "type": "string" }, - "type": "array" + "type": [ + "array", + "null" + ] }, "id": { "description": "A unique identifier for a thing", @@ -423,7 +435,10 @@ }, "name": { "description": "A human-readable name for a thing", - "type": "string" + "type": [ + "string", + "null" + ] } }, "required": [ @@ -640,7 +655,7 @@ "description": "The biological sex of a sample." }, "source_material": { - "description": "The biological source from which the sample was isolated (tissue, organ).\nShould be a tissue or organ code URI from the UBERON ontology.\nSee: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon)\n", + "description": "The biological source from which the sample was isolated (tissue, organ).\nShould be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) ontology or [fairgenomes biospecimen types](https://raw.githubusercontent.com/fairgenomes/fairgenomes-semantic-model/refs/tags/v1.2/generated/ontology/fair-genomes-biospecimentypes.ttl).\n", "type": [ "string", "null" diff --git a/project/owl/modos_schema.owl.ttl b/project/owl/modos_schema.owl.ttl index 67e69aa..e03d9eb 100644 --- a/project/owl/modos_schema.owl.ttl +++ b/project/owl/modos_schema.owl.ttl @@ -57,40 +57,40 @@ modos:MODO a owl:Class, linkml:ClassDefinition ; rdfs:label "MODO" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:allValuesFrom linkml:Datetime ; owl:onProperty modos:last_update_date ], [ a owl:Restriction ; owl:allValuesFrom linkml:Datetime ; owl:onProperty modos:creation_date ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:last_update_date ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty modos:source_uri ], + owl:onProperty modos:creation_date ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:last_update_date ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Uri ; + owl:maxCardinality 1 ; owl:onProperty modos:source_uri ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:source_uri ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uri ; + owl:onProperty modos:source_uri ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:has_assay ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:creation_date ], + owl:minCardinality 0 ; + owl:onProperty modos:has_assay ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 1 ; owl:onProperty modos:creation_date ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Datetime ; - owl:onProperty modos:creation_date ], + owl:minCardinality 1 ; + owl:onProperty modos:last_update_date ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom modos:Assay ; owl:onProperty modos:has_assay ], modos:NamedThing ; skos:definition "Represents the Multi-Omics Digital Object. It encapsulates omics and other datasets and their metadata." ; @@ -160,8 +160,11 @@ modos:Assay a owl:Class, owl:allValuesFrom modos:OmicsType ; owl:onProperty modos:omics_type ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_data ], + owl:minCardinality 0 ; + owl:onProperty modos:has_sample ], + [ a owl:Restriction ; + owl:allValuesFrom modos:Sample ; + owl:onProperty modos:has_sample ], [ a owl:Restriction ; owl:allValuesFrom modos:DataEntity ; owl:onProperty modos:has_data ], @@ -169,20 +172,20 @@ modos:Assay a owl:Class, owl:minCardinality 0 ; owl:onProperty modos:has_data ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:omics_type ], - [ a owl:Restriction ; - owl:allValuesFrom modos:Sample ; - owl:onProperty modos:has_sample ], + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:sample_processing ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:has_sample_processing ], + owl:onProperty modos:sample_processing ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty modos:has_sample ], + owl:onProperty modos:has_data ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:has_sample ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty modos:omics_type ], modos:NamedThing ; skos:definition "A coordinated set of actions designed to generate data from samples." ; skos:inScheme . @@ -192,62 +195,44 @@ modos:ReferenceGenome a owl:Class, rdfs:label "ReferenceGenome" ; rdfs:seeAlso GENO:0000914 ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:source_uri ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_sequence ], - [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty modos:version ], + owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty modos:source_uri ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty modos:taxon_id ], + owl:allValuesFrom linkml:Uri ; + owl:onProperty modos:source_uri ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:version ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:maxCardinality 1 ; owl:onProperty modos:version ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:taxon_id ], [ a owl:Restriction ; owl:minCardinality 1 ; owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:taxon_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty modos:version ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uri ; - owl:onProperty modos:source_uri ], + owl:onProperty modos:has_sequence ], [ a owl:Restriction ; - owl:allValuesFrom modos:ReferenceSequence ; + owl:minCardinality 0 ; owl:onProperty modos:has_sequence ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:taxon_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty modos:has_sequence ], + owl:onProperty modos:data_path ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:source_uri ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:String ; owl:onProperty modos:version ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:source_uri ], + owl:onProperty modos:taxon_id ], [ a owl:Restriction ; owl:allValuesFrom modos:ReferenceSequence ; owl:onProperty modos:has_sequence ], @@ -261,27 +246,21 @@ modos:ReferenceSequence a owl:Class, rdfs:seeAlso GENO:0000017 ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty modos:sequence_md5 ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; owl:onProperty modos:version ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:version ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty modos:source_uri ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:minCardinality 0 ; owl:onProperty modos:version ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uri ; - owl:onProperty modos:source_uri ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:sequence_md5 ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:sequence_md5 ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; owl:onProperty modos:source_uri ], [ a owl:Restriction ; owl:allValuesFrom [ a rdfs:Datatype ; @@ -289,6 +268,12 @@ modos:ReferenceSequence a owl:Class, owl:onDatatype xsd:string ; owl:withRestrictions ( [ xsd:pattern "^[a-f0-9]{32}$" ] ) ] ) ] ; owl:onProperty modos:sequence_md5 ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uri ; + owl:onProperty modos:source_uri ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:sequence_md5 ], modos:NamedThing ; skos:definition "A contiguous sequence of DNA part of a reference coordinate system (genome assembly)." ; skos:inScheme . @@ -338,13 +323,22 @@ modos:Sample a owl:Class, rdfs:seeAlso bioschemas:Sample ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:sex ], + owl:onProperty modos:cell_type ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:cell_type ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:taxon_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:source_material ], + owl:onProperty modos:taxon_id ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty modos:collector ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:source_material ], [ a owl:Restriction ; owl:allValuesFrom modos:Sex ; owl:onProperty modos:sex ], @@ -352,29 +346,17 @@ modos:Sample a owl:Class, owl:minCardinality 0 ; owl:onProperty modos:sex ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty modos:source_material ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty modos:taxon_id ], + owl:maxCardinality 1 ; + owl:onProperty modos:sex ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:cell_type ], [ a owl:Restriction ; owl:allValuesFrom linkml:Uriorcurie ; owl:onProperty modos:source_material ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:taxon_id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:sex ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty modos:cell_type ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:cell_type ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:collector ], @@ -498,49 +480,6 @@ modos:taxon_id a owl:ObjectProperty, """ ; skos:inScheme . -modos:DataEntity a owl:Class, - linkml:ClassDefinition ; - rdfs:label "DataEntity" ; - rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom modos:DataFormat ; - owl:onProperty modos:data_format ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_reference ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:has_sample ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_format ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_format ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:allValuesFrom modos:ReferenceGenome ; - owl:onProperty modos:has_reference ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:has_reference ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_sample ], - [ a owl:Restriction ; - owl:allValuesFrom modos:Sample ; - owl:onProperty modos:has_sample ], - modos:NamedThing ; - skos:definition "An entity containing data." ; - skos:inScheme . - modos:has_part a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "has_part" ; @@ -551,41 +490,41 @@ modos:DataEntity a owl:Class, linkml:ClassDefinition ; rdfs:label "DataEntity" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom modos:ReferenceGenome ; owl:onProperty modos:has_reference ], [ a owl:Restriction ; - owl:allValuesFrom modos:DataFormat ; - owl:onProperty modos:data_format ], + owl:allValuesFrom linkml:String ; + owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom modos:Sample ; owl:onProperty modos:has_sample ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_format ], + owl:minCardinality 1 ; + owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:allValuesFrom modos:Sample ; + owl:maxCardinality 1 ; owl:onProperty modos:has_sample ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty modos:data_format ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty modos:has_sample ], + owl:onProperty modos:data_format ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:has_reference ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_path ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty modos:data_path ], + owl:allValuesFrom modos:DataFormat ; + owl:onProperty modos:data_format ], [ a owl:Restriction ; - owl:allValuesFrom modos:ReferenceGenome ; + owl:maxCardinality 1 ; owl:onProperty modos:has_reference ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_format ], + owl:minCardinality 0 ; + owl:onProperty modos:has_sample ], modos:NamedThing ; skos:definition "An entity containing data." ; skos:inScheme . @@ -594,43 +533,31 @@ modos:NamedThing a owl:Class, linkml:ClassDefinition ; rdfs:label "NamedThing" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty modos:id ], - [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom linkml:String ; owl:onProperty modos:name ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:name ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty modos:name ], + owl:onProperty modos:description ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:id ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:description ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:description ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:name ], [ a owl:Restriction ; owl:minCardinality 1 ; owl:onProperty modos:id ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty modos:id ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:id ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty modos:description ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:name ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; owl:onProperty modos:name ] ; skos:definition "A generic grouping for any identifiable entity" ; skos:exactMatch schema1:Thing ; diff --git a/project/shacl/modos_schema.shacl.ttl b/project/shacl/modos_schema.shacl.ttl index 37b5b72..60406c2 100644 --- a/project/shacl/modos_schema.shacl.ttl +++ b/project/shacl/modos_schema.shacl.ttl @@ -9,13 +9,19 @@ schema1:Thing a sh:NodeShape ; sh:closed true ; sh:description "A generic grouping for any identifiable entity" ; - sh:ignoredProperties ( modos:omics_type modos:data_format modos:source_uri modos:data_path modos:has_data modos:version modos:has_sequence modos:taxon_id modos:has_sample modos:has_assay modos:has_reference modos:last_update_date modos:creation_date modos:source_material modos:sex modos:sequence_md5 modos:cell_type modos:collector rdf:type ) ; + sh:ignoredProperties ( modos:creation_date modos:sequence_md5 modos:has_reference modos:version modos:taxon_id modos:has_assay modos:omics_type modos:last_update_date modos:collector modos:has_data modos:data_format modos:source_uri modos:has_sample rdf:type modos:cell_type modos:sex modos:sample_processing modos:has_sequence modos:source_material modos:data_path ) ; sh:property [ sh:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path schema1:description ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path schema1:name ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -28,22 +34,29 @@ modos:AlignmentSet a sh:NodeShape ; sh:closed true ; sh:description "A data entity consisting of genomic intervals aligned to a reference." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class modos:Sample ; - sh:description "Biological sample included or described by a given thing." ; + sh:property [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path modos:has_sample ], + sh:order 3 ; + sh:path modos:has_reference ], + [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 1 ; + sh:path modos:data_format ], [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; + sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; + sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ], - [ sh:class modos:ReferenceGenome ; - sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:order 0 ; + sh:path modos:data_path ], + [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ], + sh:order 2 ; + sh:path modos:has_sample ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; @@ -58,18 +71,11 @@ modos:AlignmentSet a sh:NodeShape ; sh:order 4 ; sh:path schema1:identifier ], [ sh:datatype xsd:string ; - sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; + sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:data_path ], - [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 ) ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path modos:data_format ] ; + sh:order 6 ; + sh:path schema1:description ] ; sh:targetClass modos:AlignmentSet . modos:Array a sh:NodeShape ; @@ -77,7 +83,7 @@ modos:Array a sh:NodeShape ; sh:description "Data entity consisting of an N-dimensional array." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 ) ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 1 ; @@ -87,19 +93,6 @@ modos:Array a sh:NodeShape ; sh:nodeKind sh:IRI ; sh:order 2 ; sh:path modos:has_sample ], - [ sh:datatype xsd:string ; - sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:data_path ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], [ sh:class modos:ReferenceGenome ; sh:description "Specifies the reference coordinate system used by an omics dataset." ; sh:nodeKind sh:IRI ; @@ -111,11 +104,6 @@ modos:Array a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 6 ; sh:path schema1:description ], - [ sh:class modos:ReferenceGenome ; - sh:description "Specifies the reference coordinate system used by an omics dataset." ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ], [ sh:datatype xsd:string ; sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; @@ -152,48 +140,48 @@ modos:MassSpectrometryResults a sh:NodeShape ; sh:closed true ; sh:description "A data entity consisting of quantitative results from a mass spectrometry experiment." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; + sh:property [ sh:class modos:ReferenceGenome ; + sh:description "Specifies the reference coordinate system used by an omics dataset." ; + sh:nodeKind sh:IRI ; + sh:order 3 ; + sh:path modos:has_reference ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path schema1:identifier ], + sh:order 5 ; + sh:path schema1:name ], [ sh:description "Data/file format associated with a data entity." ; sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 1 ; sh:path modos:data_format ], + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ], [ sh:class modos:Sample ; sh:description "Biological sample included or described by a given thing." ; sh:nodeKind sh:IRI ; sh:order 2 ; sh:path modos:has_sample ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], [ sh:datatype xsd:string ; sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 0 ; - sh:path modos:data_path ], - [ sh:class modos:ReferenceGenome ; - sh:description "Specifies the reference coordinate system used by an omics dataset." ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ] ; + sh:path modos:data_path ] ; sh:targetClass modos:MassSpectrometryResults . modos:VariantSet a sh:NodeShape ; @@ -201,18 +189,30 @@ modos:VariantSet a sh:NodeShape ; sh:description "A data entity consisting of genomic variants relative to a reference." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:description ], + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path schema1:identifier ], + [ sh:datatype xsd:string ; sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path modos:data_path ], - [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path modos:data_format ], + [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; + sh:nodeKind sh:IRI ; + sh:order 2 ; + sh:path modos:has_sample ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; @@ -224,119 +224,48 @@ modos:VariantSet a sh:NodeShape ; sh:nodeKind sh:IRI ; sh:order 3 ; sh:path modos:has_reference ], - [ sh:class modos:Sample ; - sh:description "Biological sample included or described by a given thing." ; - sh:nodeKind sh:IRI ; - sh:order 2 ; - sh:path modos:has_sample ], - [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; + [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; sh:maxCount 1 ; sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path schema1:identifier ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ] ; + sh:order 1 ; + sh:path modos:data_format ] ; sh:targetClass modos:VariantSet . modos:Assay a sh:NodeShape ; sh:closed true ; sh:description "A coordinated set of actions designed to generate data from samples." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:anyURI ; - sh:description """Codes describing sample processing, preparation or handling steps. -The order of the codes should reflect the order in which the steps were performed. -Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. -""" ; - sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path modos:has_sample_processing ] ; - sh:targetClass modos:Assay . - -modos:DataEntity a sh:NodeShape ; - sh:closed true ; - sh:description "An entity containing data." ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], - [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 ) ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path modos:has_data ], - [ sh:datatype xsd:string ; - sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], - [ sh:description "The type of omics considered." ; + sh:property [ sh:description "The type of omics considered." ; sh:in ( NCIT:C84343 NCIT:C153189 NCIT:C49019 NCIT:C20085 ) ; sh:minCount 1 ; sh:order 2 ; sh:path modos:omics_type ], - [ sh:class modos:Sample ; - sh:description "Biological sample included or described by a given thing." ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path modos:has_sample ], - [ sh:class modos:ReferenceGenome ; - sh:description "Specifies the reference coordinate system used by an omics dataset." ; - sh:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 4 ; - sh:path schema1:identifier ] ; - sh:targetClass modos:VariantSet . - -modos:Assay a sh:NodeShape ; - sh:closed true ; - sh:description "A coordinated set of actions designed to generate data from samples." ; - sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:description ], + sh:path schema1:identifier ], [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; + sh:description """Codes describing sample processing, preparation or handling steps. +The order of the codes should reflect the order in which the steps were performed. +Should be codes from [MSIO](https://bioregistry.io/registry/msio) or [OBI](https://obofoundry.org/ontology/obi.html)]. +""" ; sh:nodeKind sh:Literal ; sh:order 3 ; - sh:path schema1:identifier ], - [ sh:description "The type of omics considered." ; - sh:in ( NCIT:C84343 NCIT:C153189 NCIT:C49019 NCIT:C20085 ) ; - sh:minCount 1 ; - sh:order 2 ; - sh:path modos:omics_type ], + sh:path modos:sample_processing ], [ sh:class modos:DataEntity ; sh:description "Data entity included in a given collection." ; sh:nodeKind sh:IRI ; sh:order 1 ; sh:path modos:has_data ], + [ sh:class modos:Sample ; + sh:description "Biological sample included or described by a given thing." ; + sh:nodeKind sh:IRI ; + sh:order 0 ; + sh:path modos:has_sample ], [ sh:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; @@ -348,17 +277,6 @@ modos:Assay a sh:NodeShape ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 5 ; - sh:path schema1:name ], - [ sh:class modos:Sample ; - sh:description "Biological sample included or described by a given thing." ; - sh:nodeKind sh:IRI ; - sh:order 0 ; - sh:path modos:has_sample ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; sh:path schema1:name ] ; sh:targetClass modos:Assay . @@ -366,24 +284,23 @@ modos:DataEntity a sh:NodeShape ; sh:closed true ; sh:description "An entity containing data." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; + sh:property [ sh:description "Data/file format associated with a data entity." ; + sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 EDAM:format_3681 ) ; sh:maxCount 1 ; sh:minCount 1 ; + sh:order 1 ; + sh:path modos:data_format ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:data_path ], + sh:order 6 ; + sh:path schema1:description ], [ sh:class modos:ReferenceGenome ; sh:description "Specifies the reference coordinate system used by an omics dataset." ; sh:nodeKind sh:IRI ; sh:order 3 ; sh:path modos:has_reference ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -391,54 +308,49 @@ modos:DataEntity a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path schema1:identifier ], - [ sh:description "Data/file format associated with a data entity." ; - sh:in ( EDAM:format_3462 EDAM:format_1930 EDAM:format_3915 EDAM:format_1929 EDAM:format_3016 EDAM:format_3020 ) ; + [ sh:datatype xsd:string ; + sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; sh:maxCount 1 ; sh:minCount 1 ; - sh:order 1 ; - sh:path modos:data_format ], + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path modos:data_path ], + [ sh:datatype xsd:string ; + sh:description "A human-readable name for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:name ], [ sh:class modos:Sample ; sh:description "Biological sample included or described by a given thing." ; sh:nodeKind sh:IRI ; sh:order 2 ; - sh:path modos:has_sample ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ] ; + sh:path modos:has_sample ] ; sh:targetClass modos:DataEntity . -modos:DataEntity a sh:NodeShape ; +modos:MODO a sh:NodeShape ; sh:closed true ; - sh:description "An entity containing data." ; + sh:description "Represents the Multi-Omics Digital Object. It encapsulates omics and other datasets and their metadata." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:dateTime ; - sh:description "The date on which the thing was last modified." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path modos:last_update_date ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:name ], - [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; + sh:description "The date on which something was created." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path schema1:identifier ], + sh:order 0 ; + sh:path modos:creation_date ], [ sh:class modos:Assay ; sh:description "An assay that was performed as part of a given thing." ; sh:nodeKind sh:IRI ; sh:order 1 ; sh:path modos:has_assay ], + [ sh:datatype xsd:dateTime ; + sh:description "The date on which the thing was last modified." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path modos:last_update_date ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -446,26 +358,12 @@ modos:DataEntity a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path schema1:identifier ], - [ sh:datatype xsd:string ; - sh:description "The path to access a resource, on a network or local filesystem. Can be a path relative to the root of the digital object, a URL, or an absolute path." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:data_path ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; + [ sh:datatype xsd:anyURI ; + sh:description "The URI from which a resource or dataset was obtained or derived." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:description ], - [ sh:datatype xsd:dateTime ; - sh:description "The date on which the thing was last modified." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path modos:last_update_date ], + sh:order 3 ; + sh:path modos:source_uri ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; @@ -484,19 +382,7 @@ modos:ReferenceSequence a sh:NodeShape ; sh:closed true ; sh:description "A contiguous sequence of DNA part of a reference coordinate system (genome assembly)." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:anyURI ; - sh:description "The URI from which a resource or dataset was obtained or derived." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path modos:source_uri ], - [ sh:datatype xsd:string ; - sh:description "The pre-computed hash uniquely representing a biological sequence. Calculated as the MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM)." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path modos:source_uri ], - [ sh:datatype xsd:string ; + sh:property [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; @@ -506,6 +392,13 @@ modos:ReferenceSequence a sh:NodeShape ; sh:description "The pre-computed hash uniquely representing a biological sequence. Calculated as the MD5 of the upper-case sequence excluding all whitespace characters (this is equivalent to SQ:M5 in SAM)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path modos:sequence_md5 ; + sh:pattern "^[a-f0-9]{32}$" ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 5 ; sh:path schema1:description ], [ sh:datatype xsd:string ; @@ -514,9 +407,16 @@ modos:ReferenceSequence a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path modos:version ], + [ sh:datatype xsd:anyURI ; + sh:description "The URI from which a resource or dataset was obtained or derived." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path modos:source_uri ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; + sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path schema1:identifier ] ; @@ -533,36 +433,12 @@ modos:ReferenceGenome a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path modos:data_path ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path schema1:name ], - [ sh:datatype xsd:anyURI ; - sh:description """The NCBI taxon code describing the taxonomic range of a sample. -See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html) -""" ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path modos:taxon_id ], - [ sh:class modos:ReferenceSequence ; - sh:description "Denotes that a sequence belongs to a collection (e.g. a reference genome)." ; - sh:nodeKind sh:IRI ; - sh:order 1 ; - sh:path modos:has_sequence ], [ sh:datatype xsd:anyURI ; sh:description "The URI from which a resource or dataset was obtained or derived." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path modos:source_uri ], - [ sh:datatype xsd:anyURI ; - sh:description """The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. -""" ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path modos:taxon_id ], [ sh:class modos:ReferenceSequence ; sh:description "Denotes that a sequence belongs to a collection (e.g. a reference genome)." ; sh:nodeKind sh:IRI ; @@ -581,15 +457,22 @@ See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ont sh:nodeKind sh:Literal ; sh:order 5 ; sh:path schema1:identifier ], - [ sh:description "The biological sex of a sample." ; - sh:in ( "Male" "Female" ) ; - sh:maxCount 1 ; + [ sh:datatype xsd:anyURI ; + sh:description """The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. +""" ; + sh:nodeKind sh:Literal ; sh:order 2 ; - sh:path modos:sex ], + sh:path modos:taxon_id ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path schema1:name ], + [ sh:datatype xsd:string ; + sh:description "A human-readable description for a thing" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; sh:order 7 ; sh:path schema1:description ] ; sh:targetClass modos:ReferenceGenome . @@ -598,21 +481,18 @@ modos:Sample a sh:NodeShape ; sh:closed true ; sh:description "A biological sample used in assays. Examples include a whole organism, tissue or cell line." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:anyURI ; - sh:description """The cell type of the sample, if applicable. -Should be a cell type code URI from the cell ontology. -See: [https://bioregistry.io/registry/cl](https://bioregistry.io/registry/cl) -""" ; - sh:maxCount 1 ; + sh:property [ sh:datatype xsd:string ; + sh:description "The organization responsible for collecting a given sample." ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:cell_type ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; + sh:order 4 ; + sh:path modos:collector ], + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; + sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path schema1:description ], + sh:order 5 ; + sh:path schema1:identifier ], [ sh:datatype xsd:anyURI ; sh:description """The biological source from which the sample was isolated (tissue, organ). Should be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) ontology or [fairgenomes biospecimen types](https://raw.githubusercontent.com/fairgenomes/fairgenomes-semantic-model/refs/tags/v1.2/generated/ontology/fair-genomes-biospecimentypes.ttl). @@ -622,34 +502,36 @@ Should be a code URI from the [UBERON](https://bioregistry.io/registry/uberon) o sh:order 1 ; sh:path modos:source_material ], [ sh:datatype xsd:string ; - sh:description "The organization responsible for collecting a given sample." ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path modos:collector ], - [ sh:description "The biological sex of a sample." ; - sh:in ( "Male" "Female" ) ; - sh:maxCount 1 ; - sh:order 2 ; - sh:path modos:sex ], - [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; + sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path schema1:identifier ], + sh:order 6 ; + sh:path schema1:name ], [ sh:datatype xsd:anyURI ; - sh:description """The NCBI taxon code describing the taxonomic range of a sample. -See: [https://obofoundry.org/ontology/ncbitaxon.html](https://obofoundry.org/ontology/ncbitaxon.html) + sh:description """The NCBI taxon code from [ncbitaxon](https://obofoundry.org/ontology/ncbitaxon.html) describing the taxonomic range of a sample. """ ; sh:nodeKind sh:Literal ; sh:order 3 ; sh:path modos:taxon_id ], + [ sh:datatype xsd:anyURI ; + sh:description """The cell type of the sample, if applicable. +Should be a cell type code URI from the cell ontology. +See: [https://bioregistry.io/registry/cl](https://bioregistry.io/registry/cl) +""" ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 0 ; + sh:path modos:cell_type ], + [ sh:description "The biological sex of a sample." ; + sh:in ( "Male" "Female" ) ; + sh:maxCount 1 ; + sh:order 2 ; + sh:path modos:sex ], [ sh:datatype xsd:string ; - sh:description "A human-readable name for a thing" ; + sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path modos:taxon_id ] ; + sh:order 7 ; + sh:path schema1:description ] ; sh:targetClass modos:Sample . diff --git a/src/modos_schema/datamodel/modos_schema.py b/src/modos_schema/datamodel/modos_schema.py index 1efc7d2..e4b682d 100644 --- a/src/modos_schema/datamodel/modos_schema.py +++ b/src/modos_schema/datamodel/modos_schema.py @@ -1,5 +1,5 @@ # Auto generated from modos_schema.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-10-23T16:01:05 +# Generation date: 2024-11-08T09:56:39 # Schema: modos-schema # # id: https://w3id.org/sdsc-ordes/modos-schema @@ -438,6 +438,31 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): super().__post_init__(**kwargs) +@dataclass(repr=False) +class MassSpectrometryResults(DataEntity): + """ + A data entity consisting of quantitative results from a mass spectrometry experiment. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = MODOS["MassSpectrometryResults"] + class_class_curie: ClassVar[str] = "modos:MassSpectrometryResults" + class_name: ClassVar[str] = "MassSpectrometryResults" + class_model_uri: ClassVar[URIRef] = MODOS.MassSpectrometryResults + + id: Union[str, MassSpectrometryResultsId] = None + data_path: str = None + data_format: Union[str, "DataFormat"] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self._is_empty(self.id): + self.MissingRequiredField("id") + if not isinstance(self.id, MassSpectrometryResultsId): + self.id = MassSpectrometryResultsId(self.id) + + super().__post_init__(**kwargs) + + @dataclass(repr=False) class Array(DataEntity): """