diff options
author | Justin Bedo <cu@cua0.org> | 2018-10-29 15:32:26 +1100 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2018-10-29 15:32:26 +1100 |
commit | 3ad53248deca12bda8351f187f322fd9bf6351a1 (patch) | |
tree | 2aaee4f17fba72f9db3d5df485012e2d5a6ca613 /tools/samtools-fixmate.nix | |
parent | 2c706aaad54aeec0f224ab7c313ac22aebe0bb9e (diff) |
init: samtools-fixmate
Diffstat (limited to 'tools/samtools-fixmate.nix')
-rw-r--r-- | tools/samtools-fixmate.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/samtools-fixmate.nix b/tools/samtools-fixmate.nix new file mode 100644 index 0000000..6cb31bb --- /dev/null +++ b/tools/samtools-fixmate.nix @@ -0,0 +1,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; +} |