diff options
| -rw-r--r-- | paper-2026/README.md | 26 | ||||
| -rw-r--r-- | paper-2026/benchmark-inputs.yaml | 8 | ||||
| -rw-r--r-- | paper-2026/benchmark.scm | 145 | ||||
| -rw-r--r-- | paper-2026/channels.scm | 13 | ||||
| -rw-r--r-- | paper-2026/manifest.scm | 24 |
5 files changed, 216 insertions, 0 deletions
diff --git a/paper-2026/README.md b/paper-2026/README.md new file mode 100644 index 0000000..3edc238 --- /dev/null +++ b/paper-2026/README.md @@ -0,0 +1,26 @@ +To replicate the results in the paper, please follow the instructions below. Guix is required. + +# Download data +Download https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/freeze1/pggb/chroms/chr8.hprc-v1.0-pggb.gfa.gz and gunzip it. +``` +wget https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/freeze1/pggb/chroms/chr8.hprc-v1.0-pggb.gfa.gz +gunzip chr8.hprc-v1.0-pggb.gfa.gz +``` + +# Install software +Drop into an environment with all the software installed. +``` +guix time-machine -C channels.scm -- shell -m manifest.scm +``` + +# Compile the ccwl workflow +Compile the ccwl workflow into CWL. +``` +ccwl compile benchmark.scm -o benchmark.cwl +``` + +# Run it +Run the CWL workflow using ravanan. If you need to add additional arguments so it runs on your HPC cluster, please do so. +``` +ravanan --guix-channels=channels.scm --store=store benchmark.cwl benchmark-inputs.yaml +``` diff --git a/paper-2026/benchmark-inputs.yaml b/paper-2026/benchmark-inputs.yaml new file mode 100644 index 0000000..fdfa9f5 --- /dev/null +++ b/paper-2026/benchmark-inputs.yaml @@ -0,0 +1,8 @@ +tools: + - odgi + - domagi +chr8: + class: File + path: chr8.hprc-v1.0-pggb.gfa + checksum: sha1$6e430470be58f46e72fa4d037babe972fb0e5845 +threads: 48 diff --git a/paper-2026/benchmark.scm b/paper-2026/benchmark.scm new file mode 100644 index 0000000..241b41e --- /dev/null +++ b/paper-2026/benchmark.scm @@ -0,0 +1,145 @@ +(define odgi-build + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "${ var prefix='--format={\"metrics\": \"build %e %U %S %M\", \"odgi-graph\": {\"class\": \"File\", \"path\": \"'; var suffix='\"}}'; switch (inputs.tool) { case \"odgi\": return prefix + inputs.graph.nameroot + '.og' + suffix; case \"domagi\": return prefix + inputs.graph.nameroot + '.db' + suffix; }}" "--output=cwl.output.json" tool "build" ("-t" threads) ("-g" graph) ("-o" "${switch (inputs.tool) { case \"odgi\": return inputs.graph.nameroot + \".og\"; case \"domagi\": return inputs.graph.nameroot + \".db\";}}") + #:outputs (metrics #:type string) (odgi-graph #:binding ((glob . "${switch (inputs.tool) { case \"odgi\": return inputs.graph.nameroot + \".og\"; case \"domagi\": return inputs.graph.nameroot + \".db\";}}"))) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define odgi-paths + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "--format={\"metrics\": \"paths %e %U %S %M\"}" "--output=cwl.output.json" tool "paths" ("-t" threads) ("-i" graph) "--list-paths" + #:outputs (metrics #:type string) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define odgi-crush + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "--format={\"metrics\": \"crush %e %U %S %M\"}" "--output=cwl.output.json" tool "crush" ("-t" threads) ("-i" graph) ("-o" "${switch (inputs.tool) { case \"odgi\": return inputs.graph.nameroot + \".og\"; case \"domagi\": return inputs.graph.nameroot + \".db\";}}") + #:outputs (metrics #:type string) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define odgi-depth + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "--format={\"metrics\": \"depth %e %U %S %M\"}" "--output=cwl.output.json" tool "depth" ("-t" threads) ("-i" graph) + #:outputs (metrics #:type string) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define odgi-depth-graph-depth-table + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "--format={\"metrics\": \"depth-table %e %U %S %M\"}" "--output=cwl.output.json" tool "depth" ("-t" threads) ("-i" graph) "--graph-depth-table" + #:outputs (metrics #:type string) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define odgi-matrix + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "--format={\"metrics\": \"matrix %e %U %S %M\"}" "--output=cwl.output.json" tool "matrix" ("-t" threads) ("-i" graph) + #:outputs (metrics #:type string) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define odgi-stats + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "--format={\"metrics\": \"stats %e %U %S %M\"}" "--output=cwl.output.json" tool "stats" ("-t" threads) ("-i" graph) + #:outputs (metrics #:type string) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define odgi-view + (command #:inputs (tool #:type string) graph (threads #:type int) + #:run "time" "--format={\"metrics\": \"view %e %U %S %M\"}" "--output=cwl.output.json" tool "view" ("-t" threads) ("-i" graph) "--to-gfa" + #:outputs (metrics #:type string) + #:other ((hints (ResourceRequirement + (coresMin . "$(inputs.threads)")) + (SoftwareRequirement + (packages . #(((package . "domagi")) + ((package . "odgi")) + ((package . "time"))))))))) + +(define combine-metrics + (command #:inputs (tool #:type string) (build_metrics #:type string) (crush_metrics #:type string) (depth_metrics #:type string) (depth_graph_depth_table_metrics #:type string) (matrix_metrics #:type string) (paths_metrics #:type string) (stats_metrics #:type string) (view_metrics #:type string) + #:run "echo" "$([inputs.build_metrics, inputs.crush_metrics, inputs.depth_metrics, inputs.depth_graph_depth_table_metrics, inputs.matrix_metrics, inputs.paths_metrics, inputs.stats_metrics, inputs.view_metrics].join(`\n`))" + #:outputs (metrics #:type stdout) + #:stdout "$(inputs.tool)-metrics" + #:other ((hints (SoftwareRequirement + (packages . #(((package . "coreutils"))))))))) + +(define benchmark-tool + (workflow ((tool #:type string) chr8 (threads #:type int)) + (pipe (odgi-build #:tool tool + #:graph chr8 + #:threads threads) + (rename #:build-metrics metrics) + (tee (identity) + (pipe (odgi-crush #:tool tool + #:graph odgi-graph + #:threads threads) + (rename #:crush-metrics metrics)) + (pipe (odgi-depth #:tool tool + #:graph odgi-graph + #:threads threads) + (rename #:depth-metrics metrics)) + (pipe (odgi-depth-graph-depth-table #:tool tool + #:graph odgi-graph + #:threads threads) + (rename #:depth-graph-depth-table-metrics metrics)) + (pipe (odgi-matrix #:tool tool + #:graph odgi-graph + #:threads threads) + (rename #:matrix-metrics metrics)) + (pipe (odgi-paths #:tool tool + #:graph odgi-graph + #:threads threads) + (rename #:paths-metrics metrics)) + (pipe (odgi-stats #:tool tool + #:graph odgi-graph + #:threads threads) + (rename #:stats-metrics metrics)) + (pipe (odgi-view #:tool tool + #:graph odgi-graph + #:threads threads) + (rename #:view-metrics metrics))) + (combine-metrics #:tool tool + #:build_metrics build-metrics + #:crush_metrics crush-metrics + #:depth_metrics depth-metrics + #:depth_graph_depth_table_metrics depth-graph-depth-table-metrics + #:matrix_metrics matrix-metrics + #:paths_metrics paths-metrics + #:stats_metrics stats-metrics + #:view_metrics view-metrics)))) + +(workflow ((tools #:type (array string)) chr8 (threads #:type int)) + (scatter (benchmark-tool #:chr8 chr8 + #:threads threads) + #:tool tools)) diff --git a/paper-2026/channels.scm b/paper-2026/channels.scm new file mode 100644 index 0000000..7e70cca --- /dev/null +++ b/paper-2026/channels.scm @@ -0,0 +1,13 @@ +(list (channel + (name 'domagi) + (url "https://git.systemreboot.net/domagi/") + (branch "main") + (commit "fd1982b4883e08710de42a972827bab48116b7f9") + (introduction + (make-channel-introduction + "b35f8cf1054912282dfea938c35e1c5949d2cba6" + (openpgp-fingerprint + "7F73 0343 F2F0 9F3C 77BF 79D3 2E25 EE8B 6180 2BB3")))) + (channel + (inherit %default-guix-channel) + (commit "eec85c7f76b4b85da9fe9e7d1778d063620d4801"))) diff --git a/paper-2026/manifest.scm b/paper-2026/manifest.scm new file mode 100644 index 0000000..d341db8 --- /dev/null +++ b/paper-2026/manifest.scm @@ -0,0 +1,24 @@ +(use-modules ((gnu packages bioinformatics) #:select (ccwl)) + ((gnu packages bioinformatics) #:select (ravanan) #:prefix guix:) + ((gnu packages guile-xyz) #:select (guile-filesystem)) + (guix git-download) + (guix packages)) + +(define ravanan + (let ((commit "1f5000ad6ff98278bf638ff0176ddfd5bf8933cf")) + (package + (inherit guix:ravanan) + (name "ravanan") + (version "0.2.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.systemreboot.net/ravanan") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1dq3jn8z78x287krfvi6hbj066pmz8mk2qamjfsind0bxxjk3qzd"))))))) + +(packages->manifest + (list ccwl ravanan)) |
