aboutsummaryrefslogtreecommitdiff
path: root/tools/kallisto-index.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2018-11-02 15:35:22 +1100
committerJustin Bedo <cu@cua0.org>2018-11-02 15:40:27 +1100
commitf416c145204765a1566782f0ff384d3f65d6ed35 (patch)
tree0ce95603001956ac9941f95bd4870aa7a06cce28 /tools/kallisto-index.nix
parentec77e9c3a9c2dc7425ee07474f525dd0a3d01fab (diff)
kallisto: init
Diffstat (limited to 'tools/kallisto-index.nix')
-rw-r--r--tools/kallisto-index.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/kallisto-index.nix b/tools/kallisto-index.nix
new file mode 100644
index 0000000..33dfb80
--- /dev/null
+++ b/tools/kallisto-index.nix
@@ -0,0 +1,22 @@
+{bionix
+, nixpkgs
+, kmerSize ? 31
+, unique ? false}:
+
+with nixpkgs;
+with lib;
+with bionix.types;
+
+assert (kmerSize > 1);
+
+input:
+
+assert (matchFiletype input { fa = _: true; } input);
+
+stdenv.mkDerivation {
+ name = "kallisto-index";
+ buildInputs = [ kallisto ];
+ buildCommand = ''
+ kallisto index -k ${toString kmerSize} ${optionalString unique "--make-unique"} -i $out ${input}
+ '';
+}