From 1c9b9e603f431b220f1da8c94f95651b6faa1d10 Mon Sep 17 00:00:00 2001 From: cmdoret Date: Tue, 24 Sep 2024 11:56:07 +0200 Subject: [PATCH] chore: regen --- project/excel/modos_schema.xlsx | Bin 10779 -> 10776 bytes project/graphql/modos_schema.graphql | 8 +- project/jsonld/modos_schema.context.jsonld | 6 +- project/jsonld/modos_schema.jsonld | 90 +---- project/jsonschema/modos_schema.schema.json | 38 +- project/owl/modos_schema.owl.ttl | 228 ++++++----- project/protobuf/modos_schema.proto | 8 +- project/shacl/modos_schema.shacl.ttl | 396 ++++++++++---------- project/shex/modos_schema.shex | 8 +- project/sqlschema/modos_schema.sql | 12 +- src/modos_schema/datamodel/modos_schema.py | 52 +-- 11 files changed, 379 insertions(+), 467 deletions(-) diff --git a/project/excel/modos_schema.xlsx b/project/excel/modos_schema.xlsx index 5dcf50c8583d22676623b2bd712e3592f7bf7341..060016c5bb35238b388d88c6f028145fd7e1a9e6 100644 GIT binary patch delta 1029 zcmbOoG9!dHz?+#xgn@y9gW*P;#YEn<^*}1}Q~A+D?}38aObiTyKsqHqIiM)NpjbaS zzbI9&A~)ykq=SBk4S3q(S)bn9^_D9s@H%&gu!n~aQ(?DEes{(t4a2PO-FxSxZqgJb5LZ9;wqCB)LA!Q=KsUU3kqGi zI<4RBj0_Allh<)dZT==W4WhGOcqy0x(y%#Nlo4V~ytpdVJV~g*8>I6g8kA%!AvVmD ze+IEq;TuGzK}iw9SfX4AF;ha-niC$glVeoP{m!*cce*s53AK1LGM68W_(_ z-l(di08(SGa$%-F(6vRtv>*Xf0Hhll`8g&(6cnAzp(Y5jeX@+2G}9DLu#lgcAXu;T z%VP&W1N92BpzHPH1}mHbRoJ)v*y6W9g&`OU%Xz^HZ$T|Npf1fciythcpe_jZ1UxvI z(JeVNIY3<!G=#uD{GWc=#Tw{v0buAzqJ+)@X|Teh8bV+f+|rP?5t3zKsL0VTE~(5( zEyiMJBP^_Pv zUzDm>k(+aN(s{qb20ZQYtWWRl`tP9hs_5nsP8Aik#vQJm+g-D7X&7dG|F$IYwZjJn zndJYUer|peX1R{7|9oA+i<1dEX69UHUw5ZVwnK)U<5fdgn~mD98+Ul`d3E{kXRlYk z8u(6d)uJ8D-6~sEIE@X8xhHmpX|J>KlKLaL{%TXX{624kwG7rs|Z1G!028NKy8~LR+ui*Uy zmY*CWuCnb83junNd-y9>Z3Q^l4sRm)JmClD~l9#On zi%gy^{|szgi^4aEOs$e4gt1V$5Mr*Vsx>D(awkWsn#qHBGh^l`3$QUT%u#1x5C%py z3^XuaoV-p|39QCm<-$yVpg)R$$w30907y493Qc~mst&SvvZR_c({#?s8#tvV2dMFY zh2nuif!shL(aH7Ptl9zIj7%cT@U(^q9Ts#`t0o^*gP6KkU7BewKiCLabwRMHhCrdC zf?%O!bwLG?AGQ{`mKFisC(Mj)Qj;)P;Ra#W$?Mc1t^ygUB?=aP4>b}f#27SLUISvM zr-n3BmE`0Ps$!FCG$3|P017RZ1`8e55R3xZS@U`Eoj_oCeB)$b;6)A-Mp0P?hKd~h z;*!do)M8L(LHGFduH7;RfLers+PP7*PMoZ#DFybWx27~>)#P+dIj{!{f+oCv15~+! woq<6LMMtsH . @@ -146,57 +146,66 @@ modos:Assay a owl:Class, sphn:Assay ; rdfs:subClassOf [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:has_sample ], + owl:onProperty modos:has_data ], [ a owl:Restriction ; owl:allValuesFrom modos:OmicsType ; owl:onProperty modos:omics_type ], + [ a owl:Restriction ; + owl:allValuesFrom modos:DataEntity ; + owl:onProperty modos:has_data ], [ a owl:Restriction ; owl:allValuesFrom modos:Sample ; owl:onProperty modos:has_sample ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:has_data ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:has_sample ], [ a owl:Restriction ; - owl:allValuesFrom modos:DataEntity ; - owl:onProperty modos:has_data ], + owl:minCardinality 1 ; + owl:onProperty modos:omics_type ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty modos:has_data ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:omics_type ], + owl:minCardinality 0 ; + owl:onProperty modos:has_sample ], modos:NamedThing ; skos:definition "A coordinated set of actions designed to generate data from samples." ; skos:inScheme . -modos:CellType a owl:Class, - linkml:EnumDefinition . - modos:ReferenceGenome a owl:Class, linkml:ClassDefinition ; rdfs:label "ReferenceGenome" ; rdfs:seeAlso GENO:0000914 ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom linkml:Integer ; - owl:onProperty modos:taxon_id ], + owl:minCardinality 1 ; + owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty modos:version ], + owl:minCardinality 0 ; + owl:onProperty modos:has_sequence ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:maxCardinality 1 ; owl:onProperty modos:data_path ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:taxon_id ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:source_uri ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:version ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:String ; + 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:source_uri ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty modos:version ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:has_sequence ], @@ -206,21 +215,9 @@ modos:ReferenceGenome a owl:Class, [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:taxon_id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:source_uri ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:has_sequence ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_path ], [ a owl:Restriction ; owl:allValuesFrom modos:ReferenceSequence ; owl:onProperty modos:has_sequence ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:data_path ], modos:NamedThing ; skos:definition "Reference assembly of a given genome, consisting of a collection of congiguous sequences (contigs)." ; skos:inScheme . @@ -230,35 +227,35 @@ modos:ReferenceSequence a owl:Class, rdfs:label "ReferenceSequence" ; rdfs:seeAlso GENO:0000017 ; rdfs:subClassOf [ a owl:Restriction ; - 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:maxCardinality 1 ; owl:onProperty modos:version ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:version ], - [ a owl:Restriction ; - owl:allValuesFrom [ a rdfs:Datatype ; - owl:intersectionOf ( linkml:String [ a rdfs:Datatype ; - 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:minCardinality 0 ; owl:onProperty modos:source_uri ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty modos:source_uri ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:sequence_md5 ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom [ a rdfs:Datatype ; + owl:intersectionOf ( linkml:String [ a rdfs:Datatype ; + 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:allValuesFrom linkml:String ; + owl:onProperty modos:version ], modos:NamedThing ; skos:definition "A contiguous sequence of DNA part of a reference coordinate system (genome assembly)." ; skos:inScheme . @@ -273,9 +270,6 @@ modos:ReferenceSequence a owl:Class, rdfs:label "Male" ; rdfs:subClassOf modos:Sex . -modos:SourceMaterial a owl:Class, - linkml:EnumDefinition . - modos:collector a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "collector" ; @@ -300,46 +294,44 @@ modos:Sample a owl:Class, rdfs:label "Sample" ; rdfs:seeAlso bioschemas:Sample ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom [ a rdfs:Datatype ; - owl:unionOf ( modos:SourceMaterial linkml:String ) ] ; - owl:onProperty modos:source_material ], - [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty modos:source_material ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty modos:collector ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Integer ; + owl:allValuesFrom linkml:Uriorcurie ; owl:onProperty modos:taxon_id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:source_material ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:collector ], - [ a owl:Restriction ; - owl:allValuesFrom modos:Sex ; owl:onProperty modos:sex ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty modos:cell_type ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:Uriorcurie ; owl:onProperty modos:cell_type ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty modos:taxon_id ], + owl:onProperty modos:collector ], [ a owl:Restriction ; - owl:allValuesFrom [ a rdfs:Datatype ; - owl:unionOf ( modos:CellType linkml:String ) ] ; + owl:allValuesFrom linkml:String ; + owl:onProperty modos:collector ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:source_material ], + [ 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:maxCardinality 1 ; owl:onProperty modos:sex ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom modos:Sex ; owl:onProperty modos:sex ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:taxon_id ], modos:NamedThing ; skos:definition "A biological sample used in assays. Examples include a whole organism, tissue or cell line." ; skos:inScheme . @@ -347,9 +339,11 @@ modos:Sample a owl:Class, modos:cell_type a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "cell_type" ; - rdfs:range [ a rdfs:Datatype ; - owl:unionOf ( modos:CellType linkml:String ) ] ; - skos:definition "The cell type name or code, if applicable." ; + rdfs:range linkml:Uriorcurie ; + skos:definition """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) +""" ; skos:inScheme . modos:creation_date a owl:ObjectProperty, @@ -444,57 +438,61 @@ modos:sex a owl:ObjectProperty, modos:source_material a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "source_material" ; - rdfs:range [ a rdfs:Datatype ; - owl:unionOf ( modos:SourceMaterial linkml:String ) ] ; - skos:definition "The biological source from which the sample was isolated (tissue, organ)." ; + 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) +""" ; skos:inScheme . modos:taxon_id a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "taxon_id" ; - rdfs:range linkml:Integer ; - skos:definition "The taxid number describing the taxonomic range of a sample." ; + 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:inScheme . modos:DataEntity a owl:Class, linkml:ClassDefinition ; rdfs:label "DataEntity" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty modos:data_format ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty modos:data_path ], + owl:maxCardinality 1 ; + owl:onProperty modos:has_sample ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty modos:data_path ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty modos:has_sample ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom modos:ReferenceGenome ; owl:onProperty modos:has_reference ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty modos:has_reference ], + owl:allValuesFrom modos:DataFormat ; + owl:onProperty modos:data_format ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + 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 ], - [ a owl:Restriction ; - owl:allValuesFrom modos:ReferenceGenome ; - owl:onProperty modos:has_reference ], + 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:minCardinality 1 ; owl:onProperty modos:data_format ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty modos:data_format ], + owl:onProperty modos:has_reference ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty modos:has_reference ], modos:NamedThing ; skos:definition "An entity containing data." ; skos:inScheme . @@ -509,32 +507,32 @@ modos:NamedThing a owl:Class, linkml:ClassDefinition ; rdfs:label "NamedThing" ; rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty modos:id ], + owl:minCardinality 0 ; + owl:onProperty modos:name ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:String ; owl:onProperty modos:description ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty modos:name ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Uriorcurie ; - owl:onProperty modos:id ], [ a owl:Restriction ; owl:minCardinality 1 ; owl:onProperty modos:id ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:minCardinality 0 ; owl:onProperty modos:description ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty modos:description ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty modos:name ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Uriorcurie ; + owl:onProperty modos:id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty modos:name ] ; + owl:onProperty modos:id ] ; skos:definition "A generic grouping for any identifiable entity" ; skos:exactMatch schema1:Thing ; skos:inScheme . diff --git a/project/protobuf/modos_schema.proto b/project/protobuf/modos_schema.proto index 65bcee6..123a3db 100644 --- a/project/protobuf/modos_schema.proto +++ b/project/protobuf/modos_schema.proto @@ -75,7 +75,7 @@ message ReferenceGenome string description = 0 string dataPath = 0 repeated referenceSequence hasSequence = 0 - repeated integer taxonId = 0 + repeated uriorcurie taxonId = 0 uri sourceUri = 0 string version = 0 } @@ -95,10 +95,10 @@ message Sample uriorcurie id = 0 string name = 0 string description = 0 - string cellType = 0 - string sourceMaterial = 0 + uriorcurie cellType = 0 + uriorcurie sourceMaterial = 0 sex sex = 0 - repeated integer taxonId = 0 + repeated uriorcurie taxonId = 0 repeated string collector = 0 } // A data entity consisting of genomic variants relative to a reference. diff --git a/project/shacl/modos_schema.shacl.ttl b/project/shacl/modos_schema.shacl.ttl index 3139c1f..9196bbb 100644 --- a/project/shacl/modos_schema.shacl.ttl +++ b/project/shacl/modos_schema.shacl.ttl @@ -10,35 +10,42 @@ schema1:Thing a sh:NodeShape ; sh:closed true ; sh:description "A generic grouping for any identifiable entity" ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; + sh:property [ 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 schema1:identifier ], + 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:string ; - sh:description "A human-readable description for a thing" ; + [ sh:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path schema1:description ] ; + sh:order 0 ; + sh:path schema1:identifier ] ; sh:targetClass schema1:Thing . 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: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:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -46,17 +53,6 @@ modos:AlignmentSet a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 4 ; sh:path schema1:identifier ], - [ 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: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:datatype xsd:string ; sh:description "A human-readable description for a thing" ; sh:maxCount 1 ; @@ -69,32 +65,47 @@ modos:AlignmentSet a sh:NodeShape ; 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: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:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:data_path ] ; + 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: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:anyURI ; + 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: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: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: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: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 ; @@ -112,18 +123,7 @@ modos:Array a sh:NodeShape ; 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: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:path schema1:name ] ; sh:targetClass modos:Array . modos:MODOCollection a sh:NodeShape ; @@ -140,66 +140,73 @@ 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:anyURI ; - sh:description "A unique identifier for a thing" ; + sh:property [ 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: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 "A human-readable name 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 ) ; 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: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 0 ; - sh:path modos:data_path ], + 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: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: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: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: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: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: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 ], - [ 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:DataEntity ; sh:description "Data entity included in a given collection." ; sh:nodeKind sh:IRI ; @@ -210,40 +217,35 @@ modos:Assay a sh:NodeShape ; 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 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - 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 4 ; - 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:targetClass modos:Assay . modos:DataEntity a sh:NodeShape ; sh:closed true ; sh:description "An entity containing data." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class modos:Sample ; + 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: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: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:nodeKind sh:IRI ; - sh:order 3 ; - sh:path modos:has_reference ], + sh:order 0 ; + sh:path modos:data_path ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -251,19 +253,17 @@ 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:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path modos:data_format ], + [ 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: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:order 6 ; + sh:path schema1:description ], [ sh:datatype xsd:string ; sh:description "A human-readable name for a thing" ; sh:maxCount 1 ; @@ -276,31 +276,37 @@ modos:MODO a sh:NodeShape ; sh:closed true ; sh:description "Represents the Multi-Omics Digital Object. It encapsulates omics and other datasets and their metadata." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:class modos:Assay ; + 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: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: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:anyURI ; - sh:description "A unique identifier for a thing" ; + sh:description "The URI from which a resource or dataset was obtained or derived." ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path schema1:identifier ], + sh:order 3 ; + sh:path modos:source_uri ], [ 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:dateTime ; - sh:description "The date on which something was created." ; - 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 ; @@ -308,18 +314,12 @@ modos:MODO a sh:NodeShape ; sh:order 5 ; sh:path schema1:name ], [ sh:datatype xsd:dateTime ; - sh:description "The date on which the thing was last modified." ; + sh:description "The date on which something was created." ; 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 "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:order 0 ; + sh:path modos:creation_date ] ; sh:targetClass modos:MODO . modos:ReferenceSequence a sh:NodeShape ; @@ -327,24 +327,18 @@ modos:ReferenceSequence a sh:NodeShape ; sh:description "A contiguous sequence of DNA part of a reference coordinate system (genome assembly)." ; 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: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 0 ; sh:path modos:sequence_md5 ; sh:pattern "^[a-f0-9]{32}$" ], - [ 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:datatype xsd:string ; - sh:description "A string specifying the release or version of a software or resource." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path modos:version ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -353,17 +347,23 @@ modos:ReferenceSequence a sh:NodeShape ; sh:order 3 ; sh:path schema1:identifier ], [ 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 5 ; - sh:path schema1:description ], + sh:order 4 ; + sh:path schema1:name ], [ 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:path modos:source_uri ], + [ sh:datatype xsd:string ; + sh:description "A string specifying the release or version of a software or resource." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 2 ; + sh:path modos:version ] ; sh:targetClass modos:ReferenceSequence . modos:ReferenceGenome a sh:NodeShape ; @@ -371,18 +371,30 @@ modos:ReferenceGenome a sh:NodeShape ; sh:description "Reference assembly of a given genome, consisting of a collection of congiguous sequences (contigs)." ; 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:description "A string specifying the release or version of a software or resource." ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path modos:data_path ], + sh:order 4 ; + sh:path modos:version ], [ 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:datatype xsd:anyURI ; + sh:description "A unique identifier for a thing" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 5 ; + sh:path schema1:identifier ], [ sh:datatype xsd:anyURI ; sh:description "The URI from which a resource or dataset was obtained or derived." ; sh:maxCount 1 ; @@ -394,41 +406,63 @@ modos:ReferenceGenome a sh:NodeShape ; sh:nodeKind sh:IRI ; sh:order 1 ; sh:path modos:has_sequence ], - [ sh:datatype xsd:integer ; - sh:description "The taxid number describing the taxonomic range of a sample." ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path modos:taxon_id ], [ sh:datatype xsd:string ; - sh:description "A string specifying the release or version of a software or resource." ; + 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 4 ; - sh:path modos:version ], + sh:order 0 ; + sh:path modos:data_path ], [ 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:targetClass modos:ReferenceGenome . + +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 "A unique identifier for a thing" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 5 ; sh:path schema1:identifier ], - [ sh:datatype xsd:string ; - sh:description "A human-readable description for a thing" ; + [ 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) +""" ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path schema1:description ] ; - sh:targetClass modos:ReferenceGenome . - -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:integer ; - sh:description "The taxid number describing the taxonomic range of a sample." ; + sh:order 1 ; + sh:path modos:source_material ], + [ 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: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 3 ; sh:path modos:taxon_id ], + [ 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 "The organization responsible for collecting a given sample." ; sh:nodeKind sh:Literal ; @@ -445,30 +479,6 @@ modos:Sample a sh:NodeShape ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 6 ; - sh:path schema1:name ], - [ sh:description "The cell type name or code, if applicable." ; - sh:maxCount 1 ; - sh:or ( [ sh:in [ rdf:rest () ] ] [ sh:datatype xsd:string ; - sh:nodeKind sh:Literal ] ) ; - sh:order 0 ; - sh:path modos:cell_type ], - [ sh:datatype xsd:anyURI ; - sh:description "A unique identifier for a thing" ; - sh:maxCount 1 ; - sh:minCount 1 ; - 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:description "The biological source from which the sample was isolated (tissue, organ)." ; - sh:maxCount 1 ; - sh:or ( [ sh:in [ rdf:rest () ] ] [ sh:datatype xsd:string ; - sh:nodeKind sh:Literal ] ) ; - sh:order 1 ; - sh:path modos:source_material ] ; + sh:path schema1:name ] ; sh:targetClass modos:Sample . diff --git a/project/shex/modos_schema.shex b/project/shex/modos_schema.shex index 2b916c7..7680a02 100644 --- a/project/shex/modos_schema.shex +++ b/project/shex/modos_schema.shex @@ -121,7 +121,7 @@ linkml:Sparqlpath xsd:string rdf:type [ schema1:Thing ] ? ; @linkml:String ; @ * ; - @linkml:Integer * ; + @linkml:Uriorcurie * ; @linkml:Uri ? ; @linkml:String ? ) ; @@ -143,10 +143,10 @@ linkml:Sparqlpath xsd:string CLOSED { ( $ ( & ; rdf:type [ schema1:Thing ] ? ; - @linkml:String ? ; - @linkml:String ? ; + @linkml:Uriorcurie ? ; + @linkml:Uriorcurie ? ; [ ] ? ; - @linkml:Integer * ; + @linkml:Uriorcurie * ; @linkml:String * ) ; rdf:type [ ] diff --git a/project/sqlschema/modos_schema.sql b/project/sqlschema/modos_schema.sql index 121ce3a..0ee7e65 100644 --- a/project/sqlschema/modos_schema.sql +++ b/project/sqlschema/modos_schema.sql @@ -15,8 +15,8 @@ -- * Slot: name Description: A human-readable name for a thing -- * 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 name or code, if applicable. --- * Slot: source_material Description: The biological source from which the sample was isolated (tissue, organ). +-- * 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: 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 @@ -75,7 +75,7 @@ -- * Slot: omics_type Description: The type of omics considered. -- # Class: "Sample_taxon_id" Description: "" -- * Slot: Sample_id Description: Autocreated FK slot --- * Slot: taxon_id Description: The taxid number describing the taxonomic range of a sample. +-- * 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) -- # Class: "Sample_collector" Description: "" -- * Slot: Sample_id Description: Autocreated FK slot -- * Slot: collector Description: The organization responsible for collecting a given sample. @@ -90,7 +90,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 taxid number describing the taxonomic range of a sample. +-- * 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) -- # 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. @@ -218,7 +218,7 @@ CREATE TABLE "Assay_omics_type" ( ); CREATE TABLE "Sample_taxon_id" ( "Sample_id" TEXT, - taxon_id INTEGER, + taxon_id TEXT, PRIMARY KEY ("Sample_id", taxon_id), FOREIGN KEY("Sample_id") REFERENCES "Sample" (id) ); @@ -251,7 +251,7 @@ CREATE TABLE "ReferenceGenome_has_sequence" ( ); CREATE TABLE "ReferenceGenome_taxon_id" ( "ReferenceGenome_id" TEXT, - taxon_id INTEGER, + taxon_id TEXT, PRIMARY KEY ("ReferenceGenome_id", taxon_id), FOREIGN KEY("ReferenceGenome_id") REFERENCES "ReferenceGenome" (id) ); diff --git a/src/modos_schema/datamodel/modos_schema.py b/src/modos_schema/datamodel/modos_schema.py index 396a6d4..5615196 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-09-23T15:24:42 +# Generation date: 2024-09-24T11:54:46 # Schema: modos-schema # # id: https://w3id.org/sdsc-ordes/modos-schema @@ -22,7 +22,7 @@ from linkml_runtime.utils.enumerations import EnumDefinitionImpl from rdflib import Namespace, URIRef from linkml_runtime.utils.curienamespace import CurieNamespace -from linkml_runtime.linkml_model.types import Datetime, Integer, String, Uri, Uriorcurie +from linkml_runtime.linkml_model.types import Datetime, String, Uri, Uriorcurie from linkml_runtime.utils.metamodelcore import URI, URIorCURIE, XSDDateTime metamodel_version = "1.7.0" @@ -220,10 +220,10 @@ class Sample(NamedThing): class_model_uri: ClassVar[URIRef] = MODOS.Sample id: Union[str, SampleId] = None - cell_type: Optional[str] = None - source_material: Optional[str] = None + cell_type: Optional[Union[str, URIorCURIE]] = None + source_material: Optional[Union[str, URIorCURIE]] = None sex: Optional[Union[str, "Sex"]] = None - taxon_id: Optional[Union[int, List[int]]] = empty_list() + taxon_id: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() collector: Optional[Union[str, List[str]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @@ -232,18 +232,18 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.id, SampleId): self.id = SampleId(self.id) - if self.cell_type is not None and not isinstance(self.cell_type, str): - self.cell_type = str(self.cell_type) + if self.cell_type is not None and not isinstance(self.cell_type, URIorCURIE): + self.cell_type = URIorCURIE(self.cell_type) - if self.source_material is not None and not isinstance(self.source_material, str): - self.source_material = str(self.source_material) + if self.source_material is not None and not isinstance(self.source_material, URIorCURIE): + self.source_material = URIorCURIE(self.source_material) if self.sex is not None and not isinstance(self.sex, Sex): self.sex = Sex(self.sex) if not isinstance(self.taxon_id, list): self.taxon_id = [self.taxon_id] if self.taxon_id is not None else [] - self.taxon_id = [v if isinstance(v, int) else int(v) for v in self.taxon_id] + self.taxon_id = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.taxon_id] if not isinstance(self.collector, list): self.collector = [self.collector] if self.collector is not None else [] @@ -312,7 +312,7 @@ class ReferenceGenome(NamedThing): id: Union[str, ReferenceGenomeId] = None data_path: str = None has_sequence: Optional[Union[Union[str, ReferenceSequenceId], List[Union[str, ReferenceSequenceId]]]] = empty_list() - taxon_id: Optional[Union[int, List[int]]] = empty_list() + taxon_id: Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]] = empty_list() source_uri: Optional[Union[str, URI]] = None version: Optional[str] = None @@ -333,7 +333,7 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.taxon_id, list): self.taxon_id = [self.taxon_id] if self.taxon_id is not None else [] - self.taxon_id = [v if isinstance(v, int) else int(v) for v in self.taxon_id] + self.taxon_id = [v if isinstance(v, URIorCURIE) else URIorCURIE(v) for v in self.taxon_id] if self.source_uri is not None and not isinstance(self.source_uri, URI): self.source_uri = URI(self.source_uri) @@ -542,28 +542,6 @@ class DataFormat(EnumDefinitionImpl): name="DataFormat", ) -class CellType(EnumDefinitionImpl): - """ - Cell type code from the cell ontology as a URI. - See: [https://bioregistry.io/registry/cl](https://bioregistry.io/registry/cl) - """ - _defn = EnumDefinition( - name="CellType", - description="""Cell type code from the cell ontology as a URI. -See: [https://bioregistry.io/registry/cl](https://bioregistry.io/registry/cl)""", - ) - -class SourceMaterial(EnumDefinitionImpl): - """ - Tissue or organ code from the UBERON ontology as a URI. - See: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon) - """ - _defn = EnumDefinition( - name="SourceMaterial", - description="""Tissue or organ code from the UBERON ontology as a URI. -See: [https://bioregistry.io/registry/uberon](https://bioregistry.io/registry/uberon)""", - ) - # Slots class slots: pass @@ -608,7 +586,7 @@ class slots: model_uri=MODOS.data_format, domain=None, range=Union[str, "DataFormat"]) slots.taxon_id = Slot(uri=MODOS.taxon_id, name="taxon_id", curie=MODOS.curie('taxon_id'), - model_uri=MODOS.taxon_id, domain=None, range=Optional[Union[int, List[int]]]) + model_uri=MODOS.taxon_id, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]]) slots.collector = Slot(uri=MODOS.collector, name="collector", curie=MODOS.curie('collector'), model_uri=MODOS.collector, domain=None, range=Optional[Union[str, List[str]]]) @@ -627,10 +605,10 @@ class slots: model_uri=MODOS.version, domain=None, range=Optional[str]) slots.cell_type = Slot(uri=MODOS.cell_type, name="cell_type", curie=MODOS.curie('cell_type'), - model_uri=MODOS.cell_type, domain=None, range=Optional[str]) + model_uri=MODOS.cell_type, domain=None, range=Optional[Union[str, URIorCURIE]]) slots.source_material = Slot(uri=MODOS.source_material, name="source_material", curie=MODOS.curie('source_material'), - model_uri=MODOS.source_material, domain=None, range=Optional[str]) + model_uri=MODOS.source_material, domain=None, range=Optional[Union[str, URIorCURIE]]) slots.sex = Slot(uri=MODOS.sex, name="sex", curie=MODOS.curie('sex'), model_uri=MODOS.sex, domain=None, range=Optional[Union[str, "Sex"]])