From e7a6aef11516c1330ae21610b4e14321b137fd04 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 3 Jul 2019 15:27:50 +1000 Subject: mosdepth-plot: allow selection of what to plot Previously global output was plotted. A new control flag allows specification of what to plot. --- tools/mosdepth-plot.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/mosdepth-plot.nix b/tools/mosdepth-plot.nix index de8e2d7..8eae28f 100644 --- a/tools/mosdepth-plot.nix +++ b/tools/mosdepth-plot.nix @@ -1,4 +1,5 @@ { bionix +, what ? "global" , flags ? null }: @@ -12,8 +13,8 @@ stage { name = "mosdepth-depth"; buildInputs = with pkgs; [ python ]; buildCommand = '' - python ${pkgs.mosdepth.src}/scripts/plot-dist.py ${concatMapStringsSep " " (i: "${i}/out.mosdepth.global.dist.txt") inputs} - ${concatStringsSep "\n" (zipListsWith (i: n: "substituteInPlace dist.html --replace ${i}/out ${n}") inputs names)} + python ${pkgs.mosdepth.src}/scripts/plot-dist.py ${concatMapStringsSep " " (i: "${i}/out.mosdepth.${what}.dist.txt") inputs} + ${concatStringsSep "\n" (zipListsWith (i: n: "substituteInPlace dist.html --replace ${i}/out.mosdepth.${what}.dist.txt ${n}") inputs names)} substituteInPlace dist.html --replace "x: 0.1" "x: 0.9" substituteInPlace dist.html --replace "y: 0.1" "y: 0.9" mv dist.html $out -- cgit v1.2.3