Skip to content

Commit

Permalink
Add curie_map to the model (#376)
Browse files Browse the repository at this point in the history
This commit makes the `curie_map` a _bona fide_ slot of the `MappingSet`
class, that exists independently of the serialisation format.

---------

Co-authored-by: Nico Matentzoglu <[email protected]>
  • Loading branch information
gouttegd and matentzn authored Aug 6, 2024
1 parent bd03f7b commit 81fe996
Show file tree
Hide file tree
Showing 18 changed files with 956 additions and 1,939 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next

- Add the concept of "propagatable slots".
- Add the `curie_map` to the model (instead of it being a specificity of the SSSOM/TSV format).
- Add the concept of "extension slots".
- Add the entity reference `sssom:NoTermFound` to express the concept of an "unmapped entity" ([issue](https://github.com/mapping-commons/sssom/issues/28))
- Replace `semantic_similarity_score` with `similarity_score` and `semantic_similarity_measure` with `similarity_measure` in the data model ([issue](https://github.com/mapping-commons/sssom/issues/385))
Expand Down
14 changes: 14 additions & 0 deletions examples/schema/curie_map.sssom.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#curie_map:
# HP: http://purl.obolibrary.org/obo/HP_
# MP: http://purl.obolibrary.org/obo/MP_
# orcid: https://orcid.org/
#mapping_set_id: https://w3id.org/sssom/commons/examples/curie_map.sssom.tsv
#license: "https://creativecommons.org/publicdomain/zero/1.0/"
#creator_id:
# - orcid:0000-0002-7356-1779
#mapping_provider: "https://w3id.org/sssom/core_team"
#comment: This is an example file for the SSSOM for illustration only. Its contents are entirely fabricated.
subject_id predicate_id object_id mapping_justification
HP:0009124 skos:exactMatch MP:0000003 semapv:ManualMappingCuration
HP:0008551 skos:exactMatch MP:0000018 semapv:ManualMappingCuration
HP:0000411 skos:exactMatch MP:0000021 semapv:ManualMappingCuration
Binary file modified project/excel/sssom_schema.xlsx
Binary file not shown.
56 changes: 13 additions & 43 deletions project/graphql/sssom_schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,6 @@ type ExtensionDefinition
typeHint: Uriorcurie
}

type LiteralMapping
{
literal: String!
literalDatatype: Uri
predicateId: EntityReference!
predicateLabel: String
predicateModifier: PredicateModifierEnum
objectId: EntityReference!
objectLabel: String
objectCategory: String
mappingJustification: EntityReference!
authorId: [EntityReference]
authorLabel: [String]
reviewerId: [EntityReference]
reviewerLabel: [String]
creatorId: [EntityReference]
creatorLabel: [String]
license: Uri
literalSource: EntityReference
literalSourceVersion: String
objectType: EntityTypeEnum
objectSource: EntityReference
objectSourceVersion: String
mappingProvider: Uri
mappingSource: EntityReference
mappingCardinality: MappingCardinalityEnum
mappingTool: String
mappingToolVersion: String
mappingDate: Date
confidence: Double
objectMatchField: [EntityReference]
matchString: [String]
literalPreprocessing: [EntityReference]
objectPreprocessing: [EntityReference]
similarityScore: Double
similarityMeasure: String
seeAlso: [String]
other: String
comment: String
}

type Mapping
{
subjectId: EntityReference!
Expand Down Expand Up @@ -86,8 +45,8 @@ type Mapping
matchString: [String]
subjectPreprocessing: [EntityReference]
objectPreprocessing: [EntityReference]
semanticSimilarityScore: Double
semanticSimilarityMeasure: String
similarityScore: Double
similarityMeasure: String
seeAlso: [String]
issueTrackerItem: EntityReference
other: String
Expand All @@ -108,6 +67,7 @@ type MappingRegistry

type MappingSet
{
curieMap: [Prefix]
mappings: [Mapping]
mappingSetId: Uri!
mappingSetVersion: String
Expand Down Expand Up @@ -149,6 +109,16 @@ type MappingSetReference
localName: String
}

type NoTermFound
{
}

type Prefix
{
prefixName: Ncname!
prefixUrl: Uri
}

type Propagatable
{
propagated: Boolean
Expand Down
47 changes: 18 additions & 29 deletions project/jsonld/sssom_schema.context.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"comments": {
"description": "Auto generated by LinkML jsonld context generator",
"generation_date": "2024-08-05T10:18:22",
"generation_date": "2024-08-06T18:58:48",
"source": "sssom_schema.yaml"
},
"@context": {
Expand Down Expand Up @@ -46,6 +46,10 @@
"curation_rule_text": {
"@id": "curation_rule_text"
},
"curie_map": {
"@type": "@id",
"@id": "curie_map"
},
"documentation": {
"@type": "@id",
"@id": "documentation"
Expand Down Expand Up @@ -89,24 +93,6 @@
"@type": "@id",
"@id": "dcterms:license"
},
"literal": {
"@id": "owl:annotatedTarget"
},
"literal_datatype": {
"@type": "@id",
"@id": "rdf:datatype"
},
"literal_preprocessing": {
"@type": "rdfs:Resource",
"@id": "literal_preprocessing"
},
"literal_source": {
"@type": "rdfs:Resource",
"@id": "literal_source"
},
"literal_source_version": {
"@id": "literal_source_version"
},
"local_name": {
"@id": "local_name"
},
Expand Down Expand Up @@ -248,6 +234,13 @@
},
"@id": "predicate_type"
},
"prefix_name": {
"@id": "prefix_name"
},
"prefix_url": {
"@type": "@id",
"@id": "prefix_url"
},
"propagated": {
"@type": "xsd:boolean",
"@id": "propagated"
Expand All @@ -270,13 +263,6 @@
"see_also": {
"@id": "rdfs:seeAlso"
},
"semantic_similarity_measure": {
"@id": "semantic_similarity_measure"
},
"semantic_similarity_score": {
"@type": "xsd:double",
"@id": "semantic_similarity_score"
},
"similarity_measure": {
"@id": "similarity_measure"
},
Expand Down Expand Up @@ -321,9 +307,6 @@
"ExtensionDefinition": {
"@id": "ExtensionDefinition"
},
"LiteralMapping": {
"@id": "owl:Axiom"
},
"Mapping": {
"@id": "owl:Axiom"
},
Expand All @@ -336,6 +319,12 @@
"MappingSetReference": {
"@id": "MappingSetReference"
},
"NoTermFound": {
"@id": "NoTermFound"
},
"Prefix": {
"@id": "Prefix"
},
"Propagatable": {
"@id": "Propagatable"
}
Expand Down
Loading

0 comments on commit 81fe996

Please sign in to comment.