about summary refs log tree commit diff
diff options
context:
space:
mode:
-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)))