diff options
author | Pjotr Prins | 2020-12-31 14:34:59 +0000 |
---|---|---|
committer | Pjotr Prins | 2020-12-31 14:34:59 +0000 |
commit | 42642e7b13ad79bde76b6fefad825675dad9c61e (patch) | |
tree | 58e41a141d6d46fd1abac57c9258ae5b4597f23e /workflows | |
parent | 5216cf3149024052a3e87f4491d2bb7d9b06a237 (diff) | |
download | bh20-seq-resource-42642e7b13ad79bde76b6fefad825675dad9c61e.tar.gz bh20-seq-resource-42642e7b13ad79bde76b6fefad825675dad9c61e.tar.lz bh20-seq-resource-42642e7b13ad79bde76b6fefad825675dad9c61e.zip |
Add comment
Diffstat (limited to 'workflows')
-rwxr-xr-x | workflows/pull-data/genbank/sparql-fetch-ids | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/workflows/pull-data/genbank/sparql-fetch-ids b/workflows/pull-data/genbank/sparql-fetch-ids index 683044c..d4743bd 100755 --- a/workflows/pull-data/genbank/sparql-fetch-ids +++ b/workflows/pull-data/genbank/sparql-fetch-ids @@ -30,6 +30,10 @@ def sparql q, transform = nil vars = data['head']['vars'] results = data['results']['bindings'] results.map { |rec| + # return results after transforming to a Hash and applying the + # optional transform lambda. Note the transform can not only + # reduce results, or create an array, but also may transform into + # an OpenStruct. res = {} vars.each { |name| res[name.to_sym] = rec[name]['value'] |