Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use clearer class names following SPHN conventions #3

Merged
merged 32 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
49658fb
refactor: use clearer class names following SPHN conventions
cmdoret Dec 22, 2023
7d76e56
feat: add cardinalities
cmdoret Dec 22, 2023
b6d45a9
chore: regenerate schemas+classes
cmdoret Dec 22, 2023
d9b40d2
fix: format -> data_format to avoid shadowing python built-in keyword
cmdoret Dec 22, 2023
eb09c01
chore: regenerate project
cmdoret Dec 22, 2023
67dedc0
chore: regenerate project (bis)
cmdoret Dec 22, 2023
a18c67d
test: fix test instance
cmdoret Dec 22, 2023
eeb02fd
chore: bump linkml to 1.6.7 to fix enum instantiation
cmdoret Dec 22, 2023
b02979b
refactor: rename uri->location to avoid name collision with uri type
cmdoret Dec 22, 2023
96c64eb
chore: regen
cmdoret Dec 22, 2023
8cd6e45
fix: add missing omics_type on assay
cmdoret Dec 22, 2023
a07f11d
chore: regen
cmdoret Dec 22, 2023
0c47d38
fix: make most classes inherit from NamedEntity to be addressable.
cmdoret Dec 22, 2023
13d29f0
refactor: location moved to ReferenceGenome
cmdoret Dec 22, 2023
a11d574
refactor: default prefix smoc_schema -> smoc
cmdoret Jan 3, 2024
9d994a6
feat: make has_... subproperties of schema:hasPart
cmdoret Jan 3, 2024
8931625
chore: regen
cmdoret Jan 3, 2024
97ef786
docs(readme): update mmd diagram
cmdoret Jan 3, 2024
f7c6305
doc: add author field
cmdoret Jan 8, 2024
c42da64
feat: add version slot for references
cmdoret Jan 10, 2024
611050e
feat: add sample properties sex, source_material and cell_type
cmdoret Jan 10, 2024
f440527
refactor: rm study properties from Modo object
cmdoret Jan 10, 2024
dc7f4a0
fix: typos in schema
cmdoret Jan 10, 2024
9639499
feat: add creation/update dates
cmdoret Jan 10, 2024
c00fd5a
chore: regenerate project
cmdoret Jan 10, 2024
83561dc
refactor: location -> data_path
cmdoret Jan 10, 2024
23244f6
chore: regen
cmdoret Jan 10, 2024
96581ea
test: update import StudyCollection -> MODOCollection
cmdoret Jan 10, 2024
169054e
test: update test data Study->MODO
cmdoret Jan 10, 2024
7c85ca7
docs: add meaning binding to GENO for reference genome/sequence
cmdoret Jan 12, 2024
ff2e144
chore: regen
cmdoret Jan 12, 2024
e75ce4d
docs(readme): update er diagram
cmdoret Jan 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 39 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,58 @@ StudyCollection {

}
Study {
datetime start_date
datetime completion_date
uriorcurie id
string name
string description
datetime start_date
datetime completion_date
uriorcurie id
string name
string description
}
Experiment {

Assay {
OmicsTypeList omics_type
uriorcurie id
string name
string description
}
Record {
uriorcurie location
DataFormat format
DataEntity {
uri location
DataFormat data_format
uriorcurie id
string name
string description
}
ReferenceGenome {
string name
integer taxon_id
uriorcurie location
uriorcurie source_uri
uri location
integerList taxon_id
uri source_uri
uriorcurie id
string name
string description
}
ReferenceSequence {
string name
string sequence_md5
uriorcurie location
uriorcurie source_uri
string sequence_md5
uri source_uri
uriorcurie id
string name
string description
}
Sample {
integer taxon_id
string collector
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"
Study ||--}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
}

70 changes: 55 additions & 15 deletions project/jsonld/smoc_schema.context.jsonld
Original file line number Diff line number Diff line change
@@ -1,49 +1,89 @@
{
"comments": {
"description": "Auto generated by LinkML jsonld context generator",
"generation_date": "2023-12-18T22:01:04",
"generation_date": "2024-01-10T15:19:51",
"source": "smoc_schema.yaml"
},
"@context": {
"PATO": {
"@id": "http://purl.obolibrary.org/obo/PATO_",
"EDAM": "http://edamontology.org/",
"FG": "https://w3id.org/fair-genomes/ontology/",
"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"
},
"primary_email": {
"@id": "schema:email"
"has_data": {
"@type": "@id"
},
"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