aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2020-08-10 09:41:10 +1000
committerJustin Bedo <cu@cua0.org>2020-08-10 09:41:10 +1000
commitbae57d22d7a626c12660f966eba0d2514d376860 (patch)
tree63c6bc0a681d1ff528d5a066efb78c57986cd1dc /tools
parentc3af7841394bbba1433a4e7e3e4aa225c697c81d (diff)
bwa: alt regex generalisation
Diffstat (limited to 'tools')
-rw-r--r--tools/bwa-index.nix4
1 files changed, 3 insertions, 1 deletions
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;
}