aboutsummaryrefslogtreecommitdiff
path: root/tools/mosdepth-depth.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-09-27 21:13:35 +1000
committerJustin Bedo <cu@cua0.org>2018-09-28 07:54:22 +1000
commit8df1eae273acaf97ead80b3f5ef78a387be0934b (patch)
tree9b422f07843eaf85234e33ffe60f1efd9f83cc66 /tools/mosdepth-depth.nix
parenta75e95881c49cfa52cc47c27a4980b2381cc0fbf (diff)
Fix missing index for mosdepth
Diffstat (limited to 'tools/mosdepth-depth.nix')
-rw-r--r--tools/mosdepth-depth.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/mosdepth-depth.nix b/tools/mosdepth-depth.nix
index 586cdcb..be28aaf 100644
--- a/tools/mosdepth-depth.nix
+++ b/tools/mosdepth-depth.nix
@@ -1,6 +1,8 @@
{ stdenv
, lib
+, callPackage
, mosdepth
+, index ? callPackage ./samtools-index.nix {}
, flags ? null}:
with lib;
@@ -12,6 +14,8 @@ stdenv.mkDerivation {
buildInputs = [ mosdepth ];
buildCommand = ''
mkdir $out
- mosdepth -t $NIX_BUILD_CORES ${optionalString (flags != null) flags} $out/out ${input}
+ ln -s ${input} input.bam
+ ln -s ${index input} input.bam.bai
+ mosdepth -t $NIX_BUILD_CORES ${optionalString (flags != null) flags} $out/out input.bam
'';
}