aboutsummaryrefslogtreecommitdiff
path: root/tools/bowtie-index.nix
diff options
context:
space:
mode:
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
+ '';
+}