aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-12-01 16:14:08 +0530
committerArun Isaac2021-12-01 16:24:32 +0530
commit218f168762ff97529be83670ddea008ddfbf81a5 (patch)
treec0657b4387f45f5faaa12fc011d6560032fe4462
parent177d41fefe32f244e34a27d429c067a6f3e1421c (diff)
downloadgn-transform-databases-218f168762ff97529be83670ddea008ddfbf81a5.tar.gz
Allow N/A avg method.
* dump.scm (dump-avg-method): Allow N/A in name. (dump-info-files): Allow N/A in avg-method-name. (avg-method-name->id): Replace / with _.
-rwxr-xr-xdump.scm15
1 files changed, 9 insertions, 6 deletions
diff --git a/dump.scm b/dump.scm
index b22a196..59e1d97 100755
--- a/dump.scm
+++ b/dump.scm
@@ -331,7 +331,9 @@ GROUP BY Email"))
(string->symbol
(string-append "gn:avgmethod"
(string-replace-substring
- (string-downcase name) " " "_"))))
+ (string-replace-substring
+ (string-downcase name) " " "_")
+ "/" "_"))))
(define (dump-avg-method db)
(sql-for-each (match-lambda
@@ -341,9 +343,11 @@ GROUP BY Email"))
(triple id 'gn:name name))))
db
;; The Name and Normalization fields seem to be the
- ;; same. Some records have Name and Normalization as
- ;; "N/A". Remove them.
- "SELECT Name FROM AvgMethod WHERE Name != \"N/A\""))
+ ;; same. Dump only the Name field.
+ ;;
+ ;; There are two records with Name as
+ ;; "N/A". Deduplicate.
+ "SELECT DISTINCT Name FROM AvgMethod"))
(define (gene-chip-name->id name)
(string->symbol
@@ -386,8 +390,7 @@ GROUP BY Email"))
(('gn:email . email)
(cons 'gn:datasetOfInvestigator
(investigator-email->id email)))
- (('gn:avgMethodName . (? (negate (cut string=? <> "N/A"))
- avg-method-name))
+ (('gn:avgMethodName . avg-method-name)
(cons 'gn:normalization
(avg-method-name->id avg-method-name)))
(('gn:geneChip . name)