aboutsummaryrefslogtreecommitdiff
path: root/workflows/pull-data/genbank
diff options
context:
space:
mode:
authorPjotr Prins2020-12-31 14:34:59 +0000
committerPjotr Prins2020-12-31 14:34:59 +0000
commit42642e7b13ad79bde76b6fefad825675dad9c61e (patch)
tree58e41a141d6d46fd1abac57c9258ae5b4597f23e /workflows/pull-data/genbank
parent5216cf3149024052a3e87f4491d2bb7d9b06a237 (diff)
downloadbh20-seq-resource-42642e7b13ad79bde76b6fefad825675dad9c61e.tar.gz
bh20-seq-resource-42642e7b13ad79bde76b6fefad825675dad9c61e.tar.lz
bh20-seq-resource-42642e7b13ad79bde76b6fefad825675dad9c61e.zip
Add comment
Diffstat (limited to 'workflows/pull-data/genbank')
-rwxr-xr-xworkflows/pull-data/genbank/sparql-fetch-ids4
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']