about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/dataset-metadata.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/dataset-metadata.scm b/examples/dataset-metadata.scm
index c47298f..1c02bb3 100755
--- a/examples/dataset-metadata.scm
+++ b/examples/dataset-metadata.scm
@@ -100,7 +100,10 @@
            (left-join AvgMethod "USING (AvgMethodId)")
            (left-join Organizations "USING (OrganizationId)")
            (left-join GeneChip "USING (GeneChipId)"))
-          "WHERE GN_AccesionId IS NOT NULL")
+          ;; XXXX: There are datasets that don't have the InbredSetId
+          ;; in the Infofiles table.  This clause allows us to check
+          ;; if they exist in the (Publish/Geno)Freeze tables.
+          "LEFT JOIN InbredSet PublishInbredSet ON PublishFreeze.InbredSetId = PublishInbredSet.InbredSetId LEFT JOIN InbredSet GenoInbredSet ON GenoFreeze.InbredSetId = GenoInbredSet.InbredSetId  WHERE GN_AccesionId IS NOT NULL")
   (schema-triples
    (gnt:hasTissue rdfs:domain dcat:Dataset)
    (gnt:hasTissue a owl:ObjectProperty)
@@ -186,7 +189,9 @@
                            (field DatasetStatus DatasetStatusName)))
     (set xkos:classifiedUnder
          (string->identifier
-          "set" (field InbredSet Name InbredSetName)))
+          "set"
+          (field ("IFNULL(InbredSet.Name, IFNULL(PublishInbredSet.Name, GenoInbredSet.Name))"
+                  InbredSetName))))
     (set gnt:hasTissue (string->identifier "tissue"
                                            (field Tissue Short_Name)))
     (set gnt:usesNormalization