aboutsummaryrefslogtreecommitdiff
path: root/tools/picard-markDuplicates.nix
blob: aff1e3204fbf0e5cd7b3b79e5c57950c369e7503 (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
{ bionix
, flags ? null
} :

inputBam :

with bionix;
with lib;
with types;

assert (matchFiletype "picard-markDuplicates" { bam = _: true; } input);
assert (matchFileSorting "picard-markDuplicates" { coord = _: true; } input);

stage {
    name = "picard-markDuplicates";
    buildInputs = with pkgs;
        [ picard-tools ];
    outputs = [ "out" "metrics" ];
    buildCommand = ''
        picard MarkDuplicates \
            I=${inputBam} \
            O=$out \
            M=$metrics \
            ${optionalString (flags != null) flags}
        '';
}