aboutsummaryrefslogtreecommitdiff
path: root/examples/ex-tnpair/tnpair.nix
blob: 51cd703fa225b7b5365b313bc12737035fa413be (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 = flip 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;
}