aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-08-19 16:30:36 +0300
committerMunyoki Kilyungi2023-08-19 16:30:36 +0300
commit3b9f1f53722e4866309d1555639c347c7bbacc97 (patch)
tree9c911f9d9475e0bfebd82a82a317c0463dafc02f
parent5ade56d6a601afac04edf65698fdec2b39bacecf (diff)
downloadgn-transform-databases-3b9f1f53722e4866309d1555639c347c7bbacc97.tar.gz
Add traitName
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xexamples/dump-phenotype.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/dump-phenotype.scm b/examples/dump-phenotype.scm
index bd9c76f..35f96b3 100755
--- a/examples/dump-phenotype.scm
+++ b/examples/dump-phenotype.scm
@@ -59,6 +59,9 @@
(gnt:abbreviation a owl:ObjectProperty)
(gnt:abbreviation rdfs:domain gnc:phenotype)
(gnt:abbreviation skos:definition "The abbreviation used for this resource")
+ (gnt:traitName a owl:ObjectProperty)
+ (gnt:traitName rdfs:domain gnc:phenotype)
+ (gnt:traitName skos:definition "The trait Name of this resource")
(gnt:labCode a owl:ObjectProperty)
(gnt:labCode rdfs:domain gnc:phenotype)
(gnt:submitter a owl:ObjectProperty)
@@ -85,7 +88,10 @@
#:separator ""
#:proc string-capitalize-first))
(set gnt:traitName
- (field PublishXRef Id))
+ (let ((trait-id (field PublishXRef Id)))
+ (if (number? trait-id)
+ (number->string trait-id)
+ trait-id)))
(set rdfs:label
(field ("CONCAT(IFNULL(InbredSet.Name, PublishXRef.InbredSetId), '_', PublishXRef.Id)"
Phenotype)))