aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/bwa-index.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/bwa-index.nix b/tools/bwa-index.nix
index b5e3779..3329221 100644
--- a/tools/bwa-index.nix
+++ b/tools/bwa-index.nix
@@ -1,6 +1,7 @@
{ stdenv
, lib
, bwa
+, flags ? null
}:
ref:
@@ -12,7 +13,7 @@ stdenv.mkDerivation {
buildInputs = [ bwa ];
buildCommand = ''
ln -s ${ref} ref.fa
- bwa index ref.fa
+ bwa index ${optionalString (flags != null) flags} ref.fa
mkdir $out
mv ref.fa.* $out
grep '^>[^ \t]*_alt$' ref.fa | tr -d '^>' > $out/idxbase.alt || true