aboutsummaryrefslogtreecommitdiff
path: root/tools/snpeff-annotate.nix
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-01-04 11:37:38 +1100
committerJustin Bedo <cu@cua0.org>2019-01-08 11:02:40 +1100
commitb029bff0ec25ec06758a5fdf7c79152d2ed5c032 (patch)
treeb5671788316a5ea37e04bdbb2b0468a741e33592 /tools/snpeff-annotate.nix
parent465079fb189deca9cdd08458809bcfa8e7f5eaf9 (diff)
snpeff: init
Diffstat (limited to 'tools/snpeff-annotate.nix')
-rw-r--r--tools/snpeff-annotate.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/snpeff-annotate.nix b/tools/snpeff-annotate.nix
new file mode 100644
index 0000000..a119c3c
--- /dev/null
+++ b/tools/snpeff-annotate.nix
@@ -0,0 +1,21 @@
+{bionix
+,nixpkgs
+,db
+,flags ? ""}:
+
+input:
+
+with nixpkgs;
+with bionix.types;
+
+assert (matchFiletype "snpeff-annotate" { vcf = _: true; } input);
+
+stdenv.mkDerivation {
+ name = "snpeff-annotate";
+ buildCommand = ''
+ ln -s ${db} ${db.name}
+ snpeff -nodownload -dataDir $TMPDIR ${db.name} ${input} > $out
+ '';
+ buildInputs = [ snpeff ];
+ passthru.filetype = input.filetype;
+}