aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/snpeff-dbnsfp.nix4
1 files changed, 3 insertions, 1 deletions
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;