aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-09-14 13:06:21 +0530
committerArun Isaac2021-09-14 13:39:34 +0530
commitb1c9b0a0869b4164416dc7dc9b599057b6787c24 (patch)
tree3cedaeb03c89a57cadbdcb2ba1ba46f202585a32
parent178f16f8e33fb86ce3cac0830033493f0c4f306e (diff)
downloadgn-transform-databases-b1c9b0a0869b4164416dc7dc9b599057b6787c24.tar.gz
Dump GeneChip.
* dump.scm (gene-chip-name->id, dump-gene-chip): New functions. [main]: Call dump-gene-chip.
-rwxr-xr-xdump.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/dump.scm b/dump.scm
index f2034ab..b354c5e 100755
--- a/dump.scm
+++ b/dump.scm
@@ -343,6 +343,21 @@ GROUP BY Email"))
;; "N/A". Remove them.
"SELECT Name FROM AvgMethod WHERE Name != \"N/A\""))
+(define (gene-chip-name->id name)
+ (string->symbol
+ (string-replace-substring (string-append "gn:platform" name)
+ " " "_")))
+
+(define (dump-gene-chip db)
+ (sql-for-each (match-lambda
+ (((_ . gene-chip-name)
+ (_ . name))
+ (let ((id (gene-chip-name->id name)))
+ (triple id 'rdf:type 'gn:platform)
+ (triple id 'gn:name gene-chip-name))))
+ db
+ "SELECT GeneChipName, Name FROM GeneChip"))
+
(define (dump-data-table db table-name data-field)
(let ((dump-directory (string-append %dump-directory "/" table-name))
(port #f)
@@ -393,4 +408,5 @@ GROUP BY Email"))
(dump-publish-xref db)))))
(dump-tissue db)
(dump-investigators db)
- (dump-avg-method db)))))
+ (dump-avg-method db)
+ (dump-gene-chip db)))))