From b029bff0ec25ec06758a5fdf7c79152d2ed5c032 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Fri, 4 Jan 2019 11:37:38 +1100 Subject: snpeff: init --- tools/snpeff-annotate.nix | 21 +++++++++++++++++++++ tools/snpeff-dbnsfp.nix | 22 ++++++++++++++++++++++ tools/snpeff.nix | 8 ++++++++ 3 files changed, 51 insertions(+) create mode 100644 tools/snpeff-annotate.nix create mode 100644 tools/snpeff-dbnsfp.nix create mode 100644 tools/snpeff.nix (limited to 'tools') 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; +} diff --git a/tools/snpeff-dbnsfp.nix b/tools/snpeff-dbnsfp.nix new file mode 100644 index 0000000..f9fbdaa --- /dev/null +++ b/tools/snpeff-dbnsfp.nix @@ -0,0 +1,22 @@ +{bionix +,nixpkgs +,dbnsfp +,flags ? ""}: + +input: + +with nixpkgs; +with bionix.types; + +assert (matchFiletype "snpeff-dbnsfp" { vcf = _: true; } input); + +stdenv.mkDerivation { + name = "snpeff-dbnsfp"; + buildCommand = '' + ln -s ${dbnsfp.db} dbNSFP.txt.gz + ln -s ${dbnsfp.index} dbNSFP.txt.gz.tbi + snpeff dbnsfp -db dbNSFP.txt.gz ${input} > $out + ''; + buildInputs = [ snpeff ]; + passthru.filetype = input.filetype; +} diff --git a/tools/snpeff.nix b/tools/snpeff.nix new file mode 100644 index 0000000..2df8056 --- /dev/null +++ b/tools/snpeff.nix @@ -0,0 +1,8 @@ +{bionix, nixpkgs}: + +with bionix; + +{ + annotate = callBionixE ./snpeff-annotate.nix; + dbnsfp = callBionixE ./snpeff-dbnsfp.nix; +} -- cgit v1.2.3