diff options
author | Justin Bedo <cu@cua0.org> | 2019-01-04 11:37:38 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2019-01-08 11:02:40 +1100 |
commit | b029bff0ec25ec06758a5fdf7c79152d2ed5c032 (patch) | |
tree | b5671788316a5ea37e04bdbb2b0468a741e33592 /tools | |
parent | 465079fb189deca9cdd08458809bcfa8e7f5eaf9 (diff) |
snpeff: init
Diffstat (limited to 'tools')
-rw-r--r-- | tools/snpeff-annotate.nix | 21 | ||||
-rw-r--r-- | tools/snpeff-dbnsfp.nix | 22 | ||||
-rw-r--r-- | tools/snpeff.nix | 8 |
3 files changed, 51 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; +} 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; +} |