diff options
author | Arun Isaac | 2021-12-01 16:14:08 +0530 |
---|---|---|
committer | Arun Isaac | 2021-12-01 16:24:32 +0530 |
commit | 218f168762ff97529be83670ddea008ddfbf81a5 (patch) | |
tree | c0657b4387f45f5faaa12fc011d6560032fe4462 | |
parent | 177d41fefe32f244e34a27d429c067a6f3e1421c (diff) | |
download | gn-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-x | dump.scm | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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) |