aboutsummaryrefslogtreecommitdiff
path: root/tools/samtools-markdup.nix
blob: 73094f218cc4ee6414c9f92d3991a91d53aad184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ bionix
, nixpkgs
, flags ? null
}:

input:

with nixpkgs;
with lib;
with bionix.types;

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

stdenv.mkDerivation {
  name = "samtools-markdup";
  buildInputs = [ samtools ];
  buildCommand = ''
    samtools markdup ${optionalString (flags != null) flags} ${input} $out
  '';
  passthru.filetype = input.filetype;
}