aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/classification.scm27
-rwxr-xr-xexamples/dataset-metadata.scm113
-rwxr-xr-xexamples/genbank.scm4
-rwxr-xr-xexamples/genelist.scm36
-rwxr-xr-xexamples/generif.scm50
-rwxr-xr-xexamples/genotype.scm9
-rwxr-xr-xexamples/phenotype.scm16
-rwxr-xr-xexamples/schema.scm2
-rwxr-xr-xexamples/strains.scm19
9 files changed, 101 insertions, 175 deletions
diff --git a/examples/classification.scm b/examples/classification.scm
index 279dc86..6195ea6 100755
--- a/examples/classification.scm
+++ b/examples/classification.scm
@@ -39,9 +39,7 @@
(gnc:species xkos:specializes gnc:set))
(triples "gnc:species"
(set skos:member
- (string->identifier "species" (remap-species-identifiers (field Species Fullname))
- #:separator "_"
- #:proc string-downcase))))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))))))
(define-transformer classification-scheme-set
(tables (InbredSet))
@@ -53,8 +51,7 @@
(triples "gnc:set"
(set skos:member
(string->identifier
- "set" (field InbredSet Name InbredSetName)
- #:separator "_"))))
+ "set" (field InbredSet Name InbredSetName) #:separator "_"))))
(define-transformer species
(tables (Species))
@@ -69,9 +66,7 @@
(gnt:belongs_to_species rdf:comment "This resource given to this species")
(gnt:belongs_to_species rdf:label "belongsToSpecies"))
(triples
- (string->identifier "species" (remap-species-identifiers (field Species Fullname))
- #:separator "_"
- #:proc string-downcase)
+ (string->identifier "" (remap-species-identifiers (field Species Fullname)))
(set skos:inScheme 'gnc:resource_classification_scheme)
(set rdfs:label (remap-species-identifiers (field Species Fullname)))
(set skos:prefLabel (field Species MenuName))
@@ -88,8 +83,8 @@
(left-join MappingMethod
"ON InbredSet.MappingMethodId=MappingMethod.Id")))
(schema-triples
- (gnt:genetic_type a owl:ObjectProperty)
- (gnt:genetic_type rdfs:domain gnc:set)
+ (gnt:genetic-type a owl:ObjectProperty)
+ (gnt:genetic-type rdfs:domain gnc:set)
(gnt:code a owl:ObjectProperty)
(gnt:code rdfs:domain gnc:set)
;; Already defined as an owl prop in species
@@ -98,21 +93,17 @@
(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"))
- (triples (string->identifier
- "set" (field InbredSet Name InbredSetName)
- #:separator "_")
+ (gnt:belongs_to_group rdf:label "belongs-to-group"))
+ (triples (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")
(set skos:inScheme 'gnc:resource_classification_scheme)
(set rdfs:label (field InbredSet FullName))
(set skos:prefLabel (field InbredSet Name InbredSetName))
- (set gnt:genetic_type (field InbredSet GeneticType))
+ (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
- (string->identifier "species" (remap-species-identifiers (field Species Fullname))
- #:separator "_"
- #:proc string-downcase))))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))))))
diff --git a/examples/dataset-metadata.scm b/examples/dataset-metadata.scm
index 591b18e..c40c42c 100755
--- a/examples/dataset-metadata.scm
+++ b/examples/dataset-metadata.scm
@@ -27,7 +27,8 @@
(string->identifier "investigator"
(string-join
(list first-name last-name (fix-email-id email))
- "_")))
+ "_")
+ #:separator "_"))
(define-transformer investigators
;; There are a few duplicate entries. We group by email to
@@ -36,7 +37,7 @@
"GROUP BY Email")
(triples (investigator-attributes->id (field Investigators FirstName)
(field Investigators LastName)
- (field Investigators Email))
+ "")
(set rdf:type 'foaf:Person)
(set foaf:name (string-append (field Investigators FirstName) " "
(field Investigators LastName)))
@@ -64,7 +65,7 @@
(gnt:has_go_tree_value a owl:ObjectProperty)
(gnt:has_go_tree_value skos:definition "This resource the following GO tree value")
(gnt:has_go_tree_value rdfs:domain gnc:gene_chip))
- (triples (string->identifier "platform" (field GeneChip Name))
+ (triples (string->identifier "platform" (field GeneChip Name) #:separator "_")
(set rdf:type 'gnc:gene_chip)
(set rdfs:label (field GeneChip GeneChipName))
(set skos:prefLabel (field GeneChip Name))
@@ -72,9 +73,7 @@
Title)))
(set gnt:has_go_tree_value (field GeneChip Go_tree_value))
(set xkos:classifiedUnder
- (string->identifier "" (remap-species-identifiers (field Species Fullname))
- #:separator ""
- #:proc string-capitalize-first))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname)) #:separator ""))
(set gnt:has_geo_series_id
(ontology 'geoSeries:
(string-trim-both (field GeneChip GeoPlatform))))))
@@ -162,10 +161,15 @@
(gnt:has_acknowledgement rdfs:label "Acknowledgement")
(gnt:has_acknowledgement a owl:ObjectProperty)
(gnt:has_acknowledgement skos:definition "People to acknowledge"))
- (triples (string->identifier
- "" (regexp-substitute/global #f "[^A-Za-z0-9:]"
- (field InfoFiles InfoPageName)
- 'pre "_" 'post))
+ (triples
+ (string->identifier
+ "" (let ((info-page-name (field InfoFiles InfoPageName))
+ (info-title (field InfoFiles Title)))
+ (format #f "~a"
+ (if (and (string? info-page-name)
+ (string=? (string-downcase (string-trim-both info-page-name))
+ "none"))
+ info-title info-page-name))))
(set rdf:type 'dcat:Dataset)
(set xkos:classifiedUnder
(let ([dataset-type
@@ -176,30 +180,21 @@
(string->symbol
dataset-type)
"")))
- (set rdfs:label (regexp-substitute/global
- #f "^[Nn]one$"
- (field InfoFiles InfoPageName)
- ""))
+ (set rdfs:label (normalize-string-field (field InfoFiles InfoPageName)))
(set skos:prefLabel
- (field ("IFNULL(GenoFreeze.FullName, IFNULL(PublishFreeze.FullName, ''))"
- DatasetFullName)))
+ (normalize-string-field
+ (field ("IFNULL(GenoFreeze.FullName, IFNULL(PublishFreeze.FullName, ''))"
+ DatasetFullName))))
(set skos:altLabel (field Datasets DatasetName DatasetGroup))
- (set dct:title
- (regexp-substitute/global
- #f "^[Nn]one$"
- (or
- (regexp-substitute/global
- #f "^Unpublished$" (field Datasets PublicationTitle) "")
- (field InfoFiles InfoFileTitle)
- "")
- ""))
+ (set dct:title (normalize-string-field (field Datasets PublicationTitle)))
(set dct:created
- (field ("IFNULL(GenoFreeze.CreateTime, IFNULL(PublishFreeze.CreateTime, IFNULL(ProbeSetFreeze.CreateTime, '')))"
- createTimeGenoFreeze)))
+ (normalize-string-field
+ (field ("IFNULL(GenoFreeze.CreateTime, IFNULL(PublishFreeze.CreateTime, IFNULL(ProbeSetFreeze.CreateTime, '')))"
+ createTimeGenoFreeze))))
(set dcat:contactPoint
(investigator-attributes->id (field Investigators FirstName)
(field Investigators LastName)
- (field Investigators Email)))
+ ""))
(set foaf:Organization
(field Organizations OrganizationName))
(set dct:identifier (format #f "GN~a" (field InfoFiles GN_AccesionId)))
@@ -209,14 +204,16 @@
(string->identifier
"set"
(field ("IFNULL(InbredSet.Name, IFNULL(PublishInbredSet.Name, GenoInbredSet.Name))"
- InbredSetName))))
+ InbredSetName))
+ #:separator "_"))
(set gnt:has_tissue (string->identifier "tissue"
- (field Tissue Short_Name)))
+ (field Tissue Short_Name)
+ #:separator "_"))
(set gnt:uses_normalization
- (string->identifier "avgMethod"
- ;; If AvgMethodName is NULL, assume N/A.
- (if (string-blank? (field AvgMethod Name AvgMethodName))
- "N/A" (field AvgMethod Name AvgMethodName))))
+ (let ((avg-method (normalize-string-field (field AvgMethod Name AvgMethodName))))
+ (if (not (string-blank? avg-method))
+ (string->identifier "avg_method" avg-method #:separator "_")
+ "")))
(set gnt:has_summary
(let* ((summary-link
(format
@@ -375,7 +372,8 @@
"" (string->symbol acknowledgment-link))))
(set gnt:uses_platform
(string->identifier "platform"
- (field GeneChip Name GeneChip)))
+ (field GeneChip Name GeneChip)
+ #:separator "_"))
(set gnt:has_geo_series_id
(let ((s
(string-match "GSE[0-9]*"
@@ -391,11 +389,7 @@
(left-join InbredSet "ON PublishFreeze.InbredSetId = InbredSet.InbredSetId"))
"WHERE PublishFreeze.public > 0 AND PublishFreeze.confidentiality < 1 AND InfoFiles.InfoFileId IS NULL")
(triples
- (string->identifier
- ""
- (regexp-substitute/global #f "[^A-Za-z0-9:]"
- (field PublishFreeze Name)
- 'pre "_" 'post))
+ (string->identifier "" (field PublishFreeze Name))
(set rdf:type 'dcat:Dataset)
(set xkos:classifiedUnder 'gnc:phenotype)
(set dct:title (field PublishFreeze FullName))
@@ -407,8 +401,7 @@
(set gnt:belongs_to_group
(string->identifier
"set" (field InbredSet Name InbredSetName)
- #:separator "_"
- #:proc (lambda (x) x)))))
+ #:separator "_"))))
(define-transformer genofreeze
(tables (GenoFreeze
@@ -416,15 +409,7 @@
(left-join InbredSet "ON GenoFreeze.InbredSetId = InbredSet.InbredSetId"))
"WHERE GenoFreeze.public > 0 AND GenoFreeze.confidentiality < 1 AND InfoFiles.InfoPageName IS NULL")
(triples
- (string->identifier
- ""
- (regexp-substitute/global
- #f "[^A-Za-z0-9:]"
- (regexp-substitute/global
- #f "[^A-Za-z0-9:]"
- (field GenoFreeze Name)
- 'pre "_" 'post)
- 'pre "_" 'post))
+ (string->identifier "" (field GenoFreeze Name))
(set rdf:type 'dcat:Dataset)
(set xkos:classifiedUnder 'gnc:genotype)
(set rdfs:label (field GenoFreeze Name))
@@ -454,19 +439,14 @@
(gnt:uses_data_scale a owl:ObjectProperty)
(gnt:uses_data_scale skos:definition "Thi data scale this resource uses"))
(triples
- (string->identifier
- ""
- (regexp-substitute/global
- #f "[^A-Za-z0-9:]"
- (field ProbeSetFreeze Name)
- 'pre "_" 'post))
+ (string->identifier "" (field ProbeSetFreeze Name))
(set rdf:type 'dcat:Dataset)
(set xkos:classifiedUnder 'gnc:probeset)
(set gnt:uses_normalization
- (string->identifier "avgMethod"
- ;; If AvgMethodName is NULL, assume N/A.
- (if (string-blank? (field AvgMethod Name AvgMethodName))
- "N/A" (field AvgMethod Name AvgMethodName))))
+ (let ((avg-method (field AvgMethod Name AvgMethodName)))
+ (if (string-blank? avg-method)
+ #f
+ avg-method)))
(set dct:title (field ProbeSetFreeze FullName))
(set rdfs:label (field ProbeSetFreeze ShortName))
(set skos:prefLabel (field ProbeSetFreeze Name))
@@ -475,15 +455,8 @@
(field ProbeSetFreeze CreateTime)
'^^xsd:datetime))
(set gnt:uses_data_scale (field ProbeSetFreeze DataScale))
- (set gnt:has_tissue
- (string->identifier
- "tissue"
- (field Tissue Short_Name)))
- (set gnt:belongs_to_group
- (string->identifier
- "set" (field InbredSet Name InbredSetName)
- #:separator ""
- #:proc string-capitalize-first))))
+ (set gnt:has_tissue (string->identifier "tissue" (field Tissue Short_Name) #:separator "_"))
+ (set gnt:belongs_to_group (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_"))))
diff --git a/examples/genbank.scm b/examples/genbank.scm
index 7aae5ba..993c3bf 100755
--- a/examples/genbank.scm
+++ b/examples/genbank.scm
@@ -25,9 +25,7 @@
(field Genbank Id))
(set gnt:has_sequence (field Genbank Sequence))
(set gnt:belongs_to_species
- (string->identifier "" (remap-species-identifiers (field Species Fullname))
- #:separator "_"
- #:proc string-downcase))))
+ (string->identifier "" (remap-species-identifiers (field Species Fullname))))))
diff --git a/examples/genelist.scm b/examples/genelist.scm
index 18fd30b..dbca921 100755
--- a/examples/genelist.scm
+++ b/examples/genelist.scm
@@ -77,12 +77,9 @@
(gnt:has_target_seq rdfs:domain gnc:probeset))
(triples
(string->identifier
- "gene" (regexp-substitute/global
- #f "[^A-Za-z0-9:]"
- (string-trim-both
- (field ("CONCAT_WS('_', GeneSymbol, GeneID, AlignID)" GENE_UID)))
- 'pre "_" 'post)
- #:proc (lambda (x) x))
+ "gene" (normalize-string-field (string-trim-both
+ (field ("CONCAT_WS('_', GeneSymbol, GeneID, AlignID)" GENE_UID))))
+ #:separator "_")
(set rdf:type 'gnc:gene)
(set gnt:gene_symbol (field GeneList GeneSymbol))
(set dct:description (sanitize-rdf-string (field GeneList GeneDescription)))
@@ -225,20 +222,14 @@
"")))
(set gnt:chromosome (field GeneList Chromosome))
(set gnt:tx_start (annotate-field
- (field GeneList tx_start)
+ (field GeneList TxStart)
'^^xsd:double))
(set gnt:tx_end (annotate-field
- (field GeneList tx_end)
+ (field GeneList TxEnd)
'^^xsd:double))
(set gnt:strand (string-trim-both (field GeneList Strand)))
(set
- gnt:belongs_to_species
- (string->identifier
- ""
- (remap-species-identifiers
- (string-trim-both (field Species Name)))
- #:separator ""
- #:proc string-capitalize-first))
+ gnt:belongs_to_species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
(set
gnt:transcript
(ontology 'transcript:
@@ -259,10 +250,11 @@
(if (number? gene-uid)
(number->string
gene-uid)
- gene-uid)))
+ gene-uid)
+ #:separator "_"))
(set rdf:type 'gnc:gene)
(set gnt:belongs_to_species 'gn:Rattus_norvegicus)
- (set gnt:gene_symbol (string-trim-both (field GeneList_rn33 gene_symbol)))
+ (set gnt:gene_symbol (string-trim-both (field GeneList_rn33 geneSymbol)))
(set gnt:chromosome (field GeneList_rn33 chromosome))
(set gnt:tx_start (annotate-field
(field GeneList_rn33 txStart)
@@ -280,7 +272,7 @@
gnc:has_kg_id
(string-trim-both (field GeneList_rn33 kgID)))
(set dct:references
- (let ((symbol (field GeneList_rn33 gene_symbol)))
+ (let ((symbol (field GeneList_rn33 geneSymbol)))
(if (not (string-blank? symbol))
(string->symbol
(format #f
@@ -290,7 +282,7 @@
"a gnc:PantherLink"))
"")))
(set dct:references
- (let ((symbol (string-trim-both (field GeneList_rn33 gene_symbol))))
+ (let ((symbol (string-trim-both (field GeneList_rn33 geneSymbol))))
(if (not (string-blank? symbol))
(string->symbol
(format #f
@@ -300,7 +292,7 @@
"a gnc:ebi_gwas_link"))
"")))
(set dct:references
- (let ((symbol (string-trim-both (field GeneList_rn33 gene_symbol))))
+ (let ((symbol (string-trim-both (field GeneList_rn33 geneSymbol))))
(if (not (string-blank? symbol))
(string->symbol
(format #f
@@ -311,7 +303,7 @@
"a gnc:panther_link"))
"")))
(set dct:references
- (let ((symbol (string-trim-both (field GeneList_rn33 gene_symbol))))
+ (let ((symbol (string-trim-both (field GeneList_rn33 geneSymbol))))
(if (not (string-blank? symbol))
(string->symbol
(format #f
@@ -322,7 +314,7 @@
"a gnc:gtex_link"))
"")))
(set dct:references
- (let ((symbol (string-trim-both (field GeneList_rn33 gene_symbol))))
+ (let ((symbol (string-trim-both (field GeneList_rn33 geneSymbol))))
(if (not (string-blank? symbol))
(string->symbol
(format #f
diff --git a/examples/generif.scm b/examples/generif.scm
index 5fb95f7..994c540 100755
--- a/examples/generif.scm
+++ b/examples/generif.scm
@@ -24,33 +24,30 @@
GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
(schema-triples
(gnc:gene_wiki_entry a rdfs:Class)
- (gnc:GNWikiEntry rdfs:subClassOf gnc:gene_wiki_entry)
+ (gnc:gn_wiki_entry rdfs:subClassOf gnc:gene_wiki_entry)
(gnt:initial a owl:ObjectProperty)
(gnt:initial rdfs:domain gnc:gene_wiki_entry)
(gnt:initial skos:definition "Optional user or project code or your initials")
(gnt:reason a owl:ObjectProperty)
(gnt:reason rdfs:domain gnc:gene_wiki_entry)
(gnt:reason skos:definition "The reason why this resource was modified")
- (gnc:GNWikiEntry rdfs:comment "Represents GeneRIF Entries entered from GeneNetwork")
- (gnt:gene_symbol rdfs:domain gnc:GNWikiEntry))
+ (gnc:gn_wiki_entry rdfs:comment "Represents GeneRIF Entries entered from GeneNetwork")
+ (gnt:gene_symbol rdfs:domain gnc:gn_wiki_entry))
(triples
- (format
- #f "gn:wiki-~a-~a"
- (field GeneRIF Id)
- (field GeneRIF versionId))
+ (string->identifier
+ "wiki" (format #f "~a_~a"
+ (field GeneRIF Id)
+ (field GeneRIF versionId))
+ #:separator "_")
(set rdfs:label (string->symbol
(format #f "'~a'@en"
(replace-substrings
(sanitize-rdf-string
(field GeneRIF comment))
'(("'" . "\\'"))))))
- (set rdf:type 'gnc:GNWikiEntry)
+ (set rdf:type 'gnc:gn_wiki_entry)
(set gnt:symbol (field GeneRIF symbol))
- (set gnt:belongs_to_species (string->identifier
- ""
- (remap-species-identifiers (field Species Fullname))
- #:separator ""
- #:proc string-capitalize-first))
+ (set gnt:belongs_to_species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
(set dct:created
(string->symbol
(format #f "~s^^xsd:datetime "
@@ -80,7 +77,7 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
'^^xsd:integer))
(set gnt:initial (sanitize-rdf-string (field GeneRIF initial)))
(set gnt:reason (field GeneRIF reason))
- (multiset gnt:belongsToCategory
+ (multiset gnt:belongs_to_category
(string-split
(field ("GROUP_CONCAT(DISTINCT GeneCategory.Name SEPARATOR ';')"
GeneCategory))
@@ -93,13 +90,13 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
(gnc:ncbi_wiki_entry rdfs:subClassOf gnc:gene_wiki_entry)
(gnc:ncbi_wiki_entry rdfs:comment "Represents GeneRIF Entries obtained from NCBI"))
(triples
- (format
- #f "gn:rif-~a-~a-~a-~a"
- (field GeneRIF_BASIC GeneId)
- (field GeneRIF_BASIC PubMed_ID)
- (field
- ("DATE_FORMAT(createtime, '%Y-%m-%dT%T')" CreateTime))
- (field GeneRIF_BASIC VersionId))
+ (string->identifier
+ "rif" (format #f "~a_~a_~a_~a"
+ (field GeneRIF_BASIC GeneId)
+ (field GeneRIF_BASIC PubMed_ID)
+ (field ("DATE_FORMAT(createtime, '%Y-%m-%dT%T')" CreateTime))
+ (field GeneRIF_BASIC VersionId))
+ #:separator "_")
(set rdf:type
(let* ((comment (format #f "'~a'@en"
(replace-substrings
@@ -113,11 +110,7 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
(field
("CAST(createtime AS CHAR)" EntryCreateTime))))
(symbol (field GeneRIF_BASIC symbol))
- (species (string->identifier
- ""
- (remap-species-identifiers (field Species Fullname))
- #:separator ""
- #:proc string-capitalize-first))
+ (species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
(gene-id (field GeneRIF_BASIC GeneId))
(taxon-id (field GeneRIF_BASIC TaxID TaxonomicId))
(pmid (field GeneRIF_BASIC PubMed_ID))
@@ -172,8 +165,9 @@ GROUP BY GeneRIF.Id, GeneRIF.versionId, GeneRIF.symbol")
("owl:" "<http://www.w3.org/2002/07/owl#>")))
(inputs
(list
- gn-genewiki-entries
- ncbi-genewiki-entries))
+ ;; gn-genewiki-entries
+ ncbi-genewiki-entries
+ ))
(outputs
`(#:documentation ,documentation
#:rdf ,output))))
diff --git a/examples/genotype.scm b/examples/genotype.scm
index 257a3fa..0b0cd8e 100755
--- a/examples/genotype.scm
+++ b/examples/genotype.scm
@@ -46,14 +46,7 @@
(gnt:chr_num rdfs:domain gnc:genotype)
(gnt:chr_num skos:definition "The chromosome number for this resource"))
(triples
- (string->identifier
- ""
- (regexp-substitute/global
- #f "[^A-Za-z0-9:]"
- (field Geno Name)
- 'pre "_" 'post)
- #:separator "_"
- #:proc (lambda (x) x))
+ (string->identifier "" (field Geno Name))
(set rdf:type 'gnc:genotype)
(set rdfs:label (sanitize-rdf-string (field Geno Name)))
(set gnt:chr (field Geno Chr))
diff --git a/examples/phenotype.scm b/examples/phenotype.scm
index 1bec264..5a118b8 100755
--- a/examples/phenotype.scm
+++ b/examples/phenotype.scm
@@ -56,14 +56,12 @@
"trait"
(field ("CONCAT(IFNULL(InbredSet.InbredSetCode, PublishXRef.InbredSetId), '_', PublishXRef.Id)"
Phenotype))
- #:separator "_"
- #:proc (lambda (x) x))
+ #:separator "_")
(set rdf:type 'gnc:phenotype)
(set gnt:belongs_to_group
(string->identifier
"set" (field InbredSet Name InbredSetName)
- #:separator "_"
- #:proc string-capitalize-first))
+ #:separator "_"))
;; This is the trait's name
(set gnt:trait_id
(let ((trait-id (field PublishXRef Id)))
@@ -85,15 +83,7 @@
(set dct:contributor (sanitize-rdf-string (field Phenotype Owner)))
(set gnt:mean (annotate-field (field ("IFNULL(PublishXRef.mean, '')" mean))
'^^xsd:double))
- (set gnt:locus
- (string->identifier
- ""
- (regexp-substitute/global
- #f "[^A-Za-z0-9:]"
- (sanitize-rdf-string (field PublishXRef Locus))
- 'pre "_" 'post)
- #:separator ""
- #:proc string-capitalize-first))
+ (set gnt:locus (sanitize-rdf-string (field PublishXRef Locus)))
(set gnt:lod_score (annotate-field
(field ("IFNULL((PublishXRef.LRS/4.604), '')" lrs))
'^^xsd:double))
diff --git a/examples/schema.scm b/examples/schema.scm
index 50cfd6a..bfc5747 100755
--- a/examples/schema.scm
+++ b/examples/schema.scm
@@ -33,7 +33,7 @@
(table-name table)))))
(triple table-id 'rdf:type 'gn:sqlTable)
(triple table-id 'gn:name (table-name table))
- (triple table-id 'gn:hasSize (string->symbol (format #f "~a" (table-size table))))
+ (triple table-id 'gn:has_size (string->symbol (format #f "~a" (table-size table))))
(for-each (lambda (column)
(let ((column-id (column-id (table-name table)
(column-name column))))
diff --git a/examples/strains.scm b/examples/strains.scm
index 976d358..b2332bd 100755
--- a/examples/strains.scm
+++ b/examples/strains.scm
@@ -63,16 +63,11 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
(gnt:gene_symbol rdfs:domain gnc:strain)
(gnt:gene_symbol a owl:ObjectProperty))
(triples (string->identifier
- ""
- (regexp-substitute/global
- #f "[^A-Za-z0-9:]"
- (field Strain Name)
- 'pre "_" 'post))
+ "strain"
+ (field Strain Name)
+ #:separator "_")
(set rdf:type 'gnc:strain)
- (set gnt:belongs_to_species
- (string->identifier "" (remap-species-identifiers (field Species Fullname))
- #:separator "_"
- #:proc string-downcase))
+ (set gnt:belongs_to_species (string->identifier "" (remap-species-identifiers (field Species Fullname))))
;; Name, and maybe a second name
(set rdfs:label (sanitize-rdf-string (field Strain Name)))
(set skos:altLabel (sanitize-rdf-string (field ("IF ((Strain.Name2 != Strain.Name), Strain.Name2, '')" Name2))))
@@ -85,7 +80,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
(gnc:mapping_method a skos:Concept)
(gnc:mapping_method skos:definition "Terms that decribe mapping methods used on this resource"))
(triples
- (string->identifier "mapping_method" (field MappingMethod Name))
+ (string->identifier "mapping_method" (field MappingMethod Name) #:separator "_")
(set rdf:type 'gnc:mapping_method)
(set rdfs:label (field MappingMethod Name))))
@@ -96,7 +91,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
(schema-triples
(gnc:avg_method a skos:Concept)
(gnc:avg_method skos:definition "Terms that decribe normalization methods used on this resource"))
- (triples (string->identifier "avgMethod" (field AvgMethod Name AvgMethodName))
+ (triples (string->identifier "avg_method" (field AvgMethod Name AvgMethodName) #:separator "_")
(set rdf:type 'gnc:avg_method)
(set rdfs:label (field AvgMethod Normalization))))
@@ -115,7 +110,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
read)))
(with-documentation
- (name "Species Metadata")
+ (name "Strain Metadata")
(connection %connection-settings)
(table-metadata? #f)
(prefixes