Skip to content

Commit

Permalink
Implement parallel processing for enriching the ds-graph
Browse files Browse the repository at this point in the history
  • Loading branch information
johardi committed Oct 24, 2024
1 parent 846f3e0 commit c1fa732
Show file tree
Hide file tree
Showing 10 changed files with 664 additions and 424 deletions.
392 changes: 5 additions & 387 deletions schemas/src/digital-objects/ds-graph.yaml

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions schemas/src/modules/dataset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
id: https://purl.humanatlas.io/specs/dataset
name: dataset
prefixes:
ccf: http://purl.org/ccf/
oboInOwl: http://www.geneontology.org/formats/oboInOwl#
loinc: http://purl.bioontology.org/ontology/LNC/
linkml: https://w3id.org/linkml/
RO: http://purl.obolibrary.org/obo/RO_
IAO: http://purl.obolibrary.org/obo/IAO_

default_prefix: ccf
default_range: string

imports:
- linkml:types
- ../shared/metadata-base

classes:
AssayDataset:
class_uri: ccf:Dataset
mixins:
- Named
- Instance
slots:
- pref_label
- description
- external_link
- technology
- thumbnail
- links_back_to

AssayDatasetData:
attributes:
donor:
required: false
sample:
required: false
dataset:
multivalued: true
inlined_as_list: true
range: AssayDataset
spatial_entity:
required: false

Container:
tree_root: true
attributes:
iri:
metadata:
data:
range: AssayDatasetData

slots:
external_link:
slot_uri: ccf:url
annotations:
owl: AnnotationProperty, AnnotationAssertion
technology:
required: false
annotations:
owl: AnnotationProperty, AnnotationAssertion
thumbnail:
required: true
annotations:
owl: AnnotationProperty, AnnotationAssertion
links_back_to:
required: false
range: uriorcurie
annotations:
owl: ObjectProperty, ObjectPropertyAssertion
owl.template: |-
AnnotationAssertion( rdfs:label ccf:links_back_to "links back to" )
TransitiveObjectProperty( ccf:links_back_to )
128 changes: 128 additions & 0 deletions schemas/src/modules/donor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
id: https://purl.humanatlas.io/specs/donor
name: donor
prefixes:
ccf: http://purl.org/ccf/
oboInOwl: http://www.geneontology.org/formats/oboInOwl#
loinc: http://purl.bioontology.org/ontology/LNC/
linkml: https://w3id.org/linkml/
RO: http://purl.obolibrary.org/obo/RO_
IAO: http://purl.obolibrary.org/obo/IAO_

default_prefix: ccf
default_range: string

imports:
- linkml:types
- ../shared/metadata-base

classes:
Donor:
class_uri: ccf:Donor
mixins:
- Named
- Instance
slots:
- pref_label
- description
- external_link
- age
- bmi
- sex
- sex_id
- race
- race_id
- consortium_name
- provider_name
- provider_uuid
- samples
slot_usage:
sex:
annotations:
owl.template: |-
{% if sex %}
AnnotationAssertion(
Annotation(oboInOwl:hasDbXref {{sex_id}})
ccf:sex
{{id}}
"{{sex}}"
)
{% endif %}
race:
annotations:
owl.template: |-
{% if race %}
AnnotationAssertion(
Annotation(oboInOwl:hasDbXref {{race_id}})
ccf:has_race
{{id}}
"{{race}}"
)
{% endif %}
sex_id:
pattern: (loinc:LA3-6|loinc:LA2-8|loinc:LA4489-6)
race_id:
pattern: (loinc:LA10608-0|loinc:LA6156-9|loinc:LA10610-6|loinc:LA10611-4|loinc:LA4457-3|loinc:LA4489-6)

DonorData:
attributes:
donor:
multivalued: true
inlined_as_list: true
range: Donor
sample:
required: false
dataset:
required: false
spatial_entity:
required: false

Container:
tree_root: true
attributes:
iri:
metadata:
data:
range: DonorData

slots:
external_link:
slot_uri: ccf:url
annotations:
owl: AnnotationProperty, AnnotationAssertion
age:
range: integer
annotations:
owl: AnnotationProperty, AnnotationAssertion
bmi:
range: float
annotations:
owl: AnnotationProperty, AnnotationAssertion
sex:
annotations:
owl: AnnotationProperty
sex_id:
slot_uri: loinc:46098-0 # Sex
race:
slot_uri: ccf:has_race
annotations:
owl: AnnotationProperty
race_id:
slot_uri: loinc:32624-9 # Race
consortium_name:
annotations:
owl: AnnotationProperty, AnnotationAssertion
provider_name:
slot_uri: ccf:tissue_provider_name
annotations:
owl: AnnotationProperty, AnnotationAssertion
provider_uuid:
slot_uri: ccf:tissue_provider_uuid
annotations:
owl: AnnotationProperty, AnnotationAssertion
samples:
slot_uri: ccf:provides
multivalued: true
inlined: false
range: uriorcurie
annotations:
owl: AnnotationProperty, AnnotationAssertion
150 changes: 150 additions & 0 deletions schemas/src/modules/sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
id: https://purl.humanatlas.io/specs/sample
name: sample
prefixes:
ccf: http://purl.org/ccf/
oboInOwl: http://www.geneontology.org/formats/oboInOwl#
loinc: http://purl.bioontology.org/ontology/LNC/
linkml: https://w3id.org/linkml/
RO: http://purl.obolibrary.org/obo/RO_
IAO: http://purl.obolibrary.org/obo/IAO_

default_prefix: ccf
default_range: string

imports:
- linkml:types
- ../shared/metadata-base

classes:
TissueBlock:
class_uri: ccf:TissueBlock
mixins:
- Named
- Instance
slots:
- partially_overlaps
- pref_label
- description
- rui_location
- extraction_site
- external_link
- sections
- datasets
- section_count
- section_size # block_dimension
- section_size_unit # block_dimension_unit
- links_back_to
slot_usage:
partially_overlaps:
annotations:
owl.template: |-
{% for organ_part in partially_overlaps %}
ClassAssertion(ObjectSomeValuesFrom(RO:0002151 {{organ_part}}) {{id}})
{% endfor %}
TissueSection:
class_uri: ccf:TissueSection
mixins:
- Named
- Instance
slots:
- pref_label
- description
- external_link
- samples
- datasets
- section_number
- links_back_to

SampleData:
attributes:
donor:
required: false
sample:
multivalued: true
inlined_as_list: true
range: TissueBlock
dataset:
required: false
spatial_entity:
required: false

Container:
tree_root: true
attributes:
iri:
metadata:
data:
range: SampleData

slots:
external_link:
slot_uri: ccf:url
annotations:
owl: AnnotationProperty, AnnotationAssertion
samples:
slot_uri: ccf:provides
multivalued: true
inlined: false
range: TissueBlock
annotations:
owl: AnnotationProperty, AnnotationAssertion
partially_overlaps:
multivalued: true
range: Named
slot_uri: RO:0002151
annotations:
owl.template: |-
AnnotationAssertion( rdfs:label RO:0002151 "partially overlaps" )
rui_location:
required: false
slot_uri: ccf:has_registration_location
range: uriorcurie
annotations:
owl: AnnotationProperty, AnnotationAssertion
extraction_site:
required: false
slot_uri: ccf:extraction_site
range: uriorcurie
annotations:
owl: AnnotationProperty, AnnotationAssertion
sections:
slot_uri: ccf:subdivided_into_sections
range: TissueSection
multivalued: true
inlined_as_list: true
annotations:
owl: AnnotationProperty, AnnotationAssertion
datasets:
slot_uri: ccf:generates_dataset
range: Dataset
multivalued: true
inlined: false
annotations:
owl: AnnotationProperty, AnnotationAssertion
section_count:
required: false
range: integer
annotations:
owl: AnnotationProperty, AnnotationAssertion
section_size:
required: false
range: float
annotations:
owl: AnnotationProperty, AnnotationAssertion
section_size_unit:
annotations:
owl: AnnotationProperty, AnnotationAssertion
section_number:
required: false
range: integer
annotations:
owl: AnnotationProperty, AnnotationAssertion
links_back_to:
required: false
range: uriorcurie
annotations:
owl: ObjectProperty, ObjectPropertyAssertion
owl.template: |-
AnnotationAssertion( rdfs:label ccf:links_back_to "links back to" )
TransitiveObjectProperty( ccf:links_back_to )
Loading

0 comments on commit c1fa732

Please sign in to comment.