From 8378b7d51381ae3328e0de48c4680c04201e1c84 Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Mon, 17 Jan 2022 15:13:28 +1100 Subject: snpeff.dbnsfp: paramterise fields --- tools/snpeff-dbnsfp.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/snpeff-dbnsfp.nix b/tools/snpeff-dbnsfp.nix index 003f7f8..ec09f14 100644 --- a/tools/snpeff-dbnsfp.nix +++ b/tools/snpeff-dbnsfp.nix @@ -1,12 +1,14 @@ { bionix , dbnsfp , heapSize ? "31g" +, fields ? [ ] , flags ? "" }: input: with bionix; +with lib; with types; assert (matchFiletype "snpeff-dbnsfp" { vcf = _: true; } input); @@ -17,7 +19,7 @@ stage { buildCommand = '' ln -s ${dbnsfp.db} dbNSFP.txt.gz ln -s ${dbnsfp.index} dbNSFP.txt.gz.tbi - snpsift dbnsfp -db dbNSFP.txt.gz ${input} > $out + snpsift dbnsfp -db dbNSFP.txt.gz ${optionalString (length fields > 0) "-f ${concatStringsSep "," fields}"} ${flags} ${input} > $out ''; buildInputs = with pkgs; [ snpeff ]; passthru.filetype = input.filetype; -- cgit v1.2.3