aboutsummaryrefslogtreecommitdiff
path: root/tools/snpeff-annotate.nix
blob: 9324f47d871703ec75365a81c791b28c6d257ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ bionix
, db
, heapSize ? "31g"
, flags ? ""
}:

input:

with bionix;
with types;

assert (matchFiletype "snpeff-annotate" { vcf = _: true; } input);

stage {
  name = "snpeff-annotate";
  buildInputs = with pkgs; [ snpeff ];
  JAVA_TOOL_OPTIONS = "-Xmx${heapSize}";
  buildCommand = ''
    ln -s ${db} ${db.name}
    snpeff -nodownload -dataDir $TMPDIR ${db.name} ${input} > $out
  '';
  passthru.filetype = input.filetype;
}