diff options
author | Justin Bedo <cu@cua0.org> | 2018-09-28 09:57:19 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2018-09-28 10:08:18 +1000 |
commit | fc17098fd20b49ce72756b8eb25c7a09f2ed4434 (patch) | |
tree | 3d06c51df51e11ee3359db72497b04bb0a0202cc /tools | |
parent | 188b59fc60925a0f3d67feae76e4d7e48a0d0770 (diff) |
Change mosdepth plotting to multisample
Diffstat (limited to 'tools')
-rw-r--r-- | tools/mosdepth-plot.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/mosdepth-plot.nix b/tools/mosdepth-plot.nix index 464e495..e6d2c7d 100644 --- a/tools/mosdepth-plot.nix +++ b/tools/mosdepth-plot.nix @@ -1,15 +1,22 @@ { stdenv +, lib , mosdepth , python , flags ? null}: -input: +with lib; + +{ inputs +, names ? []}: stdenv.mkDerivation { name = "mosdepth-depth"; buildInputs = [ python ]; buildCommand = '' - python ${mosdepth.src}/scripts/plot-dist.py ${input}/*global.dist.txt + python ${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)} + substituteInPlace dist.html --replace "x: 0.1" "x: 0.9" + substituteInPlace dist.html --replace "y: 0.1" "y: 0.9" mv dist.html $out ''; } |