Skip to content

Commit

Permalink
feat: define initial schema (#3)
Browse files Browse the repository at this point in the history
* Use clearer class names based on SPHN and FAIRGenomes conventions
* Base Sample on the widely used BioSample model
* Define cardinalities
* Improve clarity of names
  • Loading branch information
cmdoret authored Jan 12, 2024
2 parents e8a45e0 + e75ce4d commit 3b5e996
Show file tree
Hide file tree
Showing 19 changed files with 3,121 additions and 677 deletions.
81 changes: 51 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,73 @@
# smoc-schema

Metadata schema for the SMOC Multi-Omics Digital Object
Metadata schema for the SMOC Multi-Omics Digital Object.

```mermaid
erDiagram
StudyCollection {
MODOCollection {
}
Study {
datetime start_date
datetime completion_date
uriorcurie id
string name
string description
MODO {
datetime creation_date
datetime last_update_date
uri source_uri
uriorcurie id
string name
string description
}
Experiment {
Assay {
OmicsTypeList omics_type
uriorcurie id
string name
string description
}
Record {
uriorcurie location
DataFormat format
DataEntity {
string data_path
DataFormat data_format
uriorcurie id
string name
string description
}
ReferenceGenome {
string name
integer taxon_id
uriorcurie location
uriorcurie source_uri
string data_path
integerList taxon_id
uri source_uri
string version
uriorcurie id
string name
string description
}
ReferenceSequence {
string name
string sequence_md5
uriorcurie location
uriorcurie source_uri
string sequence_md5
uri source_uri
string version
uriorcurie id
string name
string description
}
Sample {
integer taxon_id
string collector
string cell_type
string source_material
Sex sex
integerList taxon_id
stringList collector
uriorcurie id
string name
string description
}
StudyCollection ||--}o Study : "entries"
Study ||--|o Experiment : "has_experiment"
Experiment ||--|o Sample : "has_sample"
Experiment ||--|o Record : "has_record"
Record ||--|o Sample : "has_sample"
Record ||--|o ReferenceGenome : "has_reference"
ReferenceGenome ||--|o ReferenceSequence : "has_sequence"
MODOCollection ||--}o MODO : "entries"
MODO ||--}o Assay : "has_assay"
Assay ||--}o Sample : "has_sample"
Assay ||--}o DataEntity : "has_data"
DataEntity ||--}o Sample : "has_sample"
DataEntity ||--|o ReferenceGenome : "has_reference"
ReferenceGenome ||--}o ReferenceSequence : "has_sequence"
```



## Website

[https://sdsc-ordes.github.io/smoc-schema](https://sdsc-ordes.github.io/smoc-schema)
Expand Down
378 changes: 179 additions & 199 deletions poetry.lock

Large diffs are not rendered by default.

Binary file modified project/excel/smoc_schema.xlsx
Binary file not shown.
102 changes: 95 additions & 7 deletions project/graphql/smoc_schema.graphql
Original file line number Diff line number Diff line change
@@ -1,23 +1,111 @@
type AlignmentSet
{
id: Uriorcurie!
name: String
description: String
dataPath: String!
dataFormat: DataFormat!
hasSample: [Sample]
hasReference: ReferenceGenome
}

type Array
{
id: Uriorcurie!
name: String
description: String
dataPath: String!
dataFormat: DataFormat!
hasSample: [Sample]
hasReference: ReferenceGenome
}

type Assay
{
id: Uriorcurie!
name: String
description: String
hasSample: [Sample]
hasData: [DataEntity]
omicsType: [OmicsType]!
}

type DataEntity
{
id: Uriorcurie!
name: String
description: String
dataPath: String!
dataFormat: DataFormat!
hasSample: [Sample]
hasReference: ReferenceGenome
}

type MODO
{
id: Uriorcurie!
name: String
description: String
creationDate: Datetime!
hasAssay: [Assay]
lastUpdateDate: Datetime!
sourceUri: Uri
}

type MODOCollection
{
entries: [MODO]
}

type NamedThing
{
id: Uriorcurie!
name: String
description: String
}

type Study
type ReferenceGenome
{
id: Uriorcurie!
name: String
description: String
dataPath: String!
hasSequence: [ReferenceSequence]
taxonId: [Integer]
sourceUri: Uri
version: String
}

type ReferenceSequence
{
id: Uriorcurie!
name: String
description: String
sequenceMd5: String
sourceUri: Uri
version: String
}

type Sample
{
id: Uriorcurie!
name: String
description: String
primaryEmail: String
birthDate: Date
ageInYears: Integer
vitalStatus: PersonStatus
cellType: String
sourceMaterial: String
sex: Sex
taxonId: [Integer]
collector: [String]
}

type StudyCollection
type VariantSet
{
entries: [Study]
id: Uriorcurie!
name: String
description: String
dataPath: String!
dataFormat: DataFormat!
hasSample: [Sample]
hasReference: ReferenceGenome
}

74 changes: 59 additions & 15 deletions project/jsonld/smoc_schema.context.jsonld
Original file line number Diff line number Diff line change
@@ -1,49 +1,93 @@
{
"comments": {
"description": "Auto generated by LinkML jsonld context generator",
"generation_date": "2023-12-18T22:01:04",
"generation_date": "2024-01-12T11:08:46",
"source": "smoc_schema.yaml"
},
"@context": {
"PATO": {
"@id": "http://purl.obolibrary.org/obo/PATO_",
"EDAM": "http://edamontology.org/",
"FG": "https://w3id.org/fair-genomes/ontology/",
"GENO": {
"@id": "http://purl.obolibrary.org/obo/GENO_",
"@prefix": true
},
"NCIT": {
"@id": "http://purl.obolibrary.org/obo/NCIT_",
"@prefix": true
},
"biolink": "https://w3id.org/biolink/",
"bioschemas": "https://bioschemas.org/",
"example": "https://example.org/",
"linkml": "https://w3id.org/linkml/",
"schema": "http://schema.org/",
"skos": "http://www.w3.org/2004/02/skos/core#",
"smoc_schema": "https://w3id.org/sdsc-ordes/smoc-schema/",
"smoc": "https://w3id.org/sdsc-ordes/smoc-schema/",
"sphn": "https://biomedit.ch/rdf/sphn-schema/sphn#",
"@vocab": "https://w3id.org/sdsc-ordes/smoc-schema/",
"age_in_years": {
"@type": "xsd:integer"
"creation_date": {
"@type": "xsd:dateTime"
},
"birth_date": {
"@type": "xsd:date",
"@id": "schema:birthDate"
"data_format": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
}
},
"description": {
"@id": "schema:description"
},
"id": "@id",
"name": {
"@id": "schema:name"
"has_assay": {
"@type": "@id"
},
"has_data": {
"@type": "@id"
},
"primary_email": {
"@id": "schema:email"
"has_part": {
"@id": "schema:hasPart"
},
"has_reference": {
"@type": "@id"
},
"has_sample": {
"@type": "@id"
},
"has_sequence": {
"@type": "@id"
},
"id": "@id",
"last_update_date": {
"@type": "xsd:dateTime"
},
"entries": {
"@type": "@id"
},
"vital_status": {
"name": {
"@id": "schema:name"
},
"omics_type": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
}
},
"sex": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
}
},
"source_uri": {
"@type": "@id"
},
"taxon_id": {
"@type": "xsd:integer"
},
"NamedThing": {
"@id": "schema:Thing"
}
Expand Down
Loading

0 comments on commit 3b5e996

Please sign in to comment.