aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/classification.scm128
1 files changed, 59 insertions, 69 deletions
diff --git a/examples/classification.scm b/examples/classification.scm
index 27c8d98..4af9a3c 100755
--- a/examples/classification.scm
+++ b/examples/classification.scm
@@ -21,41 +21,24 @@
(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 "4")
- (gnc:resource_classification_scheme xkos:levels gnc:dataset_type)
- (gnc:resource_classification_scheme xkos:levels gnc:set)
+ (gnc:resource_classification_scheme xkos:levels gnc:taxonomic_family)
(gnc:resource_classification_scheme xkos:levels gnc:species)
- (gnc:resource_classification_scheme xkos:levels gnc:family)
- (gnc:dataset_type a xkos:ClassificationLevel)
- (gnc:dataset_type skos:inScheme gnc:resource_classification_scheme)
- (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 a skos:Concept)
- (gnc:probeset skos:inScheme gnc:dataset_type)
- (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:inScheme gnc:dataset_type)
- (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:inScheme gnc:dataset_type)
- (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:resource_classification_scheme xkos:levels gnc:set)
+ (gnc:resource_classification_scheme xkos:levels gnc:population_category)
+ (gnc:population_category a xkos:ClassificationLevel)
+ (gnc:population_category skos:inScheme gnc:resource_classification_scheme)
+ (gnc:population_category xkos:nextLevel gnc:set)
+ (gnc:population_category skos:prefLabel "Species")
+ (gnc:population_category rdfs:label "Population Category")
+ (gnc:population_category xkos:depth "4")
+ (gnt:population_category skos:definition "Classification of genetic populations by breeding design and data aggregation.")
(gnc:species a xkos:ClassificationLevel)
(gnc:species skos:inScheme gnc:resource_classification_scheme)
- (gnc:species xkos:previousLevel gnc:set)
+ (gnc:species xkos:previousLevel gnc:taxonomic_family)
+ (gnc:species xkos:nextLevel 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"))
+ (gnc:species xkos:depth "2"))
(triples "gnc:species"
(set skos:member
(string->identifier "" (remap-species-identifiers (field Species Fullname))))))
@@ -66,11 +49,11 @@
(schema-triples
(gnc:set a xkos:ClassificationLevel)
(gnc:set skos:inScheme gnc:resource_classification_scheme)
- (gnc:set xkos:nextLevel gnc:species)
- (gnc:set xkos:previousLevel gnc:dataset_type)
+ (gnc:set xkos:nextLevel gnc:population_category)
+ (gnc:set xkos:previousLevel gnc:species)
(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"))
+ (gnc:set xkos:depth "3"))
(triples "gnc:set"
(set skos:member
(string->identifier
@@ -81,11 +64,11 @@
(schema-triples
(gnt:has_uniprot_taxon_id a owl:ObjectProperty)
(gnt:has_uniprot_taxon_id rdfs:label "has uniprot taxonomic id")
- (gnt:has_family a owl:ObjectProperty)
- (gnt:has_family rdfs:label "has family")
- (gnt:has_family skos:definition "Links a species to its taxonomic family")
- (gnt:has_family schema:domainIncludes gnc:species)
- (gnt:has_family schema:domainIncludes gnc:set)
+ (gnt:has_taxonomic_family a owl:ObjectProperty)
+ (gnt:has_taxonomic_family rdfs:label "has family")
+ (gnt:has_taxonomic_family skos:definition "Links a species to its taxonomic family")
+ (gnt:has_taxonomic_family schema:domainIncludes gnc:species)
+ (gnt:has_taxonomic_family schema:domainIncludes gnc:set)
(gnt:short_name a owl:DatatypeProperty)
(gnt:short_name rdfs:label "has short name")
(gnt:short_name rdfs:domain gnc:species)
@@ -101,7 +84,7 @@
(set skos:prefLabel (field Species MenuName))
(set skos:altLabel (field Species SpeciesName))
(set gnt:short_name (field Species Name))
- (set gnt:has_family (string->identifier "family" (field Species Family) #:separator "_"))
+ (set gnt:has_taxonomic_family (string->identifier "family" (field Species Family) #:separator "_"))
(set gnt:has_uniprot_taxon_id (ontology
'taxon:
(field Species TaxonomyId)))))
@@ -125,12 +108,12 @@
(tables (Species)
"GROUP BY FAMILY")
(schema-triples
- (gnc:family a xkos:ClassificationLevel)
- (gnc:family skos:inScheme gnc:resource_classification_scheme)
- (gnc:family skos:prefLabel "Family")
- (gnc:family skos:definition "An organizational classification level used in GeneNetwork to group resources into families.")
- (gnc:family xkos:depth "4")
- (gnc:family xkos:previousLevel gnc:species)
+ (gnc:taxonomic_family a xkos:ClassificationLevel)
+ (gnc:taxonomic_family skos:inScheme gnc:resource_classification_scheme)
+ (gnc:taxonomic_family skos:prefLabel "Family")
+ (gnc:taxonomic_family skos:definition "An organizational classification level used in GeneNetwork to group resources into families.")
+ (gnc:taxonomic_family xkos:depth "1")
+ (gnc:taxonomic_family xkos:nextLevel gnc:species)
(gnt:has_family_order_id a owl:DatatypeProperty)
(gnt:has_family_order_id rdfs:range xsd:integer))
(triples (string->identifier "family" (field Species Family) #:separator "_")
@@ -167,8 +150,6 @@
(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: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)
@@ -193,39 +174,48 @@
(set gnt:has_species
(string->identifier "" (remap-species-identifiers (field Species Fullname))))))
-(define-transformer inbredset-families*
+(define-transformer inbredset-population*
(tables (InbredSet)
"WHERE Family IS NOT NULL")
+ (schema-triples
+ (gnt:has_population_category rdfs:domain gnc:set)
+ (gnt:has_population_category a owl:ObjectProperty)
+ (gnt:has_population_category rdfs:comment "This group belongs to this population category.")
+ (gnt:has_population_category rdfs:label "belongs to population category."))
(triples (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")
- (set gnt:has_family (string->identifier "family" (field InbredSet Family) #:separator "_"))))
+ (set gnt:has_population_category
+ (string->identifier "population" (field InbredSet Family) #:separator "_"))))
-(define-transformer inbredset-families-list
+(define-transformer inbredset-population-list
(tables (InbredSet)
"WHERE Family IS NOT NULL GROUP BY Family")
- (triples (string->identifier "family" (field InbredSet Family) #:separator "_")
- (set rdf:type 'gnc:family)
+ (schema-triples
+ (gnc:reference_population a skos:Concept)
+ (gnc:reference_population a gnc:PopulationCategory)
+ (gnc:reference_population skos:inScheme gnc:population_category_scheme)
+ (gnc:reference_population skos:prefLabel "Reference population")
+ (gnc:reference_population skos:definition "A genetic population"))
+ (triples (string->identifier "population" (field InbredSet Family) #:separator "_")
+ (set rdf:type 'gnc:reference_population)
(set rdfs:label (field InbredSet Family))
- (set gnt:has_family_order_id
+ (set skos:member 'gnc:population_category)
+ (set gnt:has_population_order_id
(annotate-field (field InbredSet FamilyOrder)
'^^xsd:integer))))
-(define-transformer inbredset-families-fanout
+(define-transformer inbredset-population-fanout
(tables (InbredSet)
"WHERE Family IS NOT NULL")
- (triples (string->identifier "family" (field InbredSet Family) #:separator "_")
+ (triples (string->identifier "population" (field InbredSet Family) #:separator "_")
(set gnt:has_strain
(string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_"))))
-(define-transformer family-category-inbredset
+(define-transformer population-category-inbredset
(tables (InbredSet)
"WHERE public > 0 GROUP BY Family")
- (schema-triples
- (gnt:assigned_strain rdfs:domain gnc:set)
- (gnt:assigned_strain a owl:ObjectProperty)
- (gnt:assigned_strain rdfs:label "These families have been assigned to these strains"))
- (triples "gnc:family"
- (set gnt:assigned_strain
- (string->identifier "family" (field InbredSet Family) #:separator "_"))))
+ (triples "gnc:population_category"
+ (set gnt:has_population_category
+ (string->identifier "population" (field InbredSet Family) #:separator "_"))))
(define-transformer family-category-species
(tables (Species)
@@ -234,8 +224,8 @@
(gnt:assigned_species rdfs:domain gnc:set)
(gnt:assigned_species a owl:ObjectProperty)
(gnt:assigned_species rdfs:label "These families have been assigned to these species"))
- (triples "gnc:family"
- (set gnt:assigned_species
+ (triples "gnc:taxonomic_family"
+ (set gnt:has_taxonomic_family
(string->identifier "family" (field Species Family) #:separator "_"))))
@@ -276,12 +266,12 @@
species
species-fan-out
inbred-set
- inbredset-families*
+ inbredset-population*
species-families-list
species-families-fanout
- inbredset-families-list
- inbredset-families-fanout
- family-category-inbredset
+ inbredset-population-list
+ inbredset-population-fanout
+ population-category-inbredset
family-category-species))
(outputs
`(#:documentation ,documentation