aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/classification.scm108
1 files changed, 72 insertions, 36 deletions
diff --git a/examples/classification.scm b/examples/classification.scm
index 77d672e..b3c6acf 100755
--- a/examples/classification.scm
+++ b/examples/classification.scm
@@ -18,25 +18,38 @@
(tables (Species))
(schema-triples
(gnc:resource_classification_scheme a skos:ConceptScheme)
+ (gnc:resource_classification_scheme skos:prefLabel "GeneNetwork Resource Classification Scheme")
(gnc:resource_classification_scheme skos:definition "A hierarchical classification scheme for organizing GeneNetwork resources by dataset type, resource set (inbredset group), or species.")
(gnc:resource_classification_scheme xkos:numberOfLevels "3")
(gnc:resource_classification_scheme xkos:levels gnc:dataset_type)
(gnc:resource_classification_scheme xkos:levels gnc:set)
(gnc:resource_classification_scheme xkos:levels gnc:species)
(gnc:dataset_type a xkos:ClassificationLevel)
+ (gnc:dataset_type skos:prefLabel "Dataset Type")
(gnc:dataset_type skos:definition "Classification level describing the biological or experimental nature of a dataset. A dataset can either be a probeSet, a genotype or a phenotype.")
(gnc:dataset_type xkos:depth "1")
+ (gnc:dataset_type xkos:nextLevel gnc:set)
(gnc:dataset_type skos:member gnc:probeset)
(gnc:dataset_type skos:member gnc:genotype)
(gnc:dataset_type skos:member gnc:phenotype)
- (gnc:probeset skos:definition "A category that lists all the probesets contained in GN.")
- (gnc:probeset skos:note "Since the probeset are too many to be listed, we don't include them at the moment in RDF.")
- (gnc:genotype skos:definition "A category that lists all the genotypes contained in GeneNetwork.")
- (gnc:phenotype skos:definition "A category that lists all the phenotypes contained in GeneNetwork.")
+ (gnc:probeset a skos:Concept)
+ (gnc:probeset skos:prefLabel "Transcriptomic Datasets")
+ (gnc:probeset skos:altLabel "ProbeSet")
+ (gnc:probeset skos:definition "A category representing microarray or sequencing probe sets that measure gene expression or other molecular traits.")
+ (gnc:probeset skos:note "Individual probe sets are too numerous to list explicitly in this ontology but are available through the GeneNetwork API.")
+ (gnc:genotype a skos:Concept)
+ (gnc:genotype skos:prefLabel "Genotype Datasets")
+ (gnc:genotype skos:altLabel "Genotype")
+ (gnc:genotype skos:definition "A category representing genetic marker or variant datasets used for genetic mapping.")
+ (gnc:phenotype a skos:Concept)
+ (gnc:phenotype skos:prefLabel "Phenotype Datasets")
+ (gnc:phenotype skos:altLabel "Phenotype")
+ (gnc:phenotype skos:definition "A category representing measured traits or phenotypes for genetic analysis.")
(gnc:species a xkos:ClassificationLevel)
- (gnc:species skos:definition "A category that lists all the species in GeneNetwork.")
- (gnc:species xkos:depth "3")
- (gnc:species xkos:specializes gnc:set))
+ (gnc:species xkos:previousLevel gnc:set)
+ (gnc:species skos:prefLabel "Species")
+ (gnc:species skos:definition "A classification level that that associates a given resource to a species in GeneNetwork.")
+ (gnc:species xkos:depth "3"))
(triples "gnc:species"
(set skos:member
(string->identifier "" (remap-species-identifiers (field Species Fullname))))))
@@ -45,9 +58,11 @@
(tables (InbredSet))
(schema-triples
(gnc:set a xkos:ClassificationLevel)
- (gnc:set skos:definition "A category that lists all the inbred set groups contained in GeneNetwork.")
- (gnc:set xkos:depth "2")
- (gnc:set xkos:generalizes gnc:species))
+ (gnc:set xkos:nextLevel gnc:species)
+ (gnc:set xkos:previousLevel gnc:dataset_type)
+ (gnc:set skos:prefLabel "InbredSet Group")
+ (gnc:set skos:definition "A category representing groups of genetically related strains or individuals (inbred sets, recombinant inbred lines, etc.).")
+ (gnc:set xkos:depth "2"))
(triples "gnc:set"
(set skos:member
(string->identifier
@@ -56,26 +71,31 @@
(define-transformer species
(tables (Species))
(schema-triples
- (gnt:family a owl:ObjectProperty)
- (gnt:family rdfs:domain gnc:species)
- (gnt:family skos:definition "This resource belongs to this family")
- (gnt:short_name a owl:ObjectProperty)
+ (gnt:has_uniprot_taxon_id a owl:ObjectProperty)
+ (gnt:has_uniprot_taxon_id rdfs:label "has uniprot taxonomic id")
+ (gnt:has_family a owl:DatatypeProperty)
+ (gnt:has_family rdfs:label "has family")
+ (gnt:has_family rdfs:range xsd:string)
+ (gnt:has_family skos:definition "Links a species to its taxonomic family")
+ (gnt:short_name a owl:DatatypeProperty)
+ (gnt:short_name rdfs:label "has short name")
(gnt:short_name rdfs:domain gnc:species)
(gnt:short_name skos:definition "The short name of a given resource")
- (gnt:belongs_to_species a rdf:property)
+ (gnt:belongs_to_species a owl:ObjectProperty)
(gnt:belongs_to_species rdf:comment "This resource belongs to this species")
- (gnt:belongs_to_species rdf:label "belongsToSpecies"))
+ (gnt:belongs_to_species rdfs:label "belongs to species")
+ (gnt:belongs_to_species rdfs:range gnc:species))
(triples
(string->identifier "" (remap-species-identifiers (field Species Fullname)))
- (set skos:inScheme 'gnc:resource_classification_scheme)
+ (set rdfs:type 'gnc:species)
(set rdfs:label (remap-species-identifiers (field Species Fullname)))
(set skos:prefLabel (field Species MenuName))
(set skos:altLabel (field Species SpeciesName))
(set gnt:short_name (field Species Name))
- (set gnt:family (field Species Family))
- (set skos:notation (ontology
- 'taxon:
- (field Species TaxonomyId)))))
+ (set gnt:has_family (field Species Family))
+ (set gnt:has_uniprot_taxon_id (ontology
+ 'taxon:
+ (field Species TaxonomyId)))))
(define-transformer inbred-set
(tables (InbredSet
@@ -83,26 +103,39 @@
(left-join MappingMethod
"ON InbredSet.MappingMethodId=MappingMethod.Id")))
(schema-triples
- (gnt:genetic_type a owl:ObjectProperty)
+ (gnt:genetic_type a owl:DatatypeProperty)
+ (gnt:genetic_type rdfs:label "has genetic type")
+ (gnt:genetic_type skos:definition "Describes the genetic architecture of a resource set (e.g., intercross, riset).")
(gnt:genetic_type rdfs:domain gnc:set)
- (gnt:code a owl:ObjectProperty)
- (gnt:code rdfs:domain gnc:set)
+ (gnt:genetic_type rdfs:range xsd:string)
+ (gnt:has_set_code a owl:DatatypeProperty)
+ (gnt:has_set_code rdfs:label "has set code")
+ (gnt:has_set_code skos:definition "Provides a unique identifier code for a resource set.")
+ (gnt:has_set_code rdfs:domain gnc:set)
+ (gnt:has_set_code rdfs:range xsd:string)
;; Already defined as an owl prop in species
- (gnt:family rdfs:domain gnc:set)
- (gnt:mapping_method a owl:ObjectProperty)
- (gnt:mapping_method rdfs:domain gnc:set)
- (gnt:belongs_to_group a rdf:property)
- (gnt:belongs_to_group rdf:comment "This resource given to this group")
- (gnt:belongs_to_group rdf:label "belongs-to-group"))
+ (gnt:has_family rdfs:domain gnc:set)
+ (gnt:uses_mapping_method a owl:ObjectProperty)
+ (gnt:uses_mapping_method rdfs:label "mapping method")
+ (gnt:uses_mapping_method rdfs:domain gnc:set)
+ (gnt:uses_mapping_method rdfs:range gnc:mapping_method)
+ (gnt:uses_mapping_method rdfs:comment "The method used to map genetic or experimental data for this resource.")
+ (gnt:belongs_to_group a owl:ObjectProperty)
+ (gnt:belongs_to_group rdf:comment "Indicates the group the resources belongs to")
+ (gnt:belongs_to_group schema:domainIncludes dcat:Dataset)
+ (gnt:belongs_to_group schema:domainIncludes gnc:species)
+ (gnt:belongs_to_group rdfs:range gnc:set)
+ (gnt:belongs_to_group rdfs:label "belongs-to-group"))
(triples (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")
- (set skos:inScheme 'gnc:resource_classification_scheme)
+ (set rdfs:type 'gnc:set)
(set rdfs:label (field InbredSet FullName))
(set skos:prefLabel (field InbredSet Name InbredSetName))
(set gnt:genetic_type (field InbredSet GeneticType))
- (set gnt:family (field InbredSet Family))
- (set gnt:mapping_method (field MappingMethod Name))
- (set gnt:code (field InbredSet InbredSetCode))
- (set xkos:generalizes
+ (set gnt:has_family (field InbredSet Family))
+ (set gnt:uses_mapping_method
+ (string->identifier "mapping_method" (field MappingMethod Name) #:separator "_"))
+ (set gnt:has_set_code (field InbredSet InbredSetCode))
+ (set gnt:belongs_to_species
(string->identifier "" (remap-species-identifiers (field Species Fullname))))))
@@ -124,12 +157,15 @@
(connection %connection-settings)
(table-metadata? #f)
(prefixes
- '(("gn:" "<http://rdf.genenetwork.org/v1/id/>")
+ '(("dcat:" "<http://www.w3.org/ns/dcat#>")
+ ("gn:" "<http://rdf.genenetwork.org/v1/id/>")
("gnc:" "<http://rdf.genenetwork.org/v1/category/>")
("owl:" "<http://www.w3.org/2002/07/owl#>")
("gnt:" "<http://rdf.genenetwork.org/v1/term/>")
+ ("schema:" "<https://schema.org/>")
("skos:" "<http://www.w3.org/2004/02/skos/core#>")
("xkos:" "<http://rdf-vocabulary.ddialliance.org/xkos#>")
+ ("xsd:" "<http://www.w3.org/2001/XMLSchema#>")
("rdf:" "<http://www.w3.org/1999/02/22-rdf-syntax-ns#>")
("rdfs:" "<http://www.w3.org/2000/01/rdf-schema#>")
("taxon:" "<http://purl.uniprot.org/taxonomy/>")))