blob: 6cb31bb9e88c870717f64f34d0e8385f612e93be (
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
|
{ bionix
, nixpkgs
, mateScore ? false
, flags ? null
}:
input:
with nixpkgs;
with lib;
with bionix.types;
assert (matchFiletype "samtools-fixmate" { bam = _: true; } input);
assert (matchFileSorting "samtools-fixmate" { name = _: true; } input);
stdenv.mkDerivation {
name = "samtools-fixmate";
buildInputs = [ samtools ];
buildCommand = ''
samtools fixmate \
${optionalString mateScore "-m"} \
${optionalString (flags != null) flags} -O bam ${input} $out
'';
passthru.filetype = input.filetype;
}
|