aboutsummaryrefslogtreecommitdiff
path: root/examples/dataset-metadata.scm
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-10-19 16:58:34 +0300
committerMunyoki Kilyungi2023-10-19 16:58:34 +0300
commit8bf0ce9f2f08c6220f848c4e00f7e04018a8d1fb (patch)
treeb767af02b801ed80c8c1292f55a0bb251fcfba0d /examples/dataset-metadata.scm
parent3c06bf6f0006c637af5cea6839539769a4f229d1 (diff)
downloadgn-transform-databases-8bf0ce9f2f08c6220f848c4e00f7e04018a8d1fb.tar.gz
Check (Publish/Geno)Freeze for InbredSet if NULL in InfoFiles.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/dataset-metadata.scm')
-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