aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-07-03 15:27:50 +1000
committerJustin Bedo <cu@cua0.org>2019-07-03 15:28:51 +1000
commite7a6aef11516c1330ae21610b4e14321b137fd04 (patch)
tree3f373b8c42cc7306c815f0a06420dee751471375
parenta8db68fe43b418e002bca14b8759c9bec46f02cc (diff)
mosdepth-plot: allow selection of what to plot
Previously global output was plotted. A new control flag allows specification of what to plot.
-rw-r--r--tools/mosdepth-plot.nix5
1 files 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