aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-09-27 15:41:09 +1000
committerJustin Bedo <cu@cua0.org>2018-09-27 15:41:09 +1000
commita75e95881c49cfa52cc47c27a4980b2381cc0fbf (patch)
tree69055aa697af0d1bdc87f879ae62a00ed70b8338 /tools
parent0d239a650a60a14e4820f73a02e3064e050b2398 (diff)
Allow flag passing to bwa index
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