aboutsummaryrefslogtreecommitdiff
path: root/examples/ex-tnpair/tnpair.nix
blob: ada96c8ef2097d776d8e101112a9d938e572dbe3 (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
# This is an example tumour-normal calling pipeline using strelka
{ bionix ? import ./../.. {}
, normal
, tumour
, ref
}:

with bionix;
with lib;

let
  input = mapAttrs (_: fetchFastQGZ);

  preprocess = pipe [
    input
    (bwa.align { ref = fetchFastA ref; })
    (samtools.fixmate {})
    (samtools.sort {})
    (samtools.markdup {})
  ];

in linkOutputs {
  strelka = strelka.callSomatic {} {normal = preprocess normal; tumour = preprocess tumour;};
  "normal.bam" = preprocess normal;
  "tumour.bam" = preprocess tumour;
}