From bae57d22d7a626c12660f966eba0d2514d376860 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Mon, 10 Aug 2020 09:41:10 +1000 Subject: bwa: alt regex generalisation --- tools/bwa-index.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/bwa-index.nix b/tools/bwa-index.nix index 17b651f..65d9bd5 100644 --- a/tools/bwa-index.nix +++ b/tools/bwa-index.nix @@ -1,5 +1,6 @@ { bionix , flags ? null +, altRegex ? "^>.*_alt$" }: ref: @@ -18,6 +19,7 @@ stage { 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 + grep -P '${altRegex}' ref.fa | tr -d '^>' > $out/idxbase.alt || true ''; + stripStorePaths = false; } -- cgit v1.2.3