about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
authorMunyoki Kilyungi2026-02-18 11:03:48 +0300
committerMunyoki Kilyungi2026-02-18 11:03:48 +0300
commit2091c1c812912755d9cd67723f1ba45a6666de5d (patch)
tree0df37da679724fbffbcd82cceb7fe3337ce790d8 /examples
parentf5e0df7a66f4dbecb27c8e4f41ac760746d6c9de (diff)
downloadgn-transform-databases-2091c1c812912755d9cd67723f1ba45a6666de5d.tar.gz
Only transform datasets with public > 0 and confidentiality < 1.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/genotype-datasets.scm6
-rwxr-xr-xexamples/phenotype-datasets.scm4
-rwxr-xr-xexamples/phenotype.scm2
-rwxr-xr-xexamples/probesets-experiment-metadata.scm3
4 files changed, 8 insertions, 7 deletions
diff --git a/examples/genotype-datasets.scm b/examples/genotype-datasets.scm
index ebe2349..38d524b 100755
--- a/examples/genotype-datasets.scm
+++ b/examples/genotype-datasets.scm
@@ -18,7 +18,7 @@
   (tables (Species
            (inner-join InbredSet "ON InbredSet.SpeciesId = Species.Id")
            (inner-join GenoFreeze "ON GenoFreeze.InbredSetId = InbredSet.Id"))
-          "WHERE GenoFreeze.public > 0 AND Species.Name != 'monkey' GROUP BY Species.Name, GenoFreeze.ShortName")
+          "WHERE GenoFreeze.public > 0 AND GenoFreeze.confidentiality < 1 AND Species.Name != 'monkey' GROUP BY Species.Name, GenoFreeze.ShortName")
   (triples (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")
     (multiset gnt:has_genotype_data
               (map (cut string->identifier "dataset" <> #:separator "_")
@@ -31,7 +31,7 @@
   (tables (GenoFreeze
            (inner-join InbredSet "ON InbredSet.Id = GenoFreeze.InbredSetId")
            (inner-join Species "ON InbredSet.SpeciesId = Species.Id"))
-          "WHERE GenoFreeze.public > 0 AND Species.Name != 'monkey'")
+          "WHERE GenoFreeze.public > 0 AND GenoFreeze.confidentiality < 1 AND Species.Name != 'monkey'")
   (triples (string->identifier "dataset" (field GenoFreeze Name) #:separator "_")
     (set gnt:has_strain (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_"))
     (set dct:created (annotate-field (field GenoFreeze CreateTime) '^^xsd:datetime))))
@@ -41,7 +41,7 @@
            (inner-join InbredSet "ON InbredSet.Id = GenoFreeze.InbredSetId")
            (inner-join Species "ON InbredSet.SpeciesId = Species.Id")
            (inner-join Geno "ON Geno.SpeciesId = Species.Id"))
-          "WHERE GenoFreeze.public > 0 AND Species.Name != 'monkey' GROUP BY GenoFreeze.Name")
+          "WHERE GenoFreeze.public > 0 AND GenoFreeze.confidentiality < 1 AND Species.Name != 'monkey' GROUP BY GenoFreeze.Name")
   (triples (string->identifier "dataset" (field GenoFreeze Name) #:separator "_")
     (set gnt:has_marker_count
          (string->symbol
diff --git a/examples/phenotype-datasets.scm b/examples/phenotype-datasets.scm
index c8657fc..c005621 100755
--- a/examples/phenotype-datasets.scm
+++ b/examples/phenotype-datasets.scm
@@ -18,7 +18,7 @@
   (tables (Species
            (inner-join InbredSet "ON InbredSet.SpeciesId = Species.Id")
            (inner-join PublishFreeze "ON PublishFreeze.InbredSetId = InbredSet.Id"))
-          "WHERE PublishFreeze.public > 0 AND Species.Name != 'monkey' GROUP BY Species.Name, PublishFreeze.ShortName")
+          "WHERE PublishFreeze.public > 0 AND PublishFreeze.confidentiality < 1 AND Species.Name != 'monkey' GROUP BY Species.Name, PublishFreeze.ShortName")
   (triples (string->identifier "set" (field InbredSet Name InbredSetName) #:separator "_")
     (multiset gnt:has_phenotype_data
               (map (cut string->identifier "dataset" <> #:separator "_")
@@ -34,7 +34,7 @@
            (inner-join PublishFreeze "ON PublishFreeze.InbredSetId = InbredSet.Id")
            (inner-join Publication "ON Publication.Id = PublishXRef.PublicationId")
            (inner-join Phenotype "ON Phenotype.Id = PublishXRef.PhenotypeId"))
-          "WHERE InbredSet.public > 0")
+          "WHERE InbredSet.public > 0 AND PublishFreeze.public > 0 AND PublishFreeze.confidentiality < 1")
   (triples (string->identifier "dataset" (field PublishFreeze Name) #:separator "_")
     (set gnt:has_phenotype_trait
          (let ((post-abbrev (blank-p (field Phenotype Post_publication_abbreviation)))
diff --git a/examples/phenotype.scm b/examples/phenotype.scm
index c2564b6..57fd2c5 100755
--- a/examples/phenotype.scm
+++ b/examples/phenotype.scm
@@ -71,7 +71,7 @@
            (inner-join PublishFreeze "ON PublishFreeze.InbredSetId = InbredSet.Id")
            (left-join Publication "ON Publication.Id = PublishXRef.PublicationId")
            (left-join Phenotype "ON Phenotype.Id = PublishXRef.PhenotypeId"))
-          "WHERE InbredSet.public > 0")
+          "WHERE InbredSet.public > 0 AND PublishFreeze.public > 0 AND PublishFreeze.confidentiality < 1")
   (triples (let ((post-abbrev (blank-p (field Phenotype Post_publication_abbreviation)))
                  (pre-abbrev (blank-p (field Phenotype Pre_publication_abbreviation)))
                  (post-desc (blank-p (field Phenotype Post_publication_description)))
diff --git a/examples/probesets-experiment-metadata.scm b/examples/probesets-experiment-metadata.scm
index e019928..b15f7e9 100755
--- a/examples/probesets-experiment-metadata.scm
+++ b/examples/probesets-experiment-metadata.scm
@@ -16,7 +16,8 @@
 (define-transformer probesetxref->metadata
   (tables (ProbeSetXRef
            (inner-join ProbeSetFreeze "ON ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id")
-           (inner-join ProbeSet "ON ProbeSet.Id = ProbeSetXRef.ProbeSetId")))
+           (inner-join ProbeSet "ON ProbeSet.Id = ProbeSetXRef.ProbeSetId"))
+          "WHERE ProbeSetFreeze.public > 0 AND ProbeSetFreeze.confidentiality < 1")
   (triples (string->identifier
             "probeset_data"
             (uri-encode