diff options
Diffstat (limited to 'tools/bwa-mem.nix')
-rw-r--r-- | tools/bwa-mem.nix | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tools/bwa-mem.nix b/tools/bwa-mem.nix index 9af3992..6e83a6d 100644 --- a/tools/bwa-mem.nix +++ b/tools/bwa-mem.nix @@ -1,21 +1,16 @@ -{ stdenv -, callPackage -, lib -, bc -, bwa -, index ? callPackage ./bwa-index.nix { inherit bwa stdenv lib; } -, samtools ? null +{ bionix +, nixpkgs , ref , bamOutput ? true , flags ? null +, indexAttrs ? {} }: { input1 , input2 ? null }: -assert bamOutput -> samtools != null; - +with nixpkgs; with lib; stdenv.mkDerivation { @@ -23,7 +18,7 @@ stdenv.mkDerivation { buildInputs = [ bwa bc ] ++ optional bamOutput samtools; buildCommand = '' ln -s ${ref} ref.fa - for f in ${index ref}/* ; do + for f in ${bionix.bwa.index indexAttrs ref}/* ; do ln -s $f done cores=$(echo $NIX_BUILD_CORES ${optionalString bamOutput "- 1"} | bc) |