aboutsummaryrefslogtreecommitdiff
path: root/tools/strelka.nix
blob: d3068b59c4a1e32df17d71e51a61bcae718de503 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ bionix }:

with bionix;
with types;

{
  /* Calls somatic variants
  Type: callSomatic :: {...} -> {tumour, normal} -> somatic results
  */
  callSomatic = callBionixE ./strelka-callSomatic.nix;
  /* Calls variants
  Type: call :: {...} -> [input] -> results
  */
  call = callBionixE ./strelka-call.nix;
  /* Extract VCF file from results
  Type: variants :: results -> vcf
  */
  variants =
    # result of call
    drv: stage {
    name = "strelka-call-variants";
    buildCommand = ''
      ln -s ${drv}/variants/variants.vcf $out
    '';
    passthru.filetype = filetype.vcf {ref=ref;};
  };
  /* Extract indels from somatic results
  Type: indels :: somatic results -> vcf
  */
  indels =
    # result of callSomatic
    drv: stage {
    name = "strelka-callVariants-indels";
    buildCommand = "ln -s ${drv}/variants/somatic.indels.vcf $out";
    passthru.filetype = filetype.vcf {ref = ref;};
  };
  /* Extract SNVs from somatic results
  Type: snvs :: somatic results -> vcf
  */
  snvs =
    # result of callSomatic
    drv: stage {
    name = "strelka-callVariants-snvs";
    buildCommand = "ln -s ${drv}/variants/somatic.snvs.vcf $out";
    passthru.filetype = filetype.vcf {ref = ref;};
  };
}