From 8bf0ce9f2f08c6220f848c4e00f7e04018a8d1fb Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Thu, 19 Oct 2023 16:58:34 +0300 Subject: Check (Publish/Geno)Freeze for InbredSet if NULL in InfoFiles. Signed-off-by: Munyoki Kilyungi --- examples/dataset-metadata.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'examples/dataset-metadata.scm') 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 -- cgit v1.2.3