specter

Latest version: 1.1.3
Endre Bakken Stovner 2020-05-22T09:34:41.054500Z

How do I select multiple things at different levels?

Endre Bakken Stovner 2020-05-22T09:36:41.056500Z

Test data:

(def testrules {:plot-quals {:out {:graph "quals.svg" :data "quals.tsv"},},
                :samtools-index {:out "bam/sorted.bam.bai",},
                :samtools-sort {:out "bam/sorted.bam"}})
I want to get the first key and value of out. Was thinking it would start something like
(select [(collect-one KEY) ALL ALL :out] testrules)

Endre Bakken Stovner 2020-05-25T11:20:57.057800Z

Working through the tutorials now, but thanks for helping me solve some immediate problems :)

Endre Bakken Stovner 2020-05-22T09:39:13.057300Z

(select [(collect ALL) ALL :out] testrules)
got me closer.

mmer 2020-05-22T14:32:04.057500Z

(select [(collect-one FIRST FIRST) ALL LAST :out] testrules) yields [[:plot-quals {:graph "quals.svg", :data "quals.tsv"}] [:plot-quals "bam/sorted.bam.bai"] [:plot-quals "bam/sorted.bam"]]