aboutsummaryrefslogtreecommitdiff
path: root/tools/bowtie-index.nix
diff options
context:
space:
mode:
authorl-d-s <distefano.l@wehi.edu.au>2018-12-11 14:17:22 +1100
committerl-d-s <distefano.l@wehi.edu.au>2018-12-11 14:17:22 +1100
commitf0357e09b8c473b55d22c4632692fcc79021570d (patch)
tree9c92993d1f0c788a162159e6440ea958eae3e35d /tools/bowtie-index.nix
parent6742864b8f92f5d7d56da4901486b7e83a271e23 (diff)
parent10bdecf6c1338d7f531ddf7b41da14dfe4a4ac33 (diff)
Merge branch 'master' of https://github.com/PapenfussLab/bionix
Diffstat (limited to 'tools/bowtie-index.nix')
-rw-r--r--tools/bowtie-index.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/bowtie-index.nix b/tools/bowtie-index.nix
new file mode 100644
index 0000000..98e529f
--- /dev/null
+++ b/tools/bowtie-index.nix
@@ -0,0 +1,22 @@
+{ bionix
+, nixpkgs
+, flags ? null
+, seed ? 42
+}:
+
+ref:
+
+with nixpkgs;
+with lib;
+with bionix.types;
+
+assert (matchFiletype "bowtie-index" { fa = _: true; } ref);
+
+stdenv.mkDerivation {
+ name = "bowtie-index";
+ buildInputs = [ bowtie2 ];
+ buildCommand = ''
+ mkdir $out
+ bowtie2-build --seed ${toString seed} --threads $NIX_BUILD_CORES ${optionalString (flags != null) flags} ${ref} $out/ref
+ '';
+}