blob: 6b153105c1e50aac5658299706b2ab8d351ea918 (
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
|
{ bionix
, flags ? null
} :
inputBam :
with bionix;
with lib;
with types;
assert (matchFiletype "picard-markDuplicates" { bam = _: true; } inputBam);
assert !(matchFileSorting "picard-markDuplicates" { none = _: true; } inputBam);
# Note that picard markDuplicates has different behaviour depending on whether the input
# is name-sorted or coordinate-sorted.
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}
'';
}
|