about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-05-29 14:26:47 +0300
committerBonfaceKilz2023-05-30 11:51:30 +0300
commit9df0828255632582f515d5d869a3a06f8eda735b (patch)
treed5ea2baacb8fa92193209551bb319f404f9c5b60
parent128b2a9ff19356529a9d09a15b680dcf1b8f8482 (diff)
downloadgn-transform-databases-9df0828255632582f515d5d869a3a06f8eda735b.tar.gz
Only dump public data
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xexamples/dump-dataset-metadata.scm2
-rwxr-xr-xexamples/dump-genotype.scm2
-rwxr-xr-xexamples/dump-phenotype.scm2
-rwxr-xr-xexamples/dump-probeset-metadata.scm3
4 files changed, 5 insertions, 4 deletions
diff --git a/examples/dump-dataset-metadata.scm b/examples/dump-dataset-metadata.scm
index 4747700..ebaea52 100755
--- a/examples/dump-dataset-metadata.scm
+++ b/examples/dump-dataset-metadata.scm
@@ -91,7 +91,7 @@
            (left-join Investigators "USING (InvestigatorId)")
            (left-join AvgMethod "USING (AvgMethodId)")
            (left-join GeneChip "USING (GeneChipId)"))
-          "WHERE GN_AccesionId IS NOT NULL")
+          "WHERE GN_AccesionId IS NOT NULL AND ((PublishFreeze.public > 0 AND PublishFreeze.confidentiality < 1) OR (GenoFreeze.public > 0 AND GenoFreeze.confidentiality < 1) OR (ProbeSetFreeze.public > 0 AND ProbeSetFreeze.confidentiality < 1))")
   (schema-triples
    (gn:datasetOfInvestigator rdfs:domain gn:dataset)
    (gn:datasetOfInvestigator rdfs:range foaf:Person)
diff --git a/examples/dump-genotype.scm b/examples/dump-genotype.scm
index cffa917..53d101b 100755
--- a/examples/dump-genotype.scm
+++ b/examples/dump-genotype.scm
@@ -27,7 +27,7 @@
   (tables (GenoFreeze
            (left-join InfoFiles "ON InfoFiles.InfoPageName = GenoFreeze.Name")
            (left-join InbredSet "ON GenoFreeze.InbredSetId = InbredSet.InbredSetId"))
-          "WHERE GenoFreeze.public > 0 AND InfoFiles.InfoPageName IS NULL")
+          "WHERE GenoFreeze.public > 0 AND GenoFreeze.confidentiality < 1 AND InfoFiles.InfoPageName IS NULL")
   (schema-triples
    (gn:datasetOfInbredSet rdfs:range gn:inbredSet)
    (gn:genotypeDataset rdfs:subPropertyOf gn:dataset)
diff --git a/examples/dump-phenotype.scm b/examples/dump-phenotype.scm
index 0b46a14..113c367 100755
--- a/examples/dump-phenotype.scm
+++ b/examples/dump-phenotype.scm
@@ -28,7 +28,7 @@
   (tables (PublishFreeze
            (left-join InfoFiles "ON InfoFiles.InfoPageName = PublishFreeze.Name")
            (left-join InbredSet "ON PublishFreeze.InbredSetId = InbredSet.InbredSetId"))
-          "WHERE PublishFreeze.public > 0 AND InfoFiles.InfoPageName IS NULL")
+          "WHERE PublishFreeze.public > 0 AND PublishFreeze.confidentiality < 1 AND InfoFiles.InfoPageName IS NULL")
   (schema-triples
    (gn:datasetOfInbredSet rdfs:range gn:inbredSet)
    (gn:name rdfs:range rdfs:Literal)
diff --git a/examples/dump-probeset-metadata.scm b/examples/dump-probeset-metadata.scm
index ae9931c..b3f4165 100755
--- a/examples/dump-probeset-metadata.scm
+++ b/examples/dump-probeset-metadata.scm
@@ -23,7 +23,8 @@
 (define-dump dump-probeset-metadata
   (tables (ProbeSetXRef
            (left-join ProbeSet "ON ProbeSetXRef.ProbeSetId = ProbeSet.Id")
-           (left-join ProbeSetFreeze "ON ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id")))
+           (left-join ProbeSetFreeze "ON ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id"))
+          "WHERE ProbeSetFreeze.public > 0 AND ProbeSetFreeze.confidentiality < 1")
   (schema-triples
    (gn:probesetData rdfs:range gn:probeset)
    (gn:hasProbeset rdfs:range rdfs:Literal))