aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-08-21 14:49:55 +0300
committerMunyoki Kilyungi2023-08-21 14:49:55 +0300
commit849874fdfe11003f05abe5f82efde974a8c8a388 (patch)
tree902774358126ed3e74d3d7d2ffb9853b6fb22f71
parent0d651ee8ef5f82a2fc3339329d2c0af6f84a745f (diff)
downloadgn-transform-databases-849874fdfe11003f05abe5f82efde974a8c8a388.tar.gz
Rename define-dump -> define-transformer
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r--dump/special-forms.scm10
-rwxr-xr-xexamples/dump-dataset-metadata.scm12
-rwxr-xr-xexamples/dump-generif.scm6
-rwxr-xr-xexamples/dump-genotype.scm2
-rwxr-xr-xexamples/dump-phenotype.scm2
-rwxr-xr-xexamples/dump-probeset-data.scm2
-rwxr-xr-xexamples/dump-probeset.scm2
-rwxr-xr-xexamples/dump-publication.scm2
-rwxr-xr-xexamples/dump-species-metadata.scm10
-rwxr-xr-xexamples/dump-tissue.scm2
10 files changed, 25 insertions, 25 deletions
diff --git a/dump/special-forms.scm b/dump/special-forms.scm
index 7b32785..f771cc1 100644
--- a/dump/special-forms.scm
+++ b/dump/special-forms.scm
@@ -19,7 +19,7 @@
blank-node
map-alist
dump-with-documentation
- define-dump))
+ define-transformer))
(define (key->assoc-ref alist x)
"Recursively translate (key k) forms in source X to (assoc-ref ALIST
@@ -342,14 +342,14 @@ literals is optional. So,
(syntax-let (bindings ...)
body ...))))))
-(define-syntax define-dump
+(define-syntax define-transformer
(lambda (x)
"Define FUNCTION-NAME, a function that dumps a view of the database.
-define-dump consists of three order-agnostic clauses---tables,
+define-transformer consists of three order-agnostic clauses---tables,
schema-triples and triples---in the form shown below.
-(define-dump function-name
+(define-transformer function-name
(tables (table ...) raw-forms ...)
(schema-triples
(subject predicate object) ...)
@@ -537,7 +537,7 @@ The above query results to triples that have the form:
(primary-table other-tables ...)
tables-raw ...)))
)))
- (_ (error "Invalid define-dump syntax:" (syntax->datum x))))))
+ (_ (error "Invalid define-transformer syntax:" (syntax->datum x))))))
(define (get-keyword-value args keyword default)
(let ((kv (memq keyword args)))
diff --git a/examples/dump-dataset-metadata.scm b/examples/dump-dataset-metadata.scm
index a127e57..6173201 100755
--- a/examples/dump-dataset-metadata.scm
+++ b/examples/dump-dataset-metadata.scm
@@ -34,7 +34,7 @@
(list first-name last-name (fix-email-id email))
"_")))
-(define-dump dump-investigators
+(define-transformer dump-investigators
;; There are a few duplicate entries. We group by email to
;; deduplicate.
(tables (Investigators)
@@ -56,7 +56,7 @@
(set v:postal-code (field Investigators ZipCode))
(set v:country-name (field Investigators Country))))
-(define-dump dump-gene-chip
+(define-transformer dump-gene-chip
(tables (GeneChip
(left-join Species "USING (SpeciesId)")))
(schema-triples
@@ -87,7 +87,7 @@
(ontology 'geoSeries:
(string-trim-both (field GeneChip GeoPlatform))))))
-(define-dump dump-info-files
+(define-transformer dump-info-files
(tables (InfoFiles
(left-join PublishFreeze "ON InfoFiles.InfoPageName = PublishFreeze.Name")
(left-join GenoFreeze "ON InfoFiles.InfoPageName = GenoFreeze.Name")
@@ -251,7 +251,7 @@
(field Datasets Acknowledgment)))))
;; These are phenotype datasets that don't have Infofile metadata
-(define-dump dump-publishfreeze
+(define-transformer dump-publishfreeze
(tables (PublishFreeze
(left-join InfoFiles "ON InfoFiles.InfoPageName = PublishFreeze.Name")
(left-join InbredSet "ON PublishFreeze.InbredSetId = InbredSet.InbredSetId"))
@@ -277,7 +277,7 @@
#:separator ""
#:proc string-capitalize-first))))
-(define-dump dump-genofreeze
+(define-transformer dump-genofreeze
(tables (GenoFreeze
(left-join InfoFiles "ON InfoFiles.InfoPageName = GenoFreeze.Name")
(left-join InbredSet "ON GenoFreeze.InbredSetId = InbredSet.InbredSetId"))
@@ -308,7 +308,7 @@
#:proc string-capitalize-first))))
;; Molecular Traits are also referred to as ProbeSets
-(define-dump dump-probesetfreeze
+(define-transformer dump-probesetfreeze
(tables (ProbeSetFreeze
(left-join InfoFiles "ON InfoFiles.InfoPageName = ProbeSetFreeze.Name")
(left-join ProbeFreeze "USING (ProbeFreezeId)")
diff --git a/examples/dump-generif.scm b/examples/dump-generif.scm
index 0689f57..f754274 100755
--- a/examples/dump-generif.scm
+++ b/examples/dump-generif.scm
@@ -18,7 +18,7 @@
-(define-dump dump-genewiki-symbols
+(define-transformer dump-genewiki-symbols
(tables (GeneRIF_BASIC
(left-join Species "USING (SpeciesId)"))
"GROUP BY GeneId ORDER BY BINARY symbol")
@@ -37,7 +37,7 @@
(string-split (field ("GROUP_CONCAT(DISTINCT TaxID)" taxId))
#\,)))))
-(define-dump dump-gn-genewiki-entries
+(define-transformer dump-gn-genewiki-entries
(tables (GeneRIF
(left-join GeneRIF_BASIC "USING (symbol)")
(left-join Species "ON Species.SpeciesId = GeneRIF.SpeciesId")
@@ -101,7 +101,7 @@
(cut string-split-substring <> "::::")
comments))))))
-(define-dump dump-ncbi-genewiki-entries
+(define-transformer dump-ncbi-genewiki-entries
(tables (GeneRIF_BASIC)
"GROUP BY GeneId, comment, createtime")
(schema-triples
diff --git a/examples/dump-genotype.scm b/examples/dump-genotype.scm
index 30e7796..a055039 100755
--- a/examples/dump-genotype.scm
+++ b/examples/dump-genotype.scm
@@ -30,7 +30,7 @@
["Bat (Glossophaga soricina)" "Glossophaga soricina"]
[str str]))
-(define-dump dump-genotypes
+(define-transformer dump-genotypes
(tables (Geno
(left-join Species "USING (SpeciesId)")))
(schema-triples
diff --git a/examples/dump-phenotype.scm b/examples/dump-phenotype.scm
index abcf140..b7ae003 100755
--- a/examples/dump-phenotype.scm
+++ b/examples/dump-phenotype.scm
@@ -19,7 +19,7 @@
read))
-(define-dump dump-phenotypes
+(define-transformer dump-phenotypes
(tables (PublishXRef
(left-join InbredSet "ON InbredSet.InbredSetId = PublishXRef.InbredSetId")
(left-join Publication "ON Publication.Id = PublishXRef.PublicationId")
diff --git a/examples/dump-probeset-data.scm b/examples/dump-probeset-data.scm
index 54615bc..55f3f4b 100755
--- a/examples/dump-probeset-data.scm
+++ b/examples/dump-probeset-data.scm
@@ -18,7 +18,7 @@
-(define-dump dump-probeset-data
+(define-transformer dump-probeset-data
(tables (ProbeSetXRef
(left-join ProbeSet "ON ProbeSetXRef.ProbeSetId = ProbeSet.Id")
(left-join ProbeSetFreeze "ON ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id"))
diff --git a/examples/dump-probeset.scm b/examples/dump-probeset.scm
index c614a76..3a55506 100755
--- a/examples/dump-probeset.scm
+++ b/examples/dump-probeset.scm
@@ -17,7 +17,7 @@
read))
-(define-dump dump-probeset
+(define-transformer dump-probeset
(tables (ProbeSet
(left-join GeneChip "ON GeneChip.Id = ProbeSet.ChipId")))
(schema-triples
diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm
index 5b1af83..1881872 100755
--- a/examples/dump-publication.scm
+++ b/examples/dump-publication.scm
@@ -18,7 +18,7 @@
-(define-dump dump-publication
+(define-transformer dump-publication
(tables (Publication))
(triples
(let ((pmid (field
diff --git a/examples/dump-species-metadata.scm b/examples/dump-species-metadata.scm
index 20b0b05..b0ac6f8 100755
--- a/examples/dump-species-metadata.scm
+++ b/examples/dump-species-metadata.scm
@@ -28,7 +28,7 @@
["Bat (Glossophaga soricina)" "Glossophaga soricina"]
[str str]))
-(define-dump dump-species
+(define-transformer dump-species
(tables (Species))
(schema-triples
(gnc:species a skos:Concept)
@@ -97,7 +97,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
!#
-(define-dump dump-strain
+(define-transformer dump-strain
(tables (Strain
(left-join Species "ON Strain.SpeciesId = Species.SpeciesId")))
(schema-triples
@@ -129,7 +129,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
(set gnt:alias (sanitize-rdf-string (field ("IF ((Strain.Alias != Strain.Name), Strain.Alias, '')" Alias))))
(set gnt:symbol (field ("IF ((Strain.Symbol != Strain.Name), Strain.Symbol, '')" Symbol)))))
-(define-dump dump-mapping-method
+(define-transformer dump-mapping-method
(tables (MappingMethod))
(schema-triples
(gnc:mappingMethod a skos:Concept)
@@ -140,7 +140,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
(set rdfs:label (field MappingMethod Name))))
-(define-dump dump-inbred-set
+(define-transformer dump-inbred-set
(tables (InbredSet
(left-join Species "ON InbredSet.SpeciesId=Species.Id")
(left-join MappingMethod
@@ -189,7 +189,7 @@ At this point it is not very clear how Name, Name2, Symbol and Alias are used.
molecularTrait))
"||")))))
-(define-dump dump-avg-method
+(define-transformer dump-avg-method
;; The Name and Normalization fields seem to be the same. Dump only
;; the Name field.
(tables (AvgMethod))
diff --git a/examples/dump-tissue.scm b/examples/dump-tissue.scm
index f11b8b4..3658a26 100755
--- a/examples/dump-tissue.scm
+++ b/examples/dump-tissue.scm
@@ -18,7 +18,7 @@
-(define-dump dump-tissue
+(define-transformer dump-tissue
;; The Name and TissueName fields seem to be identical. BIRN_lex_ID
;; and BIRN_lex_Name are mostly NULL.
(tables (Tissue))